human
Schema:
chip_model (Model_name, Launch_year, RAM_MiB, ROM_MiB, Slots, WiFi, Bluetooth)
screen_mode (Graphics_mode, Char_cells, Pixels, Hardware_colours, used_kb, map, Type)
phone (Company_name, Hardware_Model_name, Accreditation_type, Accreditation_level, Date, chip_model, screen_mode)
Please answer with SQL.
assistant
Sure, I understand.
human
List the hardware model name for the phons that were produced by 'Nokia Corporation' but whose screen mode type is not Text.
assistant
SELECT DISTINCT T2.Hardware_Model_name FROM screen_mode AS T1 JOIN phone AS T2 ON T1.Graphics_mode = T2.screen_mode WHERE t2.Company_name = 'Nokia Corporation' AND T1.Type != 'Text';
human
What is maximum and minimum RAM size of phone produced by company named 'Nokia Corporation'?
assistant
SELECT max(T1.RAM_MiB) , min(T1.RAM_MiB) FROM chip_model AS T1 JOIN phone AS T2 ON T1.Model_name = T2.chip_model WHERE T2.Company_name = 'Nokia Corporation';
human
List the hardware model name for the phones that were produced by 'Nokia Corporation' or whose screen mode type is 'Graphics.'
assistant
SELECT DISTINCT T2.Hardware_Model_name FROM screen_mode AS T1 JOIN phone AS T2 ON T1.Graphics_mode = T2.screen_mode WHERE T1.Type = 'Graphics' OR t2.Company_name = 'Nokia Corporation'
human
List the name of the company that produced more than one phone model.
assistant
SELECT Company_name FROM phone GROUP BY Company_name HAVING count(*) > 1;
human
What is the average ROM size of phones produced by the company named 'Nokia Corporation'?
assistant
SELECT avg(T1.ROM_MiB) FROM chip_model AS T1 JOIN phone AS T2 ON T1.Model_name = T2.chip_model WHERE T2.Company_name = 'Nokia Corporation';
human
How many phone hardware models are produced by the company named 'Nokia Corporation'?
assistant
SELECT COUNT( * ) FROM phone WHERE Company_name = "Nokia Corporation" ;