Third Highest Salary in SQL

SELECT salary
FROM (
    SELECT salary, DENSE_RANK() OVER (ORDER BY salary DESC) AS rank
    FROM employees
) AS ranked_salaries
WHERE rank = 3;

Comments

Popular posts from this blog

Deploy a .NET Core application on Hostinger

API development using .NET Core - ProductManagmentCRUD

Second Highest Salary using C# Linq