human
Schema:
device (Device_ID, Device, Carrier, Package_Version, Applications, Software_Platform)
shop (Shop_ID, Shop_Name, Location, Open_Date, Open_Year)
stock (Shop_ID, Device_ID, Quantity)
Please answer with SQL.
assistant
Sure, I understand.
human
List all the carriers
assistant
SELECT Carrier FROM device;
human
Show all the unique carriers of the devices in the stock.
assistant
SELECT DISTINCT T2.Carrier FROM stock AS T1 JOIN device AS T2 ON T1.Device_ID = T2.Device_ID;
human
Which carriers have no devices in stock?
assistant
SELECT Carrier FROM device WHERE Device_ID NOT IN ( SELECT Device_ID FROM stock ) ;