How to get top 3 salary in Sql server?

SELECT * FROM Employee
WHERE
(
salary IN
(
SELECT TOP (3) sal
FROM Employee as EmployeeSalary
GROUP BY salary
ORDER BY salary DESC
)
)

Another query:

SELECT MIN(salary) FROM Salary WHERE Employee IN(SELECT TOP 3 Employee FROM Salary ORDER BY Salary DESC)

 

All Rights Reserved 2019 | DesignzRush (OPC) Pvt. Ltd.
Inline
Inline