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
How would you edit your CRONTAB to schedule the running of /test/test.sh to run every other day at 2PM?
What is meant by joins? List out the types of joins.
What is a sub query and what are the different types of subqueries?
How to define a procedure inside another procedure?
Explain the difference between a procedure and a function?
Explain a data segment?
Which environment variables are absolutely critical in order to run the OUI?
How to speed up webrick?
Where is the export dump file located?
How to execute a stored program unit?
Can we create trigger on materialized view in oracle?
How to turn on or off recycle bin for the instance?
What privilege is needed for a user to create indexes in oracle?
How to create a single index for multiple columns?
What are the different types of synonyms?