Database: department_store
Question: Return the ids of all products that were ordered more than three times or supplied more than 80000.
SQL:
SELECT product_id FROM Order_Items GROUP BY product_id HAVING count(*)  >  3 UNION SELECT product_id FROM Product_Suppliers GROUP BY product_id HAVING sum(total_amount_purchased)  >  80000