dense_rank
\nCREATE FUNCTION getNthHighestSalary(N INT) RETURNS INT\nBEGIN\n  RETURN (\n      # Write your MySQL query statement below.\n     \n      select distinct salar
```\nCREATE FUNCTION getNthHighestSalary(N INT) RETURNS INT\nBEGIN\n  RETURN (\n      # Write your MySQL query statement below.\n     \n      select distinct salary from\n      (select salary,dense_rank() over (order by salary desc) salaryrank from employee)t\n      where t.salaryrank=N\n  );\nEND\n```
[]