How can I find the Nth highest salary in a table containing salaries in SQL Server?
Dont forget to use the distinct keyword:-
distinct
SELECT TOP 1 Salary FROM ( SELECT Distinct TOP N Salary FROM Salaries ORDER BY Salary DESC ) SalarySubquery ORDER BY Salary ASC