Group and having query, PL-SQL Programming

Using a join on 2 tables, select all columns and 10 rows from the 2 tables without the use of a Cartesian product.

Query:

SELECT * FROM EMPLOYEE1 E JOIN STAFF S ON E.EMP_ID=S.EMP_ID WHERE ROWNUM<11;

Use group by & having in a select statement using one or more table(s) (If more than 1 table then, don't use a Cartesian product).

Query:

SELECT BRANCH,COUNT(*) FROM STAFF  GROUP BY BRANCH;

 

 

Posted Date: 3/14/2013 2:02:58 AM | Location : United States







Related Discussions:- Group and having query, Assignment Help, Ask Question on Group and having query, Get Answer, Expert's Help, Group and having query Discussions

Write discussion on Group and having query
Your posts are moderated
Related Questions
Challenge 1 You are required to do the project and write a test plan for it. Demo 4 is a check writer program for employees. In it, the user enters all information about the

MILLER-UREY' S EXPERIMENTAL PROCEDURES - They recreated the probable conditions on the primitive earth in the laboratory. An atmosphere containing hydrogen, ammonia, me

a. Write an anonymous block that contains a PL/SQL function. Given an order number orderNo, the function will calculate the total number of the parts in the order. Then the anonym

BEGIN Parameter Description in pl sql: BEGIN: This keyword signals the beginning of the executable section of a PL/SQL block, that contains executable statements. The execut

what is the use of declare keyword

Hi,am developing a library system and relating all the table is somehow complex,could you kindly assist me

Using ROLLBACK The ROLLBACK statements end the present transaction and undo any change made during the transaction. The Rolling back is helpful for two reasons. Firstly, if yo

Relational Operators The relational operators permit you to compare randomly complex expressions. The list below provides the meaning of each operator:

Using TRIM This process has two forms. The TRIM removes an element from the end of the collection. The TRIM(n) removes the n elements from the end of the collection. For e.g.

CURRVAL and NEXTVAL The series is a schema object which generates the sequential numbers. Whenever you form a sequence, you can specify its primary value and an increment. T