Which customer had 3 orders?
SELECT * FROM customers AS T1 JOIN orders AS T2 ON T1.customer_id   =   T2.customer_id GROUP BY T1.customer_id having count ( * )   =  3
customer with 3 orders refers to HAVING COUNT(*) = 3;