MySQL Very Easy to Understand
\nCREATE FUNCTION getNthHighestSalary(N INT) RETURNS INT\nBEGIN\n  RETURN (\n      SELECT DISTINCT Salary\n      FROM\n          (SELECT\n            Salary,\n 
```\nCREATE FUNCTION getNthHighestSalary(N INT) RETURNS INT\nBEGIN\n  RETURN (\n      SELECT DISTINCT Salary\n      FROM\n          (SELECT\n            Salary,\n            DENSE_RANK() OVER (ORDER BY SALARY DESC) AS \'Rank\'\n          FROM Employee) T1\n      WHERE T1.Rank = N\n  );\nEND\n```
[]