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 the difference between undefined value and null value? : Sql dba
What is sqlca in powerbuilder?
Can we use join in subquery?
How do you modify a trigger?
What is rtm stands for?
What are the two parts of design view?
How many joins can you have in sql?
What is $$ in sql?
Which tcp/ip port does sql server run on? How can it be changed? : Sql dba
What type of database is cloud sql?
What is pl sql quora?
What is a .db file?
Is big data nosql?
how to convert character strings to dates? : Sql dba
What is the difference between alter trigger and drop trigger statements?