WITH Salaries AS
(
SELECT Basic_Salary, ROW_NUMBER() OVER(ORDER BY Basic_Salary DESC) AS 'RowNum'
FROM dbo.EMPLOYEE
)
SELECT
Basic_Salary
FROM
Salaries
WHERE
RowNum <= 5
(
SELECT Basic_Salary, ROW_NUMBER() OVER(ORDER BY Basic_Salary DESC) AS 'RowNum'
FROM dbo.EMPLOYEE
)
SELECT
Basic_Salary
FROM
Salaries
WHERE
RowNum <= 5