Query for second maximum salary in each in each department
Answer Posted / ram
SELECT empno,salary,dept_id FROM (SELECT empno,salary,dept_id,DENSE_RANK() OVER (PARTITION BY Dept_id ORDER BY Salary DESC)
as Rnk FROM emp) WHERE Rnk = 2;
| Is This Answer Correct ? | 8 Yes | 0 No |
Post New Answer View All Answers
What are types of exception?
What are the features of pl sql?
What is clustered index in sql?
What are the types of join in sql?
Is sql microsoft?
How do you update a table in sql?
Mention what is the use of function "module procedure" in pl/sql?
What is the difference between jpql and sql?
Is oracle and sql same?
Can we create clustered index without primary key?
what is an execution plan? When would you use it? How would you view the execution plan? : Sql dba
how many triggers are allowed in mysql table? : Sql dba
How do I enable sql encryption?
What are the query optimization techniques?
What are the parameter modes supported by pl/sql?