How many distinct order ids correspond to each product?
select product_id, count(distinct order_id) from order_items group by product_id