diff --git a/177. Nth Highest Salary b/177. Nth Highest Salary new file mode 100644 index 0000000..3ea8fe1 --- /dev/null +++ b/177. Nth Highest Salary @@ -0,0 +1,11 @@ +CREATE FUNCTION getNthHighestSalary(N INT) RETURNS INT +BEGIN +SET N = N-1; + RETURN ( + SELECT DISTINCT(salary) from Employee order by salary DESC + LIMIT 1 OFFSET N + + ); +END + +#pls upvote if you find solution easy to undestand....!! Thanks..!!!