You want only customers who have placed more than 5 orders. Which clause filters on the aggregated count?SELECT customer_id, COUNT(*) AS n FROM orders GROUP BY customer_id ___;