leetcode2 [SQL] Leetcode | 178. Rank Scores 178. Rank Scores Medium 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 순위 함수 DENSE_RANK() select score, `rank` from ( select score, DENSE_RANK() over (order by Score desc) as `rank` from Scores ) score_rank order by `rank`; 176 Second Highest Salary 를 풀고 나니 쉽게 풀 수 있던.. 2021. 7. 8. [SQL] Leetcode | 176. Second Highest Salary 176. Second Highest Salary Easy Second Highest Salary - 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 문제 접근 두 번째로 높은 급여를 출력하는 문제였다. 문제는... 사람이 2명 미만일 때 null을 반환해야 한다. 처음 접근 했던 방법은 limit, offset 이었는데, 이 구문으로는 빈 배열을 반환한다. null을 반환하려면 함수를 거쳐야 하나..? null 다루는 방법을 못찾고 Discuss 탭에서 다른 방법.. 2021. 7. 7. 이전 1 다음