05 Group
-- 05_group: Summarise completed orders by channel
-- Read-only reference query. Setup must be loaded first.
SELECT channel, COUNT(*) AS completed_orders
FROM aabha_sql.orders WHERE status='completed'
GROUP BY channel HAVING COUNT(*) >= 5 ORDER BY channel;