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
Find the average ram mib size of the chip models that are never used by any phone.
assistant
SELECT avg(RAM_MiB) FROM chip_model WHERE model_name NOT IN (SELECT chip_model FROM phone)
human
Find the details for all chip models.
assistant
SELECT * FROM chip_model
human
Find the number of phones for each accreditation type.
assistant
SELECT Accreditation_type , count(*) FROM phone GROUP BY Accreditation_type
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
Find all phones that have word 'Full' in their accreditation types. List the Hardware Model name and Company name.
assistant
SELECT Hardware_Model_name , Company_name FROM phone WHERE Accreditation_type LIKE 'Full';
human
Find the names of the chip models that are not used by any phone with full accreditation type.
assistant
SELECT model_name FROM chip_model EXCEPT SELECT chip_model FROM phone WHERE Accreditation_type = "Full" ;