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
What is the purpose of save points in oracle database?
How to add a new column to an existing table in oracle?
For a field in a repeating frame, can the source come from the column which does not exist in the data group which forms the base for the frame ?
How to create a stored function in oracle?
What is a dead lock in oracle?
What is instant client oracle?
What is ordinary table in oracle?
What are a collation and state the different types of collation sensitivity?
How to save query output to a local file?
What is the parameter mode that can be passed to a procedure?
Can sub procedure/function be called recursively?
Difference between cartesian join and cross join?
What is the difference difference between $ORACLE_HOME and $ORACLE_BASE.
Explain about achiever in sql?
How to delete an existing row from a table in oracle?