how will I find the first 5 highest salaried employees in
each dept in oracle.

Answer Posted / kanha

Select E1.* From(Select Ename,Deptno,Sal,
Dense_Rank()over
(
Partition By Deptno Order By Sal Desc
)"Top Sal"
From Emp)E1
Where "Top Sal"<=5 Order By Deptno,Sal Desc;

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the four Oracle system processes that must always be up and running for the database to be useable?

591


Explain the difference between a procedure and a function? What do you understand by those terms?

622


Who developed oracle & when?

571


How to invoke the data pump import utility?

651


How to write date and time literals in oracle?

555






What are the differences between blob and clob in oracle?

582


Respected sir, Please send me technical questions related to oracle apps..

1379


What is object data modeling?

507


What do the 9i dbms_standard.sql_txt() and dbms_standard.sql_text() procedures do?

4015


What is data block in Oracle?

618


Will you be able to store pictures in the database?explain.

538


Explain what are the different type of segments?

576


What are the set operators union, union all, minus & intersect meant to do?

562


What do you mean by merge in oracle and how can you merge two tables?

522


How to assign data of the deleted row to variables?

579