SELECT product_id ,  count(DISTINCT order_id) FROM Order_items GROUP BY product_id
How many distinct order ids correspond to each product?
SELECT product_id , count ( DISTINCT order_id ) FROM Order_items GROUP BY product_id
select product_id , count ( distinct order_id ) from order_items group by product_id
How many distinct order ids correspond to each product ?