177. Nth Highest Salary, 96% faster solution with comments
\'\'\'\nCREATE FUNCTION getNthHighestSalary(N INT) RETURNS INT\nBEGIN\n\n  SET N= N-1; # change N to N-1 because in OFFSET (check query) calculation is not allo
\'\'\'\nCREATE FUNCTION getNthHighestSalary(N INT) RETURNS INT\nBEGIN\n\n  SET N= N-1; # change N to N-1 because in OFFSET (check query) calculation is not allowed \n\n  RETURN (\n      \n      SELECT DISTINCT Salary # TAKE distinct becuase people can have same salary\n      FROM Employee\n      ORDER BY Salary DESC \n      LIMIT 1 OFFSET N       \n  );\nEND\n\'\'\'
[]