What are the customer ID's for these orders?
SELECT t2.customer_id FROM Invoices AS T1 JOIN Orders AS T2 ON T1.order_id   =   T2.order_id GROUP BY T2.order_id HAVING count ( * )   >  2
customer ID's for orders with more than 2 invoices refers to SELECT customer_id FROM Orders JOIN Invoices ON Orders.order_id = Invoices.order_id GROUP BY Orders.order_id HAVING COUNT(*) > 2;