The question: every customer with their number of March orders, 0 for none.
SELECT c.name, COUNT(o.order_id) AS march_orders
FROM customers c
LEFT JOIN orders o ON o.customer_id = c.customer_id
WHERE o.placed_at >= '2026-03-01' AND o.placed_at < '2026-04-01'
GROUP BY c.customer_id, c.name
ORDER BY c.customer_id;
Dee is gone. A LEFT JOIN keeps every row on the left. When nothing on the right matches, it adds one row with NULL in every right-hand column, so Dee gets a row of NULLs.
Then the WHERE runs. NULL >= '2026-03-01' is NULL, and NULL drops the row.
The order of the steps is the whole bug. SQLite's docs give it: in an outer join, the NULL rows are added after the ON clause runs and before the WHERE clause runs. So a WHERE condition on a right-hand column sees those NULL rows, can't be true for them, and drops them. The LEFT JOIN becomes an inner join, with no error.