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 'mysqldump'? : Sql dba
What is mutating error?
Explain isolation levels. : Transact sql
What are the types of index in sql?
Can we have two clustered index on a table?
What is a composite primary key?
Why do we use subquery?
how to create a new table by selecting rows from another table in mysql? : Sql dba
How would you convert date into julian date format?
How can you load multi line records? : aql loader
What are user defined functions?
What is numeric function sql?
What are inbuilt functions in sql?
How to write pl sql program in mysql command prompt?
Mention what is the function that is used to transfer a pl/sql table log to a database table?