SELECT*
FROM employee A
WHERE n-1 = (SELECT count (*)
FROM employee B
WHERE B.salary > A.salary
So I'm trying to get the nth highest salary from the employee table. This code works exactly as I want it to, but I don't understand it particularly the 3rd line where "WHERE n-1 = (SELECT count(*)"
I understand how the count function works, but I don't get what happens when you input a number and state WHERE it equals to the count function