Show the product ids and the number of unique orders containing each product.
CREATE TABLE Order_items (product_id VARCHAR, order_id VARCHAR)
SELECT product_id, COUNT(DISTINCT order_id) FROM Order_items GROUP BY product_id
<s>[INST] Write mssql query to answer the following question given the database schema. Schema: CREATE TABLE Order_items (product_id VARCHAR, order_id VARCHAR) Question: Show the product ids and the number of unique orders containing each product. [/INST] SELECT product_id, COUNT(DISTINCT order_id) FROM Order_items GROUP BY product_id </s>