#10 most askedVery commonEasyGroup by
WHERE vs HAVING
New to Group by? Learn it from scratch firstGrouping Results with GROUP BY โ
๐ข Asked in real interviews
No reports yet. Were you asked this? Be the first to say where.Return each customer_id with at least 2 delivered orders, as customer_id and delivered_orders. Then explain why you need both WHERE and HAVING.
๐งช Practice
Write the query, then press Run tests to compare your rows with the expected result.
SELECT * FROM orders;
Output appears here. Press Run or Ctrl/โ + Enter.
Try it first. Struggling for a few minutes is how it sticks.