728x90
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
[problem]
Write an SQL query to report all customers who never order anything.
Return the result table in any order.
[analysis]
1. 두 테이블 left join
2. cutomnerID가 null인 경우 where을 사용해서 리스트 출력해야함
join 과 where은 같이 사용할 수 있따!!
[soultion]
728x90
'MS SQL > MS SQL : Leetcode' 카테고리의 다른 글
SQL - 586. Customer Placing the Largest Number of Orders (select, count) (0) | 2022.04.26 |
---|---|
SQL - 511. Game Play Analysis I (min, group by) (0) | 2022.04.26 |
SQL - Leetcode 620. Not Boring Movies (where, order by) (0) | 2022.04.25 |
SQL - Leetcode 175. Combine Two Tables (left join) (0) | 2022.04.25 |
SQL - Leetcode 182.duplicate-emails (group by, having) (0) | 2022.04.25 |