Query for second maximum salary in each in each department
Answer Posted / swas
SELECT *
FROM
(
SELECT e1.*,
DENSE_RANK() OVER(PARTITION BY Deptno
ORDER BY Sal DESC
)TopRank
FROM Emp e1
)
WHERE TopRank = 2
/
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What is a composite primary key?
Difference between global and parameter variables?
discuss about myisam index statistics collection. : Sql dba
hi,i plan to put experience on PLSQL ,can anyone suggest me for any institutes in bangalore or how to prepare for interviews
what are all types of user defined functions? : Sql dba
What are pl/sql cursor exceptions?
what is sql in mysql? : Sql dba
Is sqlite thread safe?
What does (+) mean in sql joins?
How many sql commands are there?
Can we create foreign key without primary key?
Explain foreign key in sql?
What is difference between db2 and sql?
What is optimistic concurrency control? : Transact sql
How do I view a procedure in sql?