FIS Interview Question

How do you find out the 8th highest salary in an employee table? (SQL Question)

Interview Answer

Anonymous

Jun 22, 2016

SELECT TOP 1 salary FROM ( SELECT DISTINCT TOP n salary FROM employee ORDER BY salary DESC ) a ORDER BY salary (n = desired number)