Pregunta de entrevista de Slalom

Write a SQL query that will produce the 10Th largest salary from an Employees table.

Respuestas de entrevistas

Anónimo

3 feb 2013

Glass door wont let me edit but switch 6 to 10 as shown below SELECT TOP 1 SALARY FROM ( SELECT DISTINCT TOP 10 ORDER BY SALARY DESC) AS TENTHSALARY ORDER BY SALARY

3

Anónimo

3 feb 2013

SELECT TOP 1 SALARY FROM ( SELECT DISTINCT TOP 6 ORDER BY SALARY DESC) AS TENTHSALARY ORDER BY SALARY

1

Anónimo

17 jul 2012

select top 10 percent topsalaries.salary from (select top 10 Salary from Employee order by Salary desc) as topsalaries order by topsalaries.Salary asc

2