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

How to assign values to data fields in record variables?

574


What are operators in oracle?

521


Explain the use of indexes option in imp command.

561


What is proxy method?

536


What is the oracle implicit cursor?

585






How do I manually uninstall oracle client?

512


What is varray?

580


What is clustered table in Oracle?

637


What are the different windows events activated at runtime ?

2403


What are the types of partitions in oracle?

534


Can you have more than one content canvas view attached with a window ?

1815


Explain integrity constraint?

638


How to add a new column to an existing table in oracle?

576


How many types of table in Oracle?

612


What is a private synonym?

1077