Database: customers_and_invoices
Question: How many distinct order ids correspond to each product?
SQL:
SELECT product_id ,  count(DISTINCT order_id) FROM Order_items GROUP BY product_id