Find the 4th Highest employee salary from the following table Question Find the 4th highest salary from the given employee table in progress 0 SQL sirajp99 55 years 2 Answers 1422 views Newbie 0
Answers ( 2 )
using limit (4,1) at the end of statement
SELECT Salary FROM (SELECT Salary FROM Employee ORDER BY salary DESC LIMIT 4)
SELECT salary
FROM (SELECT *, DENSE_RANK() OVER (ORDER BY SALARY DESC ) as r
FROM table_name )
WHERE r=4 ;