dense rank

    Department Top Three Salaries [ MSSQL ]

    Department Top Three Salaries - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com WINDOW 함수인 DENSE_RANK()를 사용하여 동일한 값은 동일한 랭크를 주게 하였고 SELECT 절에 연산한 것을 WHERE절에서 필터링 조건으로 사용할 수 없기 때문에 서브쿼리로 묶어 값을 뽑아냈습니다. SELECT t.department, t.employee, t.salary FROM ( SELECT d.name AS department , e.n..