MySQL solution
CREATE FUNCTION getNthHighestSalary(N INT) RETURNS INT\nBEGIN\n  RETURN (\n      # Write your MySQL query statement below.\n      select max(Salary) from\n     
CREATE FUNCTION getNthHighestSalary(N INT) RETURNS INT\nBEGIN\n  RETURN (\n      # Write your MySQL query statement below.\n      select max(Salary) from\n      (select Salary,\n      dense_rank() over(order by Salary desc) as rnk\n      from Employee) sub\n      where rnk = N\n  );\nEND
[]