How many orders have more than two invoices?
SELECT COUNT ( * )  FROM  ( SELECT * FROM Invoices AS T1 JOIN Orders AS T2 ON T1.order_id   =   T2.order_id GROUP BY T2.order_id HAVING count ( * )   >  2 ) 
orders having more than two invoices refers to HAVING COUNT(*) > 2;