Spot the bug SQL
1
-- Count how many orders each customer has placed.
2
SELECT customer_id, COUNT(coupon_code) AS orders
3
FROM orders
4
GROUP BY customer_id;