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
In a distributed database system, can we execute two queries simultaneously?
Does view store data in sql?
explain the delete statements in sql
Why do we go for stored procedures?
What is data type in database?
What does cursor do in sql?
what are the differences between char and varchar? : Sql dba
What is the use of & in pl sql?
How much does sqlite cost?
What are the parameter modes supported by pl/sql?
define sql delete statement ? : Sql dba
Why we use stored procedure instead of query?
Can instead of triggers be used to fire once for each statement on a view?
How do I turn a list into a table?
what is a database transaction? : Sql dba