Salaries: Nth highest, per department and above average · exercise 1 of 1 · free preview
Two employees can earn the same salary. DENSE_RANK() OVER (ORDER BY salary DESC) gives tied salaries the same rank and no gaps, so rank 3 is always the third distinct salary.
Show the name and salary of the employee with the third highest distinct salary.
Tables in this practice company
departmentsemployees