db_id stringlengths 4 31 | SQL stringlengths 18 1.45k | input_sequence stringlengths 148 11k | question stringlengths 16 325 |
|---|---|---|---|
university_basketball | select sum(enrollment) , min(enrollment) from university | Question: return the total and minimum enrollments across all schools. | Tables: basketball_match -> Team_ID, School_ID, Team_Name, ACC_Regular_Season, ACC_Percent, ACC_Home, ACC_Road, All_Games, All_Games_Percent, All_Home, All_Road, All_Neutral. university -> School_ID, School, Location, Founded, Affiliation, Enrollm... | return the total and minimum enrollments across all schools. |
university_basketball | select sum(enrollment) , affiliation from university group by affiliation | Question: find the total student enrollment for different affiliation type schools. | Tables: basketball_match -> Team_ID, School_ID, Team_Name, ACC_Regular_Season, ACC_Percent, ACC_Home, ACC_Road, All_Games, All_Games_Percent, All_Home, All_Road, All_Neutral. university -> School_ID, School, Location, Founded, Affilia... | find the total student enrollment for different affiliation type schools. |
university_basketball | select sum(enrollment) , affiliation from university group by affiliation | Question: what are the total enrollments of universities of each affiliation type? | Tables: basketball_match -> Team_ID, School_ID, Team_Name, ACC_Regular_Season, ACC_Percent, ACC_Home, ACC_Road, All_Games, All_Games_Percent, All_Home, All_Road, All_Neutral. university -> School_ID, School, Location, Founded, Affiliat... | what are the total enrollments of universities of each affiliation type? |
university_basketball | select count(*) from university where school_id not in (select school_id from basketball_match) | Question: how many schools do not participate in the basketball match? | Tables: basketball_match -> Team_ID, School_ID, Team_Name, ACC_Regular_Season, ACC_Percent, ACC_Home, ACC_Road, All_Games, All_Games_Percent, All_Home, All_Road, All_Neutral. university -> School_ID, School, Location, Founded, Affiliation, Enrollm... | how many schools do not participate in the basketball match? |
university_basketball | select count(*) from university where school_id not in (select school_id from basketball_match) | Question: count the number of universities that do not participate in the baketball match. | Tables: basketball_match -> Team_ID, School_ID, Team_Name, ACC_Regular_Season, ACC_Percent, ACC_Home, ACC_Road, All_Games, All_Games_Percent, All_Home, All_Road, All_Neutral. university -> School_ID, School, Location, Founded, ... | count the number of universities that do not participate in the baketball match. |
university_basketball | select school from university where founded > 1850 or affiliation = 'public' | Question: find the schools that were either founded after 1850 or public. | Tables: basketball_match -> Team_ID, School_ID, Team_Name, ACC_Regular_Season, ACC_Percent, ACC_Home, ACC_Road, All_Games, All_Games_Percent, All_Home, All_Road, All_Neutral. university -> School_ID, School, Location, Founded, Affiliation, Enro... | find the schools that were either founded after 1850 or public. |
university_basketball | select school from university where founded > 1850 or affiliation = 'public' | Question: what are the schools that were either founded before 1850 or are public? | Tables: basketball_match -> Team_ID, School_ID, Team_Name, ACC_Regular_Season, ACC_Percent, ACC_Home, ACC_Road, All_Games, All_Games_Percent, All_Home, All_Road, All_Neutral. university -> School_ID, School, Location, Founded, Affiliat... | what are the schools that were either founded before 1850 or are public? |
university_basketball | select count(distinct affiliation) from university | Question: find how many different affiliation types there are. | Tables: basketball_match -> Team_ID, School_ID, Team_Name, ACC_Regular_Season, ACC_Percent, ACC_Home, ACC_Road, All_Games, All_Games_Percent, All_Home, All_Road, All_Neutral. university -> School_ID, School, Location, Founded, Affiliation, Enrollment, Nic... | find how many different affiliation types there are. |
university_basketball | select count(distinct affiliation) from university | Question: count the number of different affiliation types. | Tables: basketball_match -> Team_ID, School_ID, Team_Name, ACC_Regular_Season, ACC_Percent, ACC_Home, ACC_Road, All_Games, All_Games_Percent, All_Home, All_Road, All_Neutral. university -> School_ID, School, Location, Founded, Affiliation, Enrollment, Nicknam... | count the number of different affiliation types. |
university_basketball | select count(*) from university where location like '%ny%' | Question: find how many school locations have the word 'ny'. | Tables: basketball_match -> Team_ID, School_ID, Team_Name, ACC_Regular_Season, ACC_Percent, ACC_Home, ACC_Road, All_Games, All_Games_Percent, All_Home, All_Road, All_Neutral. university -> School_ID, School, Location, Founded, Affiliation, Enrollment, Nickn... | find how many school locations have the word 'ny'. |
university_basketball | select count(*) from university where location like '%ny%' | Question: how many universities have a location that contains ny? | Tables: basketball_match -> Team_ID, School_ID, Team_Name, ACC_Regular_Season, ACC_Percent, ACC_Home, ACC_Road, All_Games, All_Games_Percent, All_Home, All_Road, All_Neutral. university -> School_ID, School, Location, Founded, Affiliation, Enrollment, ... | how many universities have a location that contains ny? |
university_basketball | select t2.team_name from university as t1 join basketball_match as t2 on t1.school_id = t2.school_id where enrollment < (select avg(enrollment) from university) | Question: find the team names of the universities whose enrollments are smaller than the average enrollment size. | Tables: basketball_match -> Team_ID, School_ID, Team_Name, ACC_Regular_Season, ACC_Percent, ACC_Home, ACC_Road, All_Games, All_Games_Percent, All_Home, All_Road, All_Neutral. university -> School_ID, Scho... | find the team names of the universities whose enrollments are smaller than the average enrollment size. |
university_basketball | select t2.team_name from university as t1 join basketball_match as t2 on t1.school_id = t2.school_id where enrollment < (select avg(enrollment) from university) | Question: what are the names of teams from universities that have a below average enrollment? | Tables: basketball_match -> Team_ID, School_ID, Team_Name, ACC_Regular_Season, ACC_Percent, ACC_Home, ACC_Road, All_Games, All_Games_Percent, All_Home, All_Road, All_Neutral. university -> School_ID, School, Location, Founde... | what are the names of teams from universities that have a below average enrollment? |
university_basketball | select count(*) , affiliation from university where enrollment > 20000 group by affiliation | Question: find the number of universities that have over a 20000 enrollment size for each affiliation type. | Tables: basketball_match -> Team_ID, School_ID, Team_Name, ACC_Regular_Season, ACC_Percent, ACC_Home, ACC_Road, All_Games, All_Games_Percent, All_Home, All_Road, All_Neutral. university -> School_ID, School, Lo... | find the number of universities that have over a 20000 enrollment size for each affiliation type. |
university_basketball | select count(*) , affiliation from university where enrollment > 20000 group by affiliation | Question: what are the different affiliations, and how many schools with each have an enrollment size of above 20000? | Tables: basketball_match -> Team_ID, School_ID, Team_Name, ACC_Regular_Season, ACC_Percent, ACC_Home, ACC_Road, All_Games, All_Games_Percent, All_Home, All_Road, All_Neutral. university -> School_ID, ... | what are the different affiliations, and how many schools with each have an enrollment size of above 20000? |
university_basketball | select sum(enrollment) , affiliation from university where founded > 1850 group by affiliation | Question: find the total number of students enrolled in the colleges that were founded after the year of 1850 for each affiliation type. | Tables: basketball_match -> Team_ID, School_ID, Team_Name, ACC_Regular_Season, ACC_Percent, ACC_Home, ACC_Road, All_Games, All_Games_Percent, All_Home, All_Road, All_Neutral. univer... | find the total number of students enrolled in the colleges that were founded after the year of 1850 for each affiliation type. |
university_basketball | select sum(enrollment) , affiliation from university where founded > 1850 group by affiliation | Question: what are the different affiliations, and what is the total enrollment of schools founded after 1850 for each enrollment type? | Tables: basketball_match -> Team_ID, School_ID, Team_Name, ACC_Regular_Season, ACC_Percent, ACC_Home, ACC_Road, All_Games, All_Games_Percent, All_Home, All_Road, All_Neutral. univers... | what are the different affiliations, and what is the total enrollment of schools founded after 1850 for each enrollment type? |
university_basketball | select max(enrollment) from university | Question: what is the maximum enrollment across all schools? | Tables: basketball_match -> Team_ID, School_ID, Team_Name, ACC_Regular_Season, ACC_Percent, ACC_Home, ACC_Road, All_Games, All_Games_Percent, All_Home, All_Road, All_Neutral. university -> School_ID, School, Location, Founded, Affiliation, Enrollment, Nickn... | what is the maximum enrollment across all schools? |
university_basketball | select max(enrollment) from university | Question: return the maximum enrollment across all schools. | Tables: basketball_match -> Team_ID, School_ID, Team_Name, ACC_Regular_Season, ACC_Percent, ACC_Home, ACC_Road, All_Games, All_Games_Percent, All_Home, All_Road, All_Neutral. university -> School_ID, School, Location, Founded, Affiliation, Enrollment, Nickna... | return the maximum enrollment across all schools. |
university_basketball | select * from basketball_match | Question: list all information regarding the basketball match. | Tables: basketball_match -> Team_ID, School_ID, Team_Name, ACC_Regular_Season, ACC_Percent, ACC_Home, ACC_Road, All_Games, All_Games_Percent, All_Home, All_Road, All_Neutral. university -> School_ID, School, Location, Founded, Affiliation, Enrollment, Nic... | list all information regarding the basketball match. |
university_basketball | select * from basketball_match | Question: what is all the information about the basketball match? | Tables: basketball_match -> Team_ID, School_ID, Team_Name, ACC_Regular_Season, ACC_Percent, ACC_Home, ACC_Road, All_Games, All_Games_Percent, All_Home, All_Road, All_Neutral. university -> School_ID, School, Location, Founded, Affiliation, Enrollment, ... | what is all the information about the basketball match? |
university_basketball | select team_name from basketball_match order by all_home desc | Question: list names of all teams in the basketball competition, ordered by all home scores in descending order. | Tables: basketball_match -> Team_ID, School_ID, Team_Name, ACC_Regular_Season, ACC_Percent, ACC_Home, ACC_Road, All_Games, All_Games_Percent, All_Home, All_Road, All_Neutral. university -> School_ID, Schoo... | list names of all teams in the basketball competition, ordered by all home scores in descending order. |
university_basketball | select team_name from basketball_match order by all_home desc | Question: what are the names of all the teams in the basketball competition, sorted by all home scores in descending order? | Tables: basketball_match -> Team_ID, School_ID, Team_Name, ACC_Regular_Season, ACC_Percent, ACC_Home, ACC_Road, All_Games, All_Games_Percent, All_Home, All_Road, All_Neutral. university -> Schoo... | what are the names of all the teams in the basketball competition, sorted by all home scores in descending order? |
phone_1 | select model_name from chip_model where launch_year between 2002 and 2004; | Question: the names of models that launched between 2002 and 2004. | Tables: 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, Accreditat... | the names of models that launched between 2002 and 2004. |
phone_1 | select model_name , ram_mib from chip_model order by ram_mib asc limit 1; | Question: which model has the least amount of ram? list the model name and the amount of ram. | Tables: 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, Acc... | which model has the least amount of ram? list the model name and the amount of ram. |
phone_1 | select chip_model , screen_mode from phone where hardware_model_name = 'lg-p760'; | Question: what are the chip model and screen mode of the phone with hardware model name 'lg-p760'? | Tables: 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... | what are the chip model and screen mode of the phone with hardware model name 'lg-p760'? |
phone_1 | select count(*) from phone where company_name = 'nokia corporation'; | Question: how many phone hardware models are produced by the company named 'nokia corporation'? | Tables: 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, A... | how many phone hardware models are produced by the company named 'nokia corporation'? |
phone_1 | 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'; | Question: what is maximum and minimum ram size of phone produced by company named 'nokia corporation'? | Tables: 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_... | what is maximum and minimum ram size of phone produced by company named 'nokia corporation'? |
phone_1 | 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'; | Question: what is the average rom size of phones produced by the company named 'nokia corporation'? | Tables: 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_nam... | what is the average rom size of phones produced by the company named 'nokia corporation'? |
phone_1 | select t2.hardware_model_name , t2.company_name from chip_model as t1 join phone as t2 on t1.model_name = t2.chip_model where t1.launch_year = 2002 or t1.ram_mib > 32; | Question: list the hardware model name and company name for all the phones that were launched in year 2002 or have ram size greater than 32. | Tables: 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. ... | list the hardware model name and company name for all the phones that were launched in year 2002 or have ram size greater than 32. |
phone_1 | select hardware_model_name , company_name from phone where accreditation_type like 'full'; | Question: find all phones that have word 'full' in their accreditation types. list the hardware model name and company name. | Tables: 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... | find all phones that have word 'full' in their accreditation types. list the hardware model name and company name. |
phone_1 | select t1.char_cells , t1.pixels , t1.hardware_colours from screen_mode as t1 join phone as t2 on t1.graphics_mode = t2.screen_mode where t2.hardware_model_name = 'lg-p760'; | Question: find the char cells, pixels and hardware colours for the screen of the phone whose hardware model name is 'lg-p760'. | Tables: 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 -> Compa... | find the char cells, pixels and hardware colours for the screen of the phone whose hardware model name is 'lg-p760'. |
phone_1 | select t2.hardware_model_name , t2.company_name from screen_mode as t1 join phone as t2 on t1.graphics_mode = t2.screen_mode where t1.type = 'graphics'; | Question: list the hardware model name and company name for the phone whose screen mode type is 'graphics.' | Tables: 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_M... | list the hardware model name and company name for the phone whose screen mode type is 'graphics.' |
phone_1 | select company_name , count(*) from phone group by company_name order by count(*) asc limit 1; | Question: find the name of the company that has the least number of phone models. list the company name and the number of phone model produced by that company. | Tables: chip_model -> Model_name, Launch_year, RAM_MiB, ROM_MiB, Slots, WiFi, Bluetooth. screen_mode -> Graphics_mode, Char_cells, Pixels, Hardware_colours, u... | find the name of the company that has the least number of phone models. list the company name and the number of phone model produced by that company. |
phone_1 | select company_name from phone group by company_name having count(*) > 1; | Question: list the name of the company that produced more than one phone model. | Tables: 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_typ... | list the name of the company that produced more than one phone model. |
phone_1 | select max(used_kb) , min(used_kb) , avg(used_kb) from screen_mode; | Question: list the maximum, minimum and average number of used kb in screen mode. | Tables: 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_t... | list the maximum, minimum and average number of used kb in screen mode. |
phone_1 | select t2.hardware_model_name from chip_model as t1 join phone as t2 on t1.model_name = t2.chip_model where t1.launch_year = 2002 order by t1.ram_mib desc limit 1; | Question: list the name of the phone model launched in year 2002 and with the highest ram size. | Tables: 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, A... | list the name of the phone model launched in year 2002 and with the highest ram size. |
phone_1 | select t1.wifi , t3.type from chip_model as t1 join phone as t2 on t1.model_name = t2.chip_model join screen_mode as t3 on t2.screen_mode = t3.graphics_mode where t2.hardware_model_name = 'lg-p760'; | Question: what are the wifi and screen mode type of the hardware model named 'lg-p760'? | Tables: 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, Accredita... | what are the wifi and screen mode type of the hardware model named 'lg-p760'? |
phone_1 | select t2.hardware_model_name from chip_model as t1 join phone as t2 on t1.model_name = t2.chip_model join screen_mode as t3 on t2.screen_mode = t3.graphics_mode where t3.type = 'text' or t1.ram_mib > 32; | Question: list the hardware model name for the phones that have screen mode type 'text' or ram size greater than 32. | Tables: 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, H... | list the hardware model name for the phones that have screen mode type 'text' or ram size greater than 32. |
phone_1 | 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' | Question: list the hardware model name for the phones that were produced by 'nokia corporation' or whose screen mode type is 'graphics.' | Tables: 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. phon... | list the hardware model name for the phones that were produced by 'nokia corporation' or whose screen mode type is 'graphics.' |
phone_1 | 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'; | Question: list the hardware model name for the phons that were produced by 'nokia corporation' but whose screen mode type is not text. | Tables: 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 ... | list the hardware model name for the phons that were produced by 'nokia corporation' but whose screen mode type is not text. |
phone_1 | select distinct t2.hardware_model_name , t2.company_name from screen_mode as t1 join phone as t2 on t1.graphics_mode = t2.screen_mode where t1.used_kb between 10 and 15; | Question: list the phone hardware model and company name for the phones whose screen usage in kb is between 10 and 15. | Tables: 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,... | list the phone hardware model and company name for the phones whose screen usage in kb is between 10 and 15. |
phone_1 | select accreditation_type , count(*) from phone group by accreditation_type | Question: find the number of phones for each accreditation type. | Tables: 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, Accreditatio... | find the number of phones for each accreditation type. |
phone_1 | select accreditation_type , count(*) from phone group by accreditation_type | Question: how many phones belongs to each accreditation type? | Tables: 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_l... | how many phones belongs to each accreditation type? |
phone_1 | select accreditation_level from phone group by accreditation_level having count(*) > 3 | Question: find the accreditation level that more than 3 phones use. | Tables: 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, Accredita... | find the accreditation level that more than 3 phones use. |
phone_1 | select * from chip_model | Question: find the details for all chip models. | Tables: 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, ch... | find the details for all chip models. |
phone_1 | select count(*) from chip_model where wifi = 'no' | Question: how many models do not have the wifi function? | Tables: 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,... | how many models do not have the wifi function? |
phone_1 | select count(*) from chip_model where wifi = 'no' | Question: count the number of chip model that do not have wifi. | Tables: 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... | count the number of chip model that do not have wifi. |
phone_1 | select model_name from chip_model order by launch_year | Question: list all the model names sorted by their launch year. | Tables: 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... | list all the model names sorted by their launch year. |
phone_1 | select avg(ram_mib) from chip_model where model_name not in (select chip_model from phone) | Question: find the average ram mib size of the chip models that are never used by any phone. | Tables: 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, Accr... | find the average ram mib size of the chip models that are never used by any phone. |
phone_1 | select model_name from chip_model except select chip_model from phone where accreditation_type = 'full' | Question: find the names of the chip models that are not used by any phone with full accreditation type. | Tables: 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_Mode... | find the names of the chip models that are not used by any phone with full accreditation type. |
phone_1 | select t1.pixels from screen_mode as t1 join phone as t2 on t1.graphics_mode = t2.screen_mode where t2.accreditation_type = 'provisional' intersect select t1.pixels from screen_mode as t1 join phone as t2 on t1.graphics_mode = t2.screen_mode where t2.accreditation_type = 'full' | Question: find the pixels of the screen modes that are used by both phones with full accreditation types and phones with provisional accreditation types. | Tables: chip_model -> Model_name, Launch_year, RAM_MiB, ROM_MiB, Slots, WiFi, Bluetooth. screen_mode -> Graphics_mode, Char_cells, Pixels, Hardware_colours, used_kb... | find the pixels of the screen modes that are used by both phones with full accreditation types and phones with provisional accreditation types. |
match_season | select count(*) from country | Question: how many countries are there in total? | Tables: country -> Country_id, Country_name, Capital, Official_native_language. team -> Team_id, Name. match_season -> Season, Player, Position, Country, Team, Draft_Pick_Number, Draft_Class, College. player -> Player_ID, Player, Years_Played, Total_WL, Singles_WL, Dou... | how many countries are there in total? |
match_season | select count(*) from country | Question: count the number of countries. | Tables: country -> Country_id, Country_name, Capital, Official_native_language. team -> Team_id, Name. match_season -> Season, Player, Position, Country, Team, Draft_Pick_Number, Draft_Class, College. player -> Player_ID, Player, Years_Played, Total_WL, Singles_WL, Doubles_WL,... | count the number of countries. |
match_season | select country_name , capital from country | Question: show the country name and capital of all countries. | Tables: country -> Country_id, Country_name, Capital, Official_native_language. team -> Team_id, Name. match_season -> Season, Player, Position, Country, Team, Draft_Pick_Number, Draft_Class, College. player -> Player_ID, Player, Years_Played, Total_WL, Si... | show the country name and capital of all countries. |
match_season | select country_name , capital from country | Question: what are the names and capitals of each country? | Tables: country -> Country_id, Country_name, Capital, Official_native_language. team -> Team_id, Name. match_season -> Season, Player, Position, Country, Team, Draft_Pick_Number, Draft_Class, College. player -> Player_ID, Player, Years_Played, Total_WL, Singl... | what are the names and capitals of each country? |
match_season | select official_native_language from country where official_native_language like '%english%' | Question: show all official native languages that contain the word 'english'. | Tables: country -> Country_id, Country_name, Capital, Official_native_language. team -> Team_id, Name. match_season -> Season, Player, Position, Country, Team, Draft_Pick_Number, Draft_Class, College. player -> Player_ID, Player, Years_Play... | show all official native languages that contain the word 'english'. |
match_season | select official_native_language from country where official_native_language like '%english%' | Question: what are the official native languages that contain the string 'english'. | Tables: country -> Country_id, Country_name, Capital, Official_native_language. team -> Team_id, Name. match_season -> Season, Player, Position, Country, Team, Draft_Pick_Number, Draft_Class, College. player -> Player_ID, Player, Year... | what are the official native languages that contain the string 'english'. |
match_season | select distinct position from match_season | Question: show all distinct positions of matches. | Tables: country -> Country_id, Country_name, Capital, Official_native_language. team -> Team_id, Name. match_season -> Season, Player, Position, Country, Team, Draft_Pick_Number, Draft_Class, College. player -> Player_ID, Player, Years_Played, Total_WL, Singles_WL, Do... | show all distinct positions of matches. |
match_season | select distinct position from match_season | Question: what are the different positions for match season? | Tables: country -> Country_id, Country_name, Capital, Official_native_language. team -> Team_id, Name. match_season -> Season, Player, Position, Country, Team, Draft_Pick_Number, Draft_Class, College. player -> Player_ID, Player, Years_Played, Total_WL, Sin... | what are the different positions for match season? |
match_season | select player from match_season where college = 'ucla' | Question: show the players from college ucla. | Tables: country -> Country_id, Country_name, Capital, Official_native_language. team -> Team_id, Name. match_season -> Season, Player, Position, Country, Team, Draft_Pick_Number, Draft_Class, College. player -> Player_ID, Player, Years_Played, Total_WL, Singles_WL, Double... | show the players from college ucla. |
match_season | select player from match_season where college = 'ucla' | Question: who are the players from ucla? | Tables: country -> Country_id, Country_name, Capital, Official_native_language. team -> Team_id, Name. match_season -> Season, Player, Position, Country, Team, Draft_Pick_Number, Draft_Class, College. player -> Player_ID, Player, Years_Played, Total_WL, Singles_WL, Doubles_WL,... | who are the players from ucla? |
match_season | select distinct position from match_season where college = 'ucla' or college = 'duke' | Question: show the distinct position of players from college ucla or duke. | Tables: country -> Country_id, Country_name, Capital, Official_native_language. team -> Team_id, Name. match_season -> Season, Player, Position, Country, Team, Draft_Pick_Number, Draft_Class, College. player -> Player_ID, Player, Years_Played,... | show the distinct position of players from college ucla or duke. |
match_season | select distinct position from match_season where college = 'ucla' or college = 'duke' | Question: what are the different positions of players from ucla or duke colleges? | Tables: country -> Country_id, Country_name, Capital, Official_native_language. team -> Team_id, Name. match_season -> Season, Player, Position, Country, Team, Draft_Pick_Number, Draft_Class, College. player -> Player_ID, Player, Years_... | what are the different positions of players from ucla or duke colleges? |
match_season | select draft_pick_number , draft_class from match_season where position = 'defender' | Question: show the draft pick numbers and draft classes of players whose positions are defenders. | Tables: country -> Country_id, Country_name, Capital, Official_native_language. team -> Team_id, Name. match_season -> Season, Player, Position, Country, Team, Draft_Pick_Number, Draft_Class, College. player -> Player_ID... | show the draft pick numbers and draft classes of players whose positions are defenders. |
match_season | select draft_pick_number , draft_class from match_season where position = 'defender' | Question: what are the draft pick numbers and draft classes for players who play the defender position? | Tables: country -> Country_id, Country_name, Capital, Official_native_language. team -> Team_id, Name. match_season -> Season, Player, Position, Country, Team, Draft_Pick_Number, Draft_Class, College. player -> Pla... | what are the draft pick numbers and draft classes for players who play the defender position? |
match_season | select count(distinct team) from match_season | Question: how many distinct teams are involved in match seasons? | Tables: country -> Country_id, Country_name, Capital, Official_native_language. team -> Team_id, Name. match_season -> Season, Player, Position, Country, Team, Draft_Pick_Number, Draft_Class, College. player -> Player_ID, Player, Years_Played, Total_WL,... | how many distinct teams are involved in match seasons? |
match_season | select count(distinct team) from match_season | Question: count the number of different teams involved in match season. | Tables: country -> Country_id, Country_name, Capital, Official_native_language. team -> Team_id, Name. match_season -> Season, Player, Position, Country, Team, Draft_Pick_Number, Draft_Class, College. player -> Player_ID, Player, Years_Played, To... | count the number of different teams involved in match season. |
match_season | select player , years_played from player | Question: show the players and the years played. | Tables: country -> Country_id, Country_name, Capital, Official_native_language. team -> Team_id, Name. match_season -> Season, Player, Position, Country, Team, Draft_Pick_Number, Draft_Class, College. player -> Player_ID, Player, Years_Played, Total_WL, Singles_WL, Dou... | show the players and the years played. |
match_season | select player , years_played from player | Question: who are the different players and how many years has each played? | Tables: country -> Country_id, Country_name, Capital, Official_native_language. team -> Team_id, Name. match_season -> Season, Player, Position, Country, Team, Draft_Pick_Number, Draft_Class, College. player -> Player_ID, Player, Years_Played... | who are the different players and how many years has each played? |
match_season | select name from team | Question: show all team names. | Tables: country -> Country_id, Country_name, Capital, Official_native_language. team -> Team_id, Name. match_season -> Season, Player, Position, Country, Team, Draft_Pick_Number, Draft_Class, College. player -> Player_ID, Player, Years_Played, Total_WL, Singles_WL, Doubles_WL, Team. | J... | show all team names. |
match_season | select name from team | Question: what are the names of all teams? | Tables: country -> Country_id, Country_name, Capital, Official_native_language. team -> Team_id, Name. match_season -> Season, Player, Position, Country, Team, Draft_Pick_Number, Draft_Class, College. player -> Player_ID, Player, Years_Played, Total_WL, Singles_WL, Doubles_W... | what are the names of all teams? |
match_season | select t2.season , t2.player , t1.country_name from country as t1 join match_season as t2 on t1.country_id = t2.country | Question: show the season, the player, and the name of the country that player belongs to. | Tables: country -> Country_id, Country_name, Capital, Official_native_language. team -> Team_id, Name. match_season -> Season, Player, Position, Country, Team, Draft_Pick_Number, Draft_Class, College. player -> Player_ID, Playe... | show the season, the player, and the name of the country that player belongs to. |
match_season | select t2.season , t2.player , t1.country_name from country as t1 join match_season as t2 on t1.country_id = t2.country | Question: for each player, what are their name, season, and country that they belong to? | Tables: country -> Country_id, Country_name, Capital, Official_native_language. team -> Team_id, Name. match_season -> Season, Player, Position, Country, Team, Draft_Pick_Number, Draft_Class, College. player -> Player_ID, Player,... | for each player, what are their name, season, and country that they belong to? |
match_season | select t2.player from country as t1 join match_season as t2 on t1.country_id = t2.country where t1.country_name = 'indonesia' | Question: which players are from indonesia? | Tables: country -> Country_id, Country_name, Capital, Official_native_language. team -> Team_id, Name. match_season -> Season, Player, Position, Country, Team, Draft_Pick_Number, Draft_Class, College. player -> Player_ID, Player, Years_Played, Total_WL, Singles_WL, Doubles_... | which players are from indonesia? |
match_season | select t2.player from country as t1 join match_season as t2 on t1.country_id = t2.country where t1.country_name = 'indonesia' | Question: who are the players from indonesia? | Tables: country -> Country_id, Country_name, Capital, Official_native_language. team -> Team_id, Name. match_season -> Season, Player, Position, Country, Team, Draft_Pick_Number, Draft_Class, College. player -> Player_ID, Player, Years_Played, Total_WL, Singles_WL, Double... | who are the players from indonesia? |
match_season | select distinct t2.position from country as t1 join match_season as t2 on t1.country_id = t2.country where t1.capital = 'dublin' | Question: what are the distinct positions of the players from a country whose capital is dublin? | Tables: country -> Country_id, Country_name, Capital, Official_native_language. team -> Team_id, Name. match_season -> Season, Player, Position, Country, Team, Draft_Pick_Number, Draft_Class, College. player -> Player_ID,... | what are the distinct positions of the players from a country whose capital is dublin? |
match_season | select distinct t2.position from country as t1 join match_season as t2 on t1.country_id = t2.country where t1.capital = 'dublin' | Question: give the different positions of players who play for the country with the capital dublin. | Tables: country -> Country_id, Country_name, Capital, Official_native_language. team -> Team_id, Name. match_season -> Season, Player, Position, Country, Team, Draft_Pick_Number, Draft_Class, College. player -> Player_... | give the different positions of players who play for the country with the capital dublin. |
match_season | select t1.official_native_language from country as t1 join match_season as t2 on t1.country_id = t2.country where t2.college = 'maryland' or t2.college = 'duke' | Question: what are the official languages of the countries of players from maryland or duke college? | Tables: country -> Country_id, Country_name, Capital, Official_native_language. team -> Team_id, Name. match_season -> Season, Player, Position, Country, Team, Draft_Pick_Number, Draft_Class, College. player -> Player... | what are the official languages of the countries of players from maryland or duke college? |
match_season | select t1.official_native_language from country as t1 join match_season as t2 on t1.country_id = t2.country where t2.college = 'maryland' or t2.college = 'duke' | Question: return the official native languages of countries who have players from maryland or duke colleges. | Tables: country -> Country_id, Country_name, Capital, Official_native_language. team -> Team_id, Name. match_season -> Season, Player, Position, Country, Team, Draft_Pick_Number, Draft_Class, College. player -... | return the official native languages of countries who have players from maryland or duke colleges. |
match_season | select count(distinct t1.official_native_language) from country as t1 join match_season as t2 on t1.country_id = t2.country where t2.position = 'defender' | Question: how many distinct official languages are there among countries of players whose positions are defenders. | Tables: country -> Country_id, Country_name, Capital, Official_native_language. team -> Team_id, Name. match_season -> Season, Player, Position, Country, Team, Draft_Pick_Number, Draft_Class, College. pl... | how many distinct official languages are there among countries of players whose positions are defenders. |
match_season | select count(distinct t1.official_native_language) from country as t1 join match_season as t2 on t1.country_id = t2.country where t2.position = 'defender' | Question: count the number of different official languages corresponding to countries that players who play defender are from. | Tables: country -> Country_id, Country_name, Capital, Official_native_language. team -> Team_id, Name. match_season -> Season, Player, Position, Country, Team, Draft_Pick_Number, Draft_Class,... | count the number of different official languages corresponding to countries that players who play defender are from. |
match_season | select t1.season , t1.player , t2.name from match_season as t1 join team as t2 on t1.team = t2.team_id | Question: show the season, the player, and the name of the team that players belong to. | Tables: country -> Country_id, Country_name, Capital, Official_native_language. team -> Team_id, Name. match_season -> Season, Player, Position, Country, Team, Draft_Pick_Number, Draft_Class, College. player -> Player_ID, Player, ... | show the season, the player, and the name of the team that players belong to. |
match_season | select t1.season , t1.player , t2.name from match_season as t1 join team as t2 on t1.team = t2.team_id | Question: who are the different players, what season do they play in, and what is the name of the team they are on? | Tables: country -> Country_id, Country_name, Capital, Official_native_language. team -> Team_id, Name. match_season -> Season, Player, Position, Country, Team, Draft_Pick_Number, Draft_Class, College. p... | who are the different players, what season do they play in, and what is the name of the team they are on? |
match_season | select t1.position from match_season as t1 join team as t2 on t1.team = t2.team_id where t2.name = 'ryley goldner' | Question: show the positions of the players from the team with name 'ryley goldner'. | Tables: country -> Country_id, Country_name, Capital, Official_native_language. team -> Team_id, Name. match_season -> Season, Player, Position, Country, Team, Draft_Pick_Number, Draft_Class, College. player -> Player_ID, Player, Yea... | show the positions of the players from the team with name 'ryley goldner'. |
match_season | select t1.position from match_season as t1 join team as t2 on t1.team = t2.team_id where t2.name = 'ryley goldner' | Question: return the positions of players on the team ryley goldner. | Tables: country -> Country_id, Country_name, Capital, Official_native_language. team -> Team_id, Name. match_season -> Season, Player, Position, Country, Team, Draft_Pick_Number, Draft_Class, College. player -> Player_ID, Player, Years_Played, Total... | return the positions of players on the team ryley goldner. |
match_season | select count(distinct t1.college) from match_season as t1 join team as t2 on t1.team = t2.team_id where t2.name = 'columbus crew' | Question: how many distinct colleges are associated with players from the team with name 'columbus crew'. | Tables: country -> Country_id, Country_name, Capital, Official_native_language. team -> Team_id, Name. match_season -> Season, Player, Position, Country, Team, Draft_Pick_Number, Draft_Class, College. player -> P... | how many distinct colleges are associated with players from the team with name 'columbus crew'. |
match_season | select count(distinct t1.college) from match_season as t1 join team as t2 on t1.team = t2.team_id where t2.name = 'columbus crew' | Question: count the number of different colleges that players who play for columbus crew are from. | Tables: country -> Country_id, Country_name, Capital, Official_native_language. team -> Team_id, Name. match_season -> Season, Player, Position, Country, Team, Draft_Pick_Number, Draft_Class, College. player -> Player_I... | count the number of different colleges that players who play for columbus crew are from. |
match_season | select t1.player , t1.years_played from player as t1 join team as t2 on t1.team = t2.team_id where t2.name = 'columbus crew' | Question: show the players and years played for players from team 'columbus crew'. | Tables: country -> Country_id, Country_name, Capital, Official_native_language. team -> Team_id, Name. match_season -> Season, Player, Position, Country, Team, Draft_Pick_Number, Draft_Class, College. player -> Player_ID, Player, Years... | show the players and years played for players from team 'columbus crew'. |
match_season | select t1.player , t1.years_played from player as t1 join team as t2 on t1.team = t2.team_id where t2.name = 'columbus crew' | Question: what are the players who played for columbus crew, and how many years did each play for? | Tables: country -> Country_id, Country_name, Capital, Official_native_language. team -> Team_id, Name. match_season -> Season, Player, Position, Country, Team, Draft_Pick_Number, Draft_Class, College. player -> Player_I... | what are the players who played for columbus crew, and how many years did each play for? |
match_season | select position , count(*) from match_season group by position | Question: show the position of players and the corresponding number of players. | Tables: country -> Country_id, Country_name, Capital, Official_native_language. team -> Team_id, Name. match_season -> Season, Player, Position, Country, Team, Draft_Pick_Number, Draft_Class, College. player -> Player_ID, Player, Years_Pl... | show the position of players and the corresponding number of players. |
match_season | select position , count(*) from match_season group by position | Question: how many players played each position? | Tables: country -> Country_id, Country_name, Capital, Official_native_language. team -> Team_id, Name. match_season -> Season, Player, Position, Country, Team, Draft_Pick_Number, Draft_Class, College. player -> Player_ID, Player, Years_Played, Total_WL, Singles_WL, Dou... | how many players played each position? |
match_season | select country_name , count(*) from country as t1 join match_season as t2 on t1.country_id = t2.country group by t1.country_name | Question: show the country names and the corresponding number of players. | Tables: country -> Country_id, Country_name, Capital, Official_native_language. team -> Team_id, Name. match_season -> Season, Player, Position, Country, Team, Draft_Pick_Number, Draft_Class, College. player -> Player_ID, Player, Years_Played, ... | show the country names and the corresponding number of players. |
match_season | select country_name , count(*) from country as t1 join match_season as t2 on t1.country_id = t2.country group by t1.country_name | Question: how many players are from each country? | Tables: country -> Country_id, Country_name, Capital, Official_native_language. team -> Team_id, Name. match_season -> Season, Player, Position, Country, Team, Draft_Pick_Number, Draft_Class, College. player -> Player_ID, Player, Years_Played, Total_WL, Singles_WL, Do... | how many players are from each country? |
match_season | select player from match_season order by college asc | Question: return all players sorted by college in ascending alphabetical order. | Tables: country -> Country_id, Country_name, Capital, Official_native_language. team -> Team_id, Name. match_season -> Season, Player, Position, Country, Team, Draft_Pick_Number, Draft_Class, College. player -> Player_ID, Player, Years_Pl... | return all players sorted by college in ascending alphabetical order. |
match_season | select player from match_season order by college asc | Question: what are all the players who played in match season, sorted by college in ascending alphabetical order? | Tables: country -> Country_id, Country_name, Capital, Official_native_language. team -> Team_id, Name. match_season -> Season, Player, Position, Country, Team, Draft_Pick_Number, Draft_Class, College. pla... | what are all the players who played in match season, sorted by college in ascending alphabetical order? |
match_season | select position from match_season group by position order by count(*) desc limit 1 | Question: show the most common position of players in match seasons. | Tables: country -> Country_id, Country_name, Capital, Official_native_language. team -> Team_id, Name. match_season -> Season, Player, Position, Country, Team, Draft_Pick_Number, Draft_Class, College. player -> Player_ID, Player, Years_Played, Total... | show the most common position of players in match seasons. |
match_season | select position from match_season group by position order by count(*) desc limit 1 | Question: what is the position that is most common among players in match seasons? | Tables: country -> Country_id, Country_name, Capital, Official_native_language. team -> Team_id, Name. match_season -> Season, Player, Position, Country, Team, Draft_Pick_Number, Draft_Class, College. player -> Player_ID, Player, Years... | what is the position that is most common among players in match seasons? |
match_season | select college from match_season group by college order by count(*) desc limit 3 | Question: show the top 3 most common colleges of players in match seasons. | Tables: country -> Country_id, Country_name, Capital, Official_native_language. team -> Team_id, Name. match_season -> Season, Player, Position, Country, Team, Draft_Pick_Number, Draft_Class, College. player -> Player_ID, Player, Years_Played,... | show the top 3 most common colleges of players in match seasons. |
match_season | select college from match_season group by college order by count(*) desc limit 3 | Question: what are the three colleges from which the most players are from? | Tables: country -> Country_id, Country_name, Capital, Official_native_language. team -> Team_id, Name. match_season -> Season, Player, Position, Country, Team, Draft_Pick_Number, Draft_Class, College. player -> Player_ID, Player, Years_Played... | what are the three colleges from which the most players are from? |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.