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

Answer Posted / praveen marigaddi.

select distinct sal from emp a where 5 >(select count
(distinct sal) from emp where sal>a.sal) order by a.sal desc

Is This Answer Correct ?    6 Yes 6 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to select some rows from a table in oracle?

598


What are joins, explain all types of joins?

1724


How do I use os authentication with weblogic jdriver for oracle and connection pools?

577


How to do clean up if create database failed?

576


How to create tables for odbc connection testing?

495






What do you know about normalization? Explain in detail?

499


What is recovery manager(rman) backup in Oracle?

629


How to run the anonymous block again?

595


Explain a data segment?

650


Does facebook use oracle?

577


Where do we use decode and case statements?

563


what is IDE,DMV in sql server?

2248


Explain index?

749


Why do we need oracle client?

511


How to use "in out" parameter properly?

615