Answers for "find nth or 5th highest record of salary"

0

find nth or 5th highest record of salary

SELECT Salary FROM Worker ORDER BY Salary DESC LIMIT 5,1
Posted by: Guest on June-16-2021
0

find nth or 5th highest record of salary

SELECT Salary
FROM Worker W1
WHERE 4 = (
 SELECT COUNT( DISTINCT ( W2.Salary ) )
 FROM Worker W2
 WHERE W2.Salary <= W1.Salary
 );
Posted by: Guest on June-17-2021
0

find nth or 5th highest record of salary

SELECT Salary FROM Worker ORDER BY Salary DESC LIMIT n-1,1;
SELECT SALARY FROM Worker ORDER BY Salaly DESC LIMIT 5,1;
Posted by: Guest on June-16-2021

Code answers related to "find nth or 5th highest record of salary"

Browse Popular Code Answers by Language