All SQL problems
MediumJOIN
Customers who have never ordered
Return the name of every customer who has no order at all. LEFT JOIN + WHERE order id IS NULL is the classic pattern.
- #left-join
- #null-filter
Schema (SQLite, in-browser)
customers (id, name, city, signup_date) products (id, name, category, price) orders (id, customer_id, order_date, status) order_items (order_id, product_id, quantity)
Sample input
10 customers, 8 have ordered
Expected shape
2 rows
sql-left-join.sqlSQLite
Result
Press “Run query” to execute against the sample database.
