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

In SAP ECC 6.0 , under DB02 tcode , Tablespace name to be explain stepy step all the col

3700


how do we code triggers , store procedure , Performance tuning and indexing in a Java Project? Pls kindly get me the perfect answer with the code for each....thank you in advance............pls any body kindly help me soon as possible....

1587


What is transaction control statement and how many types of transaction control statement in Oracle?

562


What do you mean by a database transaction & what all tcl statements are available in oracle?

549


How do I know if oracle is installed on windows?

486






why dont we assign not null constraint as table level constraint.

2252


Can you assign multiple query result rows to a variable?

548


What is the difference between a primary key & a unique key?

590


What is a database table in oracle?

572


Please explain compound trigger in oracle?

595


What is where clause in oracle?

528


How to synchronize 2 schema's objects?

1690


Can you create a synonym without having a table?

553


A table t is there.If you perform insert ,update and delete then the trigger will fire.What is the minimum no of trigger required for a table.

4262


How to export data to a csv file?

620