https://leetcode.com/problems/customers-who-never-order/
Write an SQL query to report all customers who never order anything.
Return the result table in any order.
The query result format is in the following example.
+-----------+
| Customers |
+-----------+
| Henry |
| Max |
+-----------+
조회할 데이터 : 한 번도 주문한 적 없는 고객의 이름
조건1. 고객의 이름 컬럼을 Customers라고 별칭을 줄 것
SELECT name as Customers
FROM customers
LEFT JOIN orders ON customers.id = orders.customerid
WHERE orders.customerid IS NULL
- INNER JOIN과 LEFT JOIN의 속성, 차이점 이해