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
How do you optimize a stored procedure query?
What is pl sql commands?
What is bulk collect in pl sql?
Is it possible for a table to have more than one foreign key?
What are the different types of constraints?
What is difference between table and view?
how can we know the number of days between two given dates using mysql? : Sql dba
Why do we use sql constraints? Which constraints we can use while creating database in sql?
How does index help in query performance?
Name the different types of indexes in sql and define them.
what is a database? : Sql dba
Explain about various levels of constraint.
What is procedure function?
What is rowid in sql?
What is the difference between join and natural join?