Use LEFT JOIN to find non-matching rows
I want to know how many customers in our database have never made a purchase. Can you get me a count? This is for our re-engagement campaign targeting.
Each hint you reveal reduces the XP you can earn. Try the query first.
Use a `LEFT JOIN` from `dim_customers` to `fact_purchases` on `customer_id` — this keeps all customers, even those with no purchases
After the LEFT JOIN, customers with no purchases will have NULL in the fact_purchases columns. Filter with `WHERE p.purchase_id IS NULL`
Count what's left: `SELECT COUNT(*) AS never_purchased`