Easy
SQL-J02sqlCustomers Without Orders
Problem
Find every customer who has **never** placed an order. Return `id, name` ordered by `id`.
Input
customers(id, name), orders(id, customer_id)
Output
id, name
Constraints
1 ≤ rows ≤ 10^5
Sample input
customers: (1,'Ada'),(2,'Linus'),(3,'Grace') orders: (10,1)
Sample output
2 | Linus 3 | Grace
Explanation
LEFT JOIN + IS NULL is the canonical anti-join idiom.
joinsleft-joinanti-join@Meta
Visible test cases
in: see prompt
out: 2 Linus 3 Grace
Your solution — run it, use AI if stuck
sql
