employer cover photo
employer logo
employer logo

Daffodil Software

Is this your company?

Daffodil Software Interview Question

Write an SQL query to print third highest salary?

Interview Answers

Anonymous

Dec 28, 2017

Another way could be :- select top 1 T.salary from (select top 3 salary from Employees order by salary desc) As T order by T.salary;

Anonymous

Dec 28, 2017

select T.salary, T.name from (select salary,name, RN = ROW_NUMBER() over ( order by salary desc) from Employees) as T where T.RN in (3);--can change the no(3) here to fetch nth highest salary