Marketing is running a win-back campaign and needs a list of customers who signed up but never bought anything. Using the customers and orders tables, find every customer who has never placed an order — return their id and name.
customers
| column | type |
|---|---|
| id | INTEGER |
| name | TEXT |
| TEXT |
orders
| column | type |
|---|---|
| id | INTEGER |
| customer_id | INTEGER |
| amount | NUMERIC |
| created_at | DATE |
customers
| id | name | |
|---|---|---|
| 1 | Alice | alice@example.com |
| 2 | Bob | bob@example.com |
| 3 | Carol | carol@example.com |
| 4 | Dave | dave@example.com |
orders
| id | customer_id | amount | created_at |
|---|---|---|---|
| 1 | 1 | 99.99 | 2024-01-10 |
| 2 | 1 | 49.50 | 2024-02-15 |
| 3 | 3 | 200.00 | 2024-03-01 |
| id | name |
|---|---|
| 2 | Bob |
| 4 | Dave |
Alice placed orders 1 and 2; Carol placed order 3. Bob and Dave never placed any order, so they are the only customers returned.