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 type of join is sql join?
How do you go back in sql?
What are the uses of sysdate and user keywords?
Do ddl statements need commit?
Why is nosql good?
What is sql and db2?
What is structural independence and why is it important?
Differentiate pl/sql and sql?
Can we call dml statement in function?
What are the different types of a subquery?
Explain the rollback statement?
What are actual parameters and formal parameters?
What is a Mapplet?
how does a local variable is defined using t-sql? : Transact sql
What is a natural join?