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

Give the advantages and disadvantages of clusters.

577


definition of cluster and non-clustered index?

2479


How to write a left outer join with the where clause in oracle?

629


How can you tell how much space is left on a given file system and how much space each of the file systems subdirectories take-up?

2395


What is the usage of merge statement?

672






In which language oracle has been developed?

648


How to concatenate two text values in oracle?

593


Are truncate and delete commands same? If so why?

654


How to import one table back from a dump file?

595


How to find the duplicate rows count from employees table in oracle?

553


How can we find out the duplicate values in an oracle table?

608


What are the parameters that we can pass through a stored procedure?

553


How to Truncate Table in Oracle

656


What is an anonymous block?

625


How to connect the oracle server as sysdba?

633