how to check the 3rd max salary from an employee table?
Answer Posted / rutujagabhane
SELECT *
FROM(
SELECT SALARY, DEPARTMENT_ID,EMPLOYEE_ID, DENSE_RANK() OVER (PARTITION BY DEPARTMENT_ID ORDER BY SALARY DESC) AS RN
FROM EMPLOYEES
)
WHERE RN = 2
;
Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Can I join the same table twice?
Why do we create views in sql?
how to select unique records from a table? : Sql dba
What is record type in pl sql?
What is clustered and nonclustered index in sql?
What is a database event trigger?
What is primary key sql?
Does pdo prevent sql injection?
Which is faster joins or subqueries?
What is the need of a partition key?
How to avoid using cursors? What to use instead of cursor and in what cases to do so?
What is the difference between syntax error and runtime error?
What is sql in java?
Is left join inner or outer?
Is vs as in pl sql?