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 table called, if it has neither cluster nor non-cluster index? What is it used for? : Sql dba
What is a boolean in sql?
What is sql*loader?
How do I view a sql database?
what are the advantages of mysql in comparison to oracle? : Sql dba
how to use in conditions? : Sql dba
Are there any features that are decommissioned in 11g that are not present in 11g?
What is a ddl command?
What is difference between nchar and nvarchar?
What is using in sql?
What is a sql*loader control file?
What is sqlservr exe?
How do I find duplicates in the same column?
What is sql partition function?
What is the use of sqlerrd 3?