Pergunta de entrevista da empresa FIS

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

Resposta da entrevista

Sigiloso

22 de jun. de 2016

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