[문제]
Rank Scores - 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
[풀이]
mssql 윈도우함수 이용해서 풀이
SELECT score
, DENSE_RANK() OVER (ORDER BY score DESC) rank
FROM scores
ORDER BY score DESC
'SQL > MySQL 문제풀이' 카테고리의 다른 글
[HackerRank] Weather Observation Station 9 정규표현식 풀이 (0) | 2022.06.27 |
---|---|
[HackerRank] weather observation station 8 - 정규표현식 풀이 (0) | 2022.06.27 |
[LeetCode] department top three salaries 윈도우함수 풀이 (0) | 2022.06.21 |
[LeetCode] Consecutive Numbers 풀이 (0) | 2022.06.20 |
[LeetCode] department-highest-salary 풀이 (0) | 2022.06.14 |