Show names of shops and the carriers of devices they have in stock.
CREATE TABLE shop (Shop_Name VARCHAR, Shop_ID VARCHAR); CREATE TABLE stock (Device_ID VARCHAR, Shop_ID VARCHAR); CREATE TABLE device (Carrier VARCHAR, Device_ID VARCHAR)
SELECT T3.Shop_Name, T2.Carrier FROM stock AS T1 JOIN device AS T2 ON T1.Device_ID = T2.Device_ID JOIN shop AS T3 ON T1.Shop_ID = T3.Shop_ID
<s>[INST] Write mssql query to answer the following question given the database schema. Schema: CREATE TABLE shop (Shop_Name VARCHAR, Shop_ID VARCHAR); CREATE TABLE stock (Device_ID VARCHAR, Shop_ID VARCHAR); CREATE TABLE device (Carrier VARCHAR, Device_ID VARCHAR) Question: Show names of shops and the carriers of devices they have in stock. [/INST] SELECT T3.Shop_Name, T2.Carrier FROM stock AS T1 JOIN device AS T2 ON T1.Device_ID = T2.Device_ID JOIN shop AS T3 ON T1.Shop_ID = T3.Shop_ID </s>