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
What are the carriers of devices whose software platforms are not 'Android'?
assistant
SELECT Carrier FROM device WHERE Software_Platform != 'Android'
human
How many devices are there?
assistant
SELECT count(*) FROM device
human
Please show the software platforms of devices in descending order of the count.
assistant
SELECT Software_Platform FROM device GROUP BY Software_Platform ORDER BY COUNT(*) DESC
human
List the software platform shared by the greatest number of devices.
assistant
SELECT Software_Platform FROM device GROUP BY Software_Platform ORDER BY COUNT(*) DESC LIMIT 1
human
How many different software platforms are there for devices?
assistant
SELECT count(DISTINCT Software_Platform) FROM device
human
What are the different software platforms for devices, and how many devices have each?
assistant
SELECT Software_Platform , COUNT( * ) FROM device GROUP BY Software_Platform ;