Show the order id and order details for all orders.
select order_id, order_details from orders
For each of them, count the number of invoices as well.
select t2.order_id, t2.order_details, count(*) from invoices as t1 join orders as t2 on t1.order_id = t2.order_id group by t2.order_id
Which of them have more than two?
select t2.order_id, t2.order_details from invoices as t1 join orders as t2 on t1.order_id = t2.order_id group by t2.order_id having count(*) > 2