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

Answer Posted / nagaraju nampally

select * from (select ename,sal,deptno,dense_rank()
over(partition by deptno order by sal)rnk from emp)x where
x.rnk<5

Is This Answer Correct ?    1 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between post-database commit and post-form commit?

510


what are the advantages of running a database in archive log mode?

1726


15. Display the item_cost and then truncate it to the nearest hundred, ten, unit, tenth and hundredth.

1697


Is rowid unique in oracle?

514


What is meant by a deadlock situation?

569






How to create a new view in oracle?

603


How to check database size in Oracle?

631


How to store only time; not date and time?

553


How to fetch the row which has the max value for a column?

531


What is the max number of columns in an oracle table?

507


Explain an exception and its types?

603


What is MTTR advisor in Oracle?

598


What is a procedure in oracle?

608


How to get execution path reports on query statements?

552


How to define an oracle cursor variable?

557