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 to do if dba lost the system password?

597


What is the exact use of Collections?

1681


What is ASM (Automatic Storage Management) in Oracle?

712


Why use resource manager in Oracle?

663


How to view the data files in the current database?

592






What is the disadvantage of User defind function?

1833


How to delete a column in an existing table?

593


What is PL/SQL ?

1114


Explain constraining triggers.

593


How to delete multiple rows from a table in oracle?

563


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

622


How to find out what oracle odbc drivers are installed?

572


Is there any function in oracle similar like group_concat of mysql?

539


What are the advantages of oracle?

549


What are operators in oracle?

528