LeetCode7 [Leetcode] 596. Classes More Than 5 Students (MySQL) 문제 및 풀이 문제) Leetcode - SQL - Classes More Than 5 Students https://leetcode.com/problems/classes-more-than-5-students/ Classes More Than 5 Students - 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 학생 수가 5명 이상인 수업을 고르는 문제였습니다. group by를 통해 수업 별로 묶은 후, count를 통해 학생 수를 계산합니다. 풀이) select class.. 2021. 12. 30. [Leetcode] 620. Not Boring Movies (MySQL) 문제 및 풀이 문제) Leetcode - SQL - Not Boring Movies https://leetcode.com/problems/not-boring-movies/ Not Boring Movies - 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 풀이) select * from Cinema where mod(id,2) = 1 and description != "boring" order by rating desc 2021. 12. 23. [Leetcode] 595. Big Countries (MySQL) 문제 및 풀이 문제) Leetcode - SQL - Big Countries https://leetcode.com/problems/big-countries/ Big Countries - 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 면적이 300000 이상, 인구수가 25000000 이상인 국가를 찾는 문제였습니다. select, from, where 문으로 쉽게 해결할 수 있는 문제였습니다. 풀이) select w.name, w.population, w.area from W.. 2021. 12. 22. [Leetcode] 197. Rising Temperature (MySQL) 문제 및 풀이 문제) Leetcode - SQL - Rising Temperature https://leetcode.com/problems/rising-temperature/ Rising Temperature - 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 전날보다 높은 기온을 가지는 날을 찾는 문제였습니다. w1과 w2 두 개의 테이블을 이용하여 temperature의 비교와 datediff를 이용하여 해결합니다. 풀이) select w1.id from Weather w1.. 2021. 12. 20. [Leetcode] 183. Customers Who Never Order (MySQL) 문제 및 풀이 문제) Leetcode - Join - Customers Who Never Order https://leetcode.com/problems/customers-who-never-order/ Customers Who Never Order - 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 customer 테이블에서 order 테이블에 존재하지 않는 name을 찾는 문제였습니다. customer 테이블과 order 테이블을 left join 한 후에 where문으로 o.. 2021. 12. 16. [Leetcode] 182. Duplicate Emails (MySQL) 문제 및 풀이 문제) Leetcode - SQL - Duplicate Emails https://leetcode.com/problems/duplicate-emails/ Duplicate Emails - 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로 email 별로 묶은 후, count(email)을 통해 개수가 1이 아닌 것을 출력했습니다. 풀이) select email from Person group by email ha.. 2021. 12. 12. [Leetcode] 175. Combine Two Tables (MySQL) 문제 및 풀이 문제) Leetcode - SQL - Combine Two Tables https://leetcode.com/problems/combine-two-tables/ 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 테이블 합치면 되는 문제였습니다. Address 테이블은 존재하지 null로 처리해야되므로 left join을 이용해서 테이블을 합쳤습니다. 풀이) select firstName, la.. 2021. 12. 12. 이전 1 다음 반응형