Accepted SQL Server solution
CREATE FUNCTION getNthHighestSalary(@N INT) RETURNS INT AS\nBEGIN\n    RETURN (\n        / Write your T-SQL query statement below. /\n        SELECT distinct to
CREATE FUNCTION getNthHighestSalary(@N INT) RETURNS INT AS\nBEGIN\n    RETURN (\n        /* Write your T-SQL query statement below. */\n        SELECT distinct top 1 Salary from Employee where Salary not in\n        (SELECT distinct top ((@N) - 1) Salary from Employee order by Salary desc) ORDER BY Salary DESC\n    );\nEND
[]