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
How many devices are in stock at Dinas Device?
assistant
SELECT COUNT( Device_ID ) FROM stock AS T1 JOIN shop AS T2 ON T1.Shop_ID = T2.Shop_ID WHERE Shop_Name = 'Dinas Device';
human
How many devices are at Best Buy?
assistant
SELECT COUNT( Device_ID ) FROM stock AS T1 JOIN shop AS T2 ON T1.Shop_ID = T2.Shop_ID WHERE Shop_Name = "Best Buy" ;