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 data profiling in sql?
What is the use of double ampersand (&&) in sql queries? Give an example
what is bcp? When does it used? : Sql dba
Is sqlite thread safe?
Is trigger a stored procedure?
What is difference between sql function and stored procedure?
What is the use of partition by in sql?
Inline the values in PL/SQL, what does it mean.?
What are triggers and its types?
what are the non-standard sql commands supported by 'mysql'? : Sql dba
If a cursor is open, how can we find in a pl/sql block?
What is the maximum size of sqlite database?
What is clustered index in sql?
Does user triggers have entry for trigger with compilation errors?
What are the two types of exceptions.