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
what are aggregate and scalar functions? : Sql dba
what is collation? : Sql dba
How do I remove duplicates in two columns?
Can delete statement be rollbacked?
how many tables will create when we create table, what are they? : Sql dba
Do we need to rebuild index after truncate?
What is the best sql course?
what is sql server agent? : Sql dba
Does group by remove duplicates?
Is primary key clustered index?
what is bcp? When does it used? : Sql dba
Is primary key always clustered index?
Is inner join faster than left join?
Can we use distinct and group by together?
what are the advantages of sql ? : Sql dba