'leetcode' 태그의 글 목록
본문 바로가기
728x90

leetcode4

Leetcode) No.262 [Trips and Users] Leetcode) No.262 [Trips and Users] 문제 (2) Trips and Users - LeetCode Trips and Users - 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 설명 * GROUP BY * HAVING * WHERE * ROUND * IF * COUNT Request_at 날짜를 기준으로 그룹화를 한다. 이 때, 그 그룹에는 Banned 되지 않은 Client와 Driver 만 들어갈 수 있으며, 2013년 10월 1일 .. 2022. 4. 4.
Leetcode) No.180 [Consecutive Numbers] Leetcode No.180 [Consecutive Numbers] 문제 Consecutive Numbers - LeetCode Consecutive Numbers - 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 설명 Id 는 각각 순차적으로 나열이 되어 있으면서 저렇게 세 집합의 교집합으로 같은 Num을 가지는 숫자를 탐색해서 풀어보았다. 그리고 같은 번호가 여러번 확인이 될 수 있고, 그 결과 여러번 출력될 수 있으므로 DISTINCT 를 통해 한 번호가 .. 2021. 9. 3.
Leet) No.175 [Combine Two Tables] Leetcode No.175 [Combine Two Tables] 문제 Combine Two Tables - LeetCode Combine Two Tables - 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 설명 두 테이블 에서 Person 테이블에 있는 모든 사람들에 대해서 새로운 테이블을 만들어야 한다. Address 의 PK 인 AddressId 와는 상관없이 만들으라고 했으므로 결국 Person 테이블에만 존재하는 사람이거나, 두 테이블 모두 존재하는 .. 2021. 8. 31.
Leet) No.1179 [Reformat Department Table] Leetcode No.1179 [Reformat Department Table] 문제 Reformat Department Table - LeetCode Reformat Department Table - 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 설명 위와 같이 Department table 의 data를 id column 으로 그룹화 시키고, Jan_Revenue ~ Dec_Revenue Column 을 만들어야 한다. 각 id 별로 Result table .. 2021. 8. 30.
728x90