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
When do we use triggers?
What's the difference between a primary key and a clustered index?
What is sql and how does it work?
How do I audit the sql sent to the server?
differentiate between float and double. : Sql dba
What is a left join?
What is varchar data type in sql?
What are the most important characteristics of pl/sql?
What does select * from mean in sql?
What is db journal file?
what is difference between delete and truncate commands? : Sql dba
Difference between truncate, delete and drop commands?
Can I learn sql in a week?
What are the different sql languages?
How delete all data from all tables in sql?