Find the id of the customers who have order status both "On Road" and "Shipped".
CREATE TABLE customers (customer_id VARCHAR); CREATE TABLE orders (customer_id VARCHAR, order_status VARCHAR)
SELECT T1.customer_id FROM customers AS T1 JOIN orders AS T2 ON T1.customer_id = T2.customer_id WHERE T2.order_status = "On Road" INTERSECT SELECT T1.customer_id FROM customers AS T1 JOIN orders AS T2 ON T1.customer_id = T2.customer_id WHERE T2.order_status = "Shipped"
<s>[INST] Write mssql query to answer the following question given the database schema. Schema: CREATE TABLE customers (customer_id VARCHAR); CREATE TABLE orders (customer_id VARCHAR, order_status VARCHAR) Question: Find the id of the customers who have order status both "On Road" and "Shipped". [/INST] SELECT T1.customer_id FROM customers AS T1 JOIN orders AS T2 ON T1.customer_id = T2.customer_id WHERE T2.order_status = "On Road" INTERSECT SELECT T1.customer_id FROM customers AS T1 JOIN orders AS T2 ON T1.customer_id = T2.customer_id WHERE T2.order_status = "Shipped" </s>