nth Max easy Solution
\nselect(select distinct salary from Employee order by Salary Desc limit 1 offset 1)  as SecondHighestSalary;\n\n\n\nCREATE FUNCTION getNthHighestSalary(N INT) 
```\nselect(select distinct salary from Employee order by Salary Desc limit 1 offset 1)  as SecondHighestSalary;\n```\n\n```\nCREATE FUNCTION getNthHighestSalary(N INT) RETURNS INT\nBEGIN\nSET N=N-1;\n  RETURN (\n      # Write your MySQL query statement below.\n      select(select distinct salary from Employee order by Salary Desc limit 1 offset N)  as SecondHighestSalary\n      \n  );\nEND\n```
['MySQL']