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

Answer Posted / shareef

select * from(select emp.*,
dense_rank() over(partition by deptno order by sal desc) r
from emp) where r<=5;

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Does facebook use oracle?

573


List the various oracle database objects?

597


What are the different types of trigger and explain its various uses and functions?

549


What is oracle rowcount?

578


How to empty your oracle recycle bin?

573






How to create a new user account in oracle?

576


How to rename an index?

588


Explain the use of rows option in imp command.

604


How to work with data objects interactively?

554


What is the data pump export utility?

641


How to do a full database export?

634


How will you differentiate between varchar & varchar2?

587


Explain integrity constraint?

644


What is the minimum client footprint required to connect c# to an oracle database?

562


What are ddl statements in oracle?

590