Query for second maximum salary in each in each department
Answer Posted / swastik
SELECT *
FROM
(
SELECT Ename, Deptno, Sal,
DENSE_RANK(PARTITION BY Deptno
ORDER BY Sal DESC
)TopRank
FROM Emp
)
WHERE TopRank = 2
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What is scalar and vector?
What are stored procedures in mysql?
Can we use loop in sql?
What is mdf ldf and ndf?
What is union and union all keyword in sql?
Does a user_objects view have an entry for a trigger?
Can we use distinct and group by together?
What is basic structure of pl sql?
How can triggers be used for the table auditing?
What are the different dml commands in sql?
What is scalar function?
what are the authentication modes in sql server? How can it be changed? : Sql dba
which command using query analyzer will give you the version of sql server and operating system? : Sql dba
How do you rename a table in sql?
Do we need to create index on primary key?