Solution with GROUP BY
CREATE FUNCTION getNthHighestSalary(N INT) RETURNS INT\nBEGIN\n  SET N = N-1;\n  RETURN (\n      # Write your MySQL query statement below.\n      SELECT salary 
```CREATE FUNCTION getNthHighestSalary(N INT) RETURNS INT\nBEGIN\n  SET N = N-1;\n  RETURN (\n      # Write your MySQL query statement below.\n      SELECT salary FROM Employee\n      GROUP BY salary\n      ORDER BY salary DESC\n      LIMIT 1 OFFSET N\n  ); \nEND\n```
[]