리트코드(LeetCode) SQL 문제풀이 - 1581. Customer Who Visited but Did Not Make Any Transactions
2023. 1. 23. 20:48ㆍ코딩테스트/리트코드(LeetCode) - SQL Study Plan
MySQL 문제 1581. Customer Who Visited but Did Not Make Any Transactions
select customer_id,count(customer_id) as count_no_trans
from Visits
where visit_id NOT IN (
select DISTINCT visit_id
from Transactions)
group by customer_id;
728x90
'코딩테스트 > 리트코드(LeetCode) - SQL Study Plan' 카테고리의 다른 글
리트코드(LeetCode) SQL 문제풀이 - 197. Rising Temperature (0) | 2023.01.26 |
---|---|
리트코드(LeetCode) SQL 문제풀이 - 1148. Article Views I (0) | 2023.01.24 |
리트코드(LeetCode) SQL 문제풀이 - 175. Combine Two Tables (0) | 2023.01.23 |
리트코드(LeetCode) SQL 문제풀이 - 176. Second Highest Salary (0) | 2023.01.23 |
리트코드(LeetCode) SQL 문제풀이 - 608. Tree Node (0) | 2023.01.23 |