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

Answer Posted / mihir nasikkar

select *
from employee X
where salary in (select top 5 salary
from employee
where dept = X.dept
order by salary desc)
order by dept, salary desc

Is This Answer Correct ?    2 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is sequence?

624


How to do paging with oracle?

574


what is a Nested Loop join?

1567


Can we call procedure inside function in oracle?

612


How to start instance with a minimal initialization parameter file?

536






What is a directory object?

591


Which is better Oracle or MS SQL? Why?

5438


Explain about integrity constraint?

605


Explain what are the different type of segments?

578


What is oracle sid?

509


Explain do view contain data?

583


Explain what are the characteristics of data files?

629


What are the different types of modules in oracle forms?

562


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.

4269


What is where clause in oracle?

533