db_id
stringlengths
4
31
SQL
stringlengths
18
1.45k
input_sequence
stringlengths
148
11k
question
stringlengths
16
325
poker_player
select t1.name from people as t1 join poker_player as t2 on t1.people_id = t2.people_id order by t2.earnings desc
Question: return the names of poker players sorted by their earnings descending. | Tables: poker_player -> Poker_Player_ID, People_ID, Final_Table_Made, Best_Finish, Money_Rank, Earnings. people -> People_ID, Nationality, Name, Birth_Date, Height. | Joins: poker_player.People_ID = people.People_ID,
return the names of poker players sorted by their earnings descending.
poker_player
select nationality , count(*) from people group by nationality
Question: what are different nationalities of people and the corresponding number of people from each nation? | Tables: poker_player -> Poker_Player_ID, People_ID, Final_Table_Made, Best_Finish, Money_Rank, Earnings. people -> People_ID, Nationality, Name, Birth_Date, Height. | Joins: poker_player.People_ID = people.Pe...
what are different nationalities of people and the corresponding number of people from each nation?
poker_player
select nationality , count(*) from people group by nationality
Question: how many people are there of each nationality? | Tables: poker_player -> Poker_Player_ID, People_ID, Final_Table_Made, Best_Finish, Money_Rank, Earnings. people -> People_ID, Nationality, Name, Birth_Date, Height. | Joins: poker_player.People_ID = people.People_ID,
how many people are there of each nationality?
poker_player
select nationality from people group by nationality order by count(*) desc limit 1
Question: what is the most common nationality of people? | Tables: poker_player -> Poker_Player_ID, People_ID, Final_Table_Made, Best_Finish, Money_Rank, Earnings. people -> People_ID, Nationality, Name, Birth_Date, Height. | Joins: poker_player.People_ID = people.People_ID,
what is the most common nationality of people?
poker_player
select nationality from people group by nationality order by count(*) desc limit 1
Question: give the nationality that is most common across all people. | Tables: poker_player -> Poker_Player_ID, People_ID, Final_Table_Made, Best_Finish, Money_Rank, Earnings. people -> People_ID, Nationality, Name, Birth_Date, Height. | Joins: poker_player.People_ID = people.People_ID,
give the nationality that is most common across all people.
poker_player
select nationality from people group by nationality having count(*) >= 2
Question: what are the nationalities that are shared by at least two people? | Tables: poker_player -> Poker_Player_ID, People_ID, Final_Table_Made, Best_Finish, Money_Rank, Earnings. people -> People_ID, Nationality, Name, Birth_Date, Height. | Joins: poker_player.People_ID = people.People_ID,
what are the nationalities that are shared by at least two people?
poker_player
select nationality from people group by nationality having count(*) >= 2
Question: return the nationalities for which there are two or more people. | Tables: poker_player -> Poker_Player_ID, People_ID, Final_Table_Made, Best_Finish, Money_Rank, Earnings. people -> People_ID, Nationality, Name, Birth_Date, Height. | Joins: poker_player.People_ID = people.People_ID,
return the nationalities for which there are two or more people.
poker_player
select name , birth_date from people order by name asc
Question: list the names and birth dates of people in ascending alphabetical order of name. | Tables: poker_player -> Poker_Player_ID, People_ID, Final_Table_Made, Best_Finish, Money_Rank, Earnings. people -> People_ID, Nationality, Name, Birth_Date, Height. | Joins: poker_player.People_ID = people.People_ID,
list the names and birth dates of people in ascending alphabetical order of name.
poker_player
select name , birth_date from people order by name asc
Question: what are the names and birth dates of people, ordered by their names in alphabetical order? | Tables: poker_player -> Poker_Player_ID, People_ID, Final_Table_Made, Best_Finish, Money_Rank, Earnings. people -> People_ID, Nationality, Name, Birth_Date, Height. | Joins: poker_player.People_ID = people.People_ID,
what are the names and birth dates of people, ordered by their names in alphabetical order?
poker_player
select name from people where nationality != 'russia'
Question: show names of people whose nationality is not 'russia'. | Tables: poker_player -> Poker_Player_ID, People_ID, Final_Table_Made, Best_Finish, Money_Rank, Earnings. people -> People_ID, Nationality, Name, Birth_Date, Height. | Joins: poker_player.People_ID = people.People_ID,
show names of people whose nationality is not 'russia'.
poker_player
select name from people where nationality != 'russia'
Question: what are the names of people who are not from russia? | Tables: poker_player -> Poker_Player_ID, People_ID, Final_Table_Made, Best_Finish, Money_Rank, Earnings. people -> People_ID, Nationality, Name, Birth_Date, Height. | Joins: poker_player.People_ID = people.People_ID,
what are the names of people who are not from russia?
poker_player
select name from people where people_id not in (select people_id from poker_player)
Question: list the names of people that are not poker players. | Tables: poker_player -> Poker_Player_ID, People_ID, Final_Table_Made, Best_Finish, Money_Rank, Earnings. people -> People_ID, Nationality, Name, Birth_Date, Height. | Joins: poker_player.People_ID = people.People_ID,
list the names of people that are not poker players.
poker_player
select name from people where people_id not in (select people_id from poker_player)
Question: what are the names of people who do not play poker? | Tables: poker_player -> Poker_Player_ID, People_ID, Final_Table_Made, Best_Finish, Money_Rank, Earnings. people -> People_ID, Nationality, Name, Birth_Date, Height. | Joins: poker_player.People_ID = people.People_ID,
what are the names of people who do not play poker?
poker_player
select count(distinct nationality) from people
Question: how many distinct nationalities are there? | Tables: poker_player -> Poker_Player_ID, People_ID, Final_Table_Made, Best_Finish, Money_Rank, Earnings. people -> People_ID, Nationality, Name, Birth_Date, Height. | Joins: poker_player.People_ID = people.People_ID,
how many distinct nationalities are there?
poker_player
select count(distinct nationality) from people
Question: count the number of different nationalities. | Tables: poker_player -> Poker_Player_ID, People_ID, Final_Table_Made, Best_Finish, Money_Rank, Earnings. people -> People_ID, Nationality, Name, Birth_Date, Height. | Joins: poker_player.People_ID = people.People_ID,
count the number of different nationalities.
voter_1
select count(*) from area_code_state
Question: how many states are there? | Tables: AREA_CODE_STATE -> area_code, state. CONTESTANTS -> contestant_number, contestant_name. VOTES -> vote_id, phone_number, state, contestant_number, created. | Joins: VOTES.contestant_number = CONTESTANTS.contestant_number, VOTES.state = AREA_CODE_STATE.state,
how many states are there?
voter_1
select contestant_number , contestant_name from contestants order by contestant_name desc
Question: list the contestant numbers and names, ordered by contestant name descending. | Tables: AREA_CODE_STATE -> area_code, state. CONTESTANTS -> contestant_number, contestant_name. VOTES -> vote_id, phone_number, state, contestant_number, created. | Joins: VOTES.contestant_number = CONTESTANTS.contestant_number, V...
list the contestant numbers and names, ordered by contestant name descending.
voter_1
select vote_id , phone_number , state from votes
Question: list the vote ids, phone numbers and states of all votes. | Tables: AREA_CODE_STATE -> area_code, state. CONTESTANTS -> contestant_number, contestant_name. VOTES -> vote_id, phone_number, state, contestant_number, created. | Joins: VOTES.contestant_number = CONTESTANTS.contestant_number, VOTES.state = AREA_CO...
list the vote ids, phone numbers and states of all votes.
voter_1
select max(area_code) , min(area_code) from area_code_state
Question: what are the maximum and minimum values of area codes? | Tables: AREA_CODE_STATE -> area_code, state. CONTESTANTS -> contestant_number, contestant_name. VOTES -> vote_id, phone_number, state, contestant_number, created. | Joins: VOTES.contestant_number = CONTESTANTS.contestant_number, VOTES.state = AREA_CODE_...
what are the maximum and minimum values of area codes?
voter_1
select max(created) from votes where state = 'ca'
Question: what is last date created of votes from the state 'ca'? | Tables: AREA_CODE_STATE -> area_code, state. CONTESTANTS -> contestant_number, contestant_name. VOTES -> vote_id, phone_number, state, contestant_number, created. | Joins: VOTES.contestant_number = CONTESTANTS.contestant_number, VOTES.state = AREA_CODE...
what is last date created of votes from the state 'ca'?
voter_1
select contestant_name from contestants where contestant_name != 'jessie alloway'
Question: what are the names of the contestants whose names are not 'jessie alloway' | Tables: AREA_CODE_STATE -> area_code, state. CONTESTANTS -> contestant_number, contestant_name. VOTES -> vote_id, phone_number, state, contestant_number, created. | Joins: VOTES.contestant_number = CONTESTANTS.contestant_number, VOTE...
what are the names of the contestants whose names are not 'jessie alloway'
voter_1
select distinct state , created from votes
Question: what are the distinct states and create time of all votes? | Tables: AREA_CODE_STATE -> area_code, state. CONTESTANTS -> contestant_number, contestant_name. VOTES -> vote_id, phone_number, state, contestant_number, created. | Joins: VOTES.contestant_number = CONTESTANTS.contestant_number, VOTES.state = AREA_C...
what are the distinct states and create time of all votes?
voter_1
select t1.contestant_number , t1.contestant_name from contestants as t1 join votes as t2 on t1.contestant_number = t2.contestant_number group by t1.contestant_number having count(*) >= 2
Question: what are the contestant numbers and names of the contestants who had at least two votes? | Tables: AREA_CODE_STATE -> area_code, state. CONTESTANTS -> contestant_number, contestant_name. VOTES -> vote_id, phone_number, state, contestant_number, created. | Joins: VOTES.contestant_number = CONTESTANTS.contestan...
what are the contestant numbers and names of the contestants who had at least two votes?
voter_1
select t1.contestant_number , t1.contestant_name from contestants as t1 join votes as t2 on t1.contestant_number = t2.contestant_number group by t1.contestant_number order by count(*) asc limit 1
Question: of all the contestants who got voted, what is the contestant number and name of the contestant who got least votes? | Tables: AREA_CODE_STATE -> area_code, state. CONTESTANTS -> contestant_number, contestant_name. VOTES -> vote_id, phone_number, state, contestant_number, created. | Joins: VOTES.contestant_num...
of all the contestants who got voted, what is the contestant number and name of the contestant who got least votes?
voter_1
select count(*) from votes where state = 'ny' or state = 'ca'
Question: what are the number of votes from state 'ny' or 'ca'? | Tables: AREA_CODE_STATE -> area_code, state. CONTESTANTS -> contestant_number, contestant_name. VOTES -> vote_id, phone_number, state, contestant_number, created. | Joins: VOTES.contestant_number = CONTESTANTS.contestant_number, VOTES.state = AREA_CODE_S...
what are the number of votes from state 'ny' or 'ca'?
voter_1
select count(*) from contestants where contestant_number not in ( select contestant_number from votes )
Question: how many contestants did not get voted? | Tables: AREA_CODE_STATE -> area_code, state. CONTESTANTS -> contestant_number, contestant_name. VOTES -> vote_id, phone_number, state, contestant_number, created. | Joins: VOTES.contestant_number = CONTESTANTS.contestant_number, VOTES.state = AREA_CODE_STATE.state,
how many contestants did not get voted?
voter_1
select t1.area_code from area_code_state as t1 join votes as t2 on t1.state = t2.state group by t1.area_code order by count(*) desc limit 1
Question: what is the area code in which the most voters voted? | Tables: AREA_CODE_STATE -> area_code, state. CONTESTANTS -> contestant_number, contestant_name. VOTES -> vote_id, phone_number, state, contestant_number, created. | Joins: VOTES.contestant_number = CONTESTANTS.contestant_number, VOTES.state = AREA_CODE_S...
what is the area code in which the most voters voted?
voter_1
select t2.created , t2.state , t2.phone_number from contestants as t1 join votes as t2 on t1.contestant_number = t2.contestant_number where t1.contestant_name = 'tabatha gehling'
Question: what are the create dates, states, and phone numbers of the votes that were for the contestant named 'tabatha gehling'? | Tables: AREA_CODE_STATE -> area_code, state. CONTESTANTS -> contestant_number, contestant_name. VOTES -> vote_id, phone_number, state, contestant_number, created. | Joins: VOTES.contestant...
what are the create dates, states, and phone numbers of the votes that were for the contestant named 'tabatha gehling'?
voter_1
select t3.area_code from contestants as t1 join votes as t2 on t1.contestant_number = t2.contestant_number join area_code_state as t3 on t2.state = t3.state where t1.contestant_name = 'tabatha gehling' intersect select t3.area_code from contestants as t1 join votes as t2 on t1.contestant_number = t2.contestant_...
Question: list the area codes in which voters voted both for the contestant 'tabatha gehling' and the contestant 'kelly clauss'. | Tables: AREA_CODE_STATE -> area_code, state. CONTESTANTS -> contestant_number, contestant_name. VOTES -> vote_id, phone_number, state, contestant_number, created. | Joins: VOTES.contestant_...
list the area codes in which voters voted both for the contestant 'tabatha gehling' and the contestant 'kelly clauss'.
voter_1
select contestant_name from contestants where contestant_name like '%al%'
Question: return the names of the contestants whose names contain the substring 'al' . | Tables: AREA_CODE_STATE -> area_code, state. CONTESTANTS -> contestant_number, contestant_name. VOTES -> vote_id, phone_number, state, contestant_number, created. | Joins: VOTES.contestant_number = CONTESTANTS.contestant_number, VO...
return the names of the contestants whose names contain the substring 'al' .
world_1
select name from country where indepyear > 1950
Question: what are the names of all the countries that became independent after 1950? | Tables: city -> ID, Name, CountryCode, District, Population. sqlite_sequence -> name, seq. country -> Code, Name, Continent, Region, SurfaceArea, IndepYear, Population, LifeExpectancy, GNP, GNPOld, LocalName, GovernmentForm, HeadOfS...
what are the names of all the countries that became independent after 1950?
world_1
select name from country where indepyear > 1950
Question: give the names of the nations that were founded after 1950. | Tables: city -> ID, Name, CountryCode, District, Population. sqlite_sequence -> name, seq. country -> Code, Name, Continent, Region, SurfaceArea, IndepYear, Population, LifeExpectancy, GNP, GNPOld, LocalName, GovernmentForm, HeadOfState, Capital, C...
give the names of the nations that were founded after 1950.
world_1
select count(*) from country where governmentform = 'republic'
Question: how many countries have a republic as their form of government? | Tables: city -> ID, Name, CountryCode, District, Population. sqlite_sequence -> name, seq. country -> Code, Name, Continent, Region, SurfaceArea, IndepYear, Population, LifeExpectancy, GNP, GNPOld, LocalName, GovernmentForm, HeadOfState, Capita...
how many countries have a republic as their form of government?
world_1
select count(*) from country where governmentform = 'republic'
Question: how many countries have governments that are republics? | Tables: city -> ID, Name, CountryCode, District, Population. sqlite_sequence -> name, seq. country -> Code, Name, Continent, Region, SurfaceArea, IndepYear, Population, LifeExpectancy, GNP, GNPOld, LocalName, GovernmentForm, HeadOfState, Capital, Code2...
how many countries have governments that are republics?
world_1
select sum(surfacearea) from country where region = 'caribbean'
Question: what is the total surface area of the countries in the caribbean region? | Tables: city -> ID, Name, CountryCode, District, Population. sqlite_sequence -> name, seq. country -> Code, Name, Continent, Region, SurfaceArea, IndepYear, Population, LifeExpectancy, GNP, GNPOld, LocalName, GovernmentForm, HeadOfStat...
what is the total surface area of the countries in the caribbean region?
world_1
select sum(surfacearea) from country where region = 'caribbean'
Question: how much surface area do the countires in the carribean cover together? | Tables: city -> ID, Name, CountryCode, District, Population. sqlite_sequence -> name, seq. country -> Code, Name, Continent, Region, SurfaceArea, IndepYear, Population, LifeExpectancy, GNP, GNPOld, LocalName, GovernmentForm, HeadOfState...
how much surface area do the countires in the carribean cover together?
world_1
select continent from country where name = 'anguilla'
Question: which continent is anguilla in? | Tables: city -> ID, Name, CountryCode, District, Population. sqlite_sequence -> name, seq. country -> Code, Name, Continent, Region, SurfaceArea, IndepYear, Population, LifeExpectancy, GNP, GNPOld, LocalName, GovernmentForm, HeadOfState, Capital, Code2. countrylanguage -> Cou...
which continent is anguilla in?
world_1
select continent from country where name = 'anguilla'
Question: what is the continent name which anguilla belongs to? | Tables: city -> ID, Name, CountryCode, District, Population. sqlite_sequence -> name, seq. country -> Code, Name, Continent, Region, SurfaceArea, IndepYear, Population, LifeExpectancy, GNP, GNPOld, LocalName, GovernmentForm, HeadOfState, Capital, Code2. ...
what is the continent name which anguilla belongs to?
world_1
select region from country as t1 join city as t2 on t1.code = t2.countrycode where t2.name = 'kabul'
Question: which region is the city kabul located in? | Tables: city -> ID, Name, CountryCode, District, Population. sqlite_sequence -> name, seq. country -> Code, Name, Continent, Region, SurfaceArea, IndepYear, Population, LifeExpectancy, GNP, GNPOld, LocalName, GovernmentForm, HeadOfState, Capital, Code2. countrylang...
which region is the city kabul located in?
world_1
select region from country as t1 join city as t2 on t1.code = t2.countrycode where t2.name = 'kabul'
Question: what region is kabul in? | Tables: city -> ID, Name, CountryCode, District, Population. sqlite_sequence -> name, seq. country -> Code, Name, Continent, Region, SurfaceArea, IndepYear, Population, LifeExpectancy, GNP, GNPOld, LocalName, GovernmentForm, HeadOfState, Capital, Code2. countrylanguage -> CountryCod...
what region is kabul in?
world_1
select t2.language from country as t1 join countrylanguage as t2 on t1.code = t2.countrycode where t1.name = 'aruba' order by percentage desc limit 1
Question: which language is the most popular in aruba? | Tables: city -> ID, Name, CountryCode, District, Population. sqlite_sequence -> name, seq. country -> Code, Name, Continent, Region, SurfaceArea, IndepYear, Population, LifeExpectancy, GNP, GNPOld, LocalName, GovernmentForm, HeadOfState, Capital, Code2. countryla...
which language is the most popular in aruba?
world_1
select t2.language from country as t1 join countrylanguage as t2 on t1.code = t2.countrycode where t1.name = 'aruba' order by percentage desc limit 1
Question: what language is predominantly spoken in aruba? | Tables: city -> ID, Name, CountryCode, District, Population. sqlite_sequence -> name, seq. country -> Code, Name, Continent, Region, SurfaceArea, IndepYear, Population, LifeExpectancy, GNP, GNPOld, LocalName, GovernmentForm, HeadOfState, Capital, Code2. countr...
what language is predominantly spoken in aruba?
world_1
select population , lifeexpectancy from country where name = 'brazil'
Question: what are the population and life expectancies in brazil? | Tables: city -> ID, Name, CountryCode, District, Population. sqlite_sequence -> name, seq. country -> Code, Name, Continent, Region, SurfaceArea, IndepYear, Population, LifeExpectancy, GNP, GNPOld, LocalName, GovernmentForm, HeadOfState, Capital, Code...
what are the population and life expectancies in brazil?
world_1
select population , lifeexpectancy from country where name = 'brazil'
Question: give me brazils population and life expectancies. | Tables: city -> ID, Name, CountryCode, District, Population. sqlite_sequence -> name, seq. country -> Code, Name, Continent, Region, SurfaceArea, IndepYear, Population, LifeExpectancy, GNP, GNPOld, LocalName, GovernmentForm, HeadOfState, Capital, Code2. coun...
give me brazils population and life expectancies.
world_1
select population , region from country where name = 'angola'
Question: what are the region and population of angola? | Tables: city -> ID, Name, CountryCode, District, Population. sqlite_sequence -> name, seq. country -> Code, Name, Continent, Region, SurfaceArea, IndepYear, Population, LifeExpectancy, GNP, GNPOld, LocalName, GovernmentForm, HeadOfState, Capital, Code2. countryl...
what are the region and population of angola?
world_1
select population , region from country where name = 'angola'
Question: what region does angola belong to and what is its population? | Tables: city -> ID, Name, CountryCode, District, Population. sqlite_sequence -> name, seq. country -> Code, Name, Continent, Region, SurfaceArea, IndepYear, Population, LifeExpectancy, GNP, GNPOld, LocalName, GovernmentForm, HeadOfState, Capital,...
what region does angola belong to and what is its population?
world_1
select avg(lifeexpectancy) from country where region = 'central africa'
Question: what is the average expected life expectancy for countries in the region of central africa? | Tables: city -> ID, Name, CountryCode, District, Population. sqlite_sequence -> name, seq. country -> Code, Name, Continent, Region, SurfaceArea, IndepYear, Population, LifeExpectancy, GNP, GNPOld, LocalName, Governm...
what is the average expected life expectancy for countries in the region of central africa?
world_1
select avg(lifeexpectancy) from country where region = 'central africa'
Question: how long is the peoples average life expectancy in central africa? | Tables: city -> ID, Name, CountryCode, District, Population. sqlite_sequence -> name, seq. country -> Code, Name, Continent, Region, SurfaceArea, IndepYear, Population, LifeExpectancy, GNP, GNPOld, LocalName, GovernmentForm, HeadOfState, Cap...
how long is the peoples average life expectancy in central africa?
world_1
select name from country where continent = 'asia' order by lifeexpectancy limit 1
Question: what is the name of country that has the shortest life expectancy in asia? | Tables: city -> ID, Name, CountryCode, District, Population. sqlite_sequence -> name, seq. country -> Code, Name, Continent, Region, SurfaceArea, IndepYear, Population, LifeExpectancy, GNP, GNPOld, LocalName, GovernmentForm, HeadOfSt...
what is the name of country that has the shortest life expectancy in asia?
world_1
select name from country where continent = 'asia' order by lifeexpectancy limit 1
Question: give the name of the country in asia with the lowest life expectancy. | Tables: city -> ID, Name, CountryCode, District, Population. sqlite_sequence -> name, seq. country -> Code, Name, Continent, Region, SurfaceArea, IndepYear, Population, LifeExpectancy, GNP, GNPOld, LocalName, GovernmentForm, HeadOfState, ...
give the name of the country in asia with the lowest life expectancy.
world_1
select sum(population) , max(gnp) from country where continent = 'asia'
Question: what is the total population and maximum gnp in asia? | Tables: city -> ID, Name, CountryCode, District, Population. sqlite_sequence -> name, seq. country -> Code, Name, Continent, Region, SurfaceArea, IndepYear, Population, LifeExpectancy, GNP, GNPOld, LocalName, GovernmentForm, HeadOfState, Capital, Code2. ...
what is the total population and maximum gnp in asia?
world_1
select sum(population) , max(gnp) from country where continent = 'asia'
Question: how many people live in asia, and what is the largest gnp among them? | Tables: city -> ID, Name, CountryCode, District, Population. sqlite_sequence -> name, seq. country -> Code, Name, Continent, Region, SurfaceArea, IndepYear, Population, LifeExpectancy, GNP, GNPOld, LocalName, GovernmentForm, HeadOfState, ...
how many people live in asia, and what is the largest gnp among them?
world_1
select avg(lifeexpectancy) from country where continent = 'africa' and governmentform = 'republic'
Question: what is the average life expectancy in african countries that are republics? | Tables: city -> ID, Name, CountryCode, District, Population. sqlite_sequence -> name, seq. country -> Code, Name, Continent, Region, SurfaceArea, IndepYear, Population, LifeExpectancy, GNP, GNPOld, LocalName, GovernmentForm, HeadOf...
what is the average life expectancy in african countries that are republics?
world_1
select avg(lifeexpectancy) from country where continent = 'africa' and governmentform = 'republic'
Question: give the average life expectancy for countries in africa which are republics? | Tables: city -> ID, Name, CountryCode, District, Population. sqlite_sequence -> name, seq. country -> Code, Name, Continent, Region, SurfaceArea, IndepYear, Population, LifeExpectancy, GNP, GNPOld, LocalName, GovernmentForm, HeadO...
give the average life expectancy for countries in africa which are republics?
world_1
select sum(surfacearea) from country where continent = 'asia' or continent = 'europe'
Question: what is the total surface area of the continents asia and europe? | Tables: city -> ID, Name, CountryCode, District, Population. sqlite_sequence -> name, seq. country -> Code, Name, Continent, Region, SurfaceArea, IndepYear, Population, LifeExpectancy, GNP, GNPOld, LocalName, GovernmentForm, HeadOfState, Capi...
what is the total surface area of the continents asia and europe?
world_1
select sum(surfacearea) from country where continent = 'asia' or continent = 'europe'
Question: give the total surface area covered by countries in asia or europe. | Tables: city -> ID, Name, CountryCode, District, Population. sqlite_sequence -> name, seq. country -> Code, Name, Continent, Region, SurfaceArea, IndepYear, Population, LifeExpectancy, GNP, GNPOld, LocalName, GovernmentForm, HeadOfState, Ca...
give the total surface area covered by countries in asia or europe.
world_1
select sum(population) from city where district = 'gelderland'
Question: how many people live in gelderland district? | Tables: city -> ID, Name, CountryCode, District, Population. sqlite_sequence -> name, seq. country -> Code, Name, Continent, Region, SurfaceArea, IndepYear, Population, LifeExpectancy, GNP, GNPOld, LocalName, GovernmentForm, HeadOfState, Capital, Code2. countryla...
how many people live in gelderland district?
world_1
select sum(population) from city where district = 'gelderland'
Question: what is the total population of gelderland district? | Tables: city -> ID, Name, CountryCode, District, Population. sqlite_sequence -> name, seq. country -> Code, Name, Continent, Region, SurfaceArea, IndepYear, Population, LifeExpectancy, GNP, GNPOld, LocalName, GovernmentForm, HeadOfState, Capital, Code2. c...
what is the total population of gelderland district?
world_1
select avg(gnp) , sum(population) from country where governmentform = 'us territory'
Question: what is the average gnp and total population in all nations whose government is us territory? | Tables: city -> ID, Name, CountryCode, District, Population. sqlite_sequence -> name, seq. country -> Code, Name, Continent, Region, SurfaceArea, IndepYear, Population, LifeExpectancy, GNP, GNPOld, LocalName, Gover...
what is the average gnp and total population in all nations whose government is us territory?
world_1
select avg(gnp) , sum(population) from country where governmentform = 'us territory'
Question: give the mean gnp and total population of nations which are considered us territory. | Tables: city -> ID, Name, CountryCode, District, Population. sqlite_sequence -> name, seq. country -> Code, Name, Continent, Region, SurfaceArea, IndepYear, Population, LifeExpectancy, GNP, GNPOld, LocalName, GovernmentForm...
give the mean gnp and total population of nations which are considered us territory.
world_1
select count(distinct language) from countrylanguage
Question: how many unique languages are spoken in the world? | Tables: city -> ID, Name, CountryCode, District, Population. sqlite_sequence -> name, seq. country -> Code, Name, Continent, Region, SurfaceArea, IndepYear, Population, LifeExpectancy, GNP, GNPOld, LocalName, GovernmentForm, HeadOfState, Capital, Code2. cou...
how many unique languages are spoken in the world?
world_1
select count(distinct language) from countrylanguage
Question: what is the number of distinct languages used around the world? | Tables: city -> ID, Name, CountryCode, District, Population. sqlite_sequence -> name, seq. country -> Code, Name, Continent, Region, SurfaceArea, IndepYear, Population, LifeExpectancy, GNP, GNPOld, LocalName, GovernmentForm, HeadOfState, Capita...
what is the number of distinct languages used around the world?
world_1
select count(distinct governmentform) from country where continent = 'africa'
Question: how many type of governments are in africa? | Tables: city -> ID, Name, CountryCode, District, Population. sqlite_sequence -> name, seq. country -> Code, Name, Continent, Region, SurfaceArea, IndepYear, Population, LifeExpectancy, GNP, GNPOld, LocalName, GovernmentForm, HeadOfState, Capital, Code2. countrylan...
how many type of governments are in africa?
world_1
select count(distinct governmentform) from country where continent = 'africa'
Question: how many different forms of governments are there in africa? | Tables: city -> ID, Name, CountryCode, District, Population. sqlite_sequence -> name, seq. country -> Code, Name, Continent, Region, SurfaceArea, IndepYear, Population, LifeExpectancy, GNP, GNPOld, LocalName, GovernmentForm, HeadOfState, Capital, ...
how many different forms of governments are there in africa?
world_1
select count(t2.language) from country as t1 join countrylanguage as t2 on t1.code = t2.countrycode where t1.name = 'aruba'
Question: what is the total number of languages used in aruba? | Tables: city -> ID, Name, CountryCode, District, Population. sqlite_sequence -> name, seq. country -> Code, Name, Continent, Region, SurfaceArea, IndepYear, Population, LifeExpectancy, GNP, GNPOld, LocalName, GovernmentForm, HeadOfState, Capital, Code2. c...
what is the total number of languages used in aruba?
world_1
select count(t2.language) from country as t1 join countrylanguage as t2 on t1.code = t2.countrycode where t1.name = 'aruba'
Question: how many languages are spoken in aruba? | Tables: city -> ID, Name, CountryCode, District, Population. sqlite_sequence -> name, seq. country -> Code, Name, Continent, Region, SurfaceArea, IndepYear, Population, LifeExpectancy, GNP, GNPOld, LocalName, GovernmentForm, HeadOfState, Capital, Code2. countrylanguag...
how many languages are spoken in aruba?
world_1
select count(*) from country as t1 join countrylanguage as t2 on t1.code = t2.countrycode where t1.name = 'afghanistan' and isofficial = 't'
Question: how many official languages does afghanistan have? | Tables: city -> ID, Name, CountryCode, District, Population. sqlite_sequence -> name, seq. country -> Code, Name, Continent, Region, SurfaceArea, IndepYear, Population, LifeExpectancy, GNP, GNPOld, LocalName, GovernmentForm, HeadOfState, Capital, Code2. cou...
how many official languages does afghanistan have?
world_1
select count(*) from country as t1 join countrylanguage as t2 on t1.code = t2.countrycode where t1.name = 'afghanistan' and isofficial = 't'
Question: how many official languages are spoken in afghanistan? | Tables: city -> ID, Name, CountryCode, District, Population. sqlite_sequence -> name, seq. country -> Code, Name, Continent, Region, SurfaceArea, IndepYear, Population, LifeExpectancy, GNP, GNPOld, LocalName, GovernmentForm, HeadOfState, Capital, Code2....
how many official languages are spoken in afghanistan?
world_1
select t1.name from country as t1 join countrylanguage as t2 on t1.code = t2.countrycode group by t1.name order by count(*) desc limit 1
Question: what is name of the country that speaks the largest number of languages? | Tables: city -> ID, Name, CountryCode, District, Population. sqlite_sequence -> name, seq. country -> Code, Name, Continent, Region, SurfaceArea, IndepYear, Population, LifeExpectancy, GNP, GNPOld, LocalName, GovernmentForm, HeadOfStat...
what is name of the country that speaks the largest number of languages?
world_1
select t1.name from country as t1 join countrylanguage as t2 on t1.code = t2.countrycode group by t1.name order by count(*) desc limit 1
Question: give the name of the nation that uses the greatest amount of languages. | Tables: city -> ID, Name, CountryCode, District, Population. sqlite_sequence -> name, seq. country -> Code, Name, Continent, Region, SurfaceArea, IndepYear, Population, LifeExpectancy, GNP, GNPOld, LocalName, GovernmentForm, HeadOfState...
give the name of the nation that uses the greatest amount of languages.
world_1
select t1.continent from country as t1 join countrylanguage as t2 on t1.code = t2.countrycode group by t1.continent order by count(*) desc limit 1
Question: which continent has the most diverse languages? | Tables: city -> ID, Name, CountryCode, District, Population. sqlite_sequence -> name, seq. country -> Code, Name, Continent, Region, SurfaceArea, IndepYear, Population, LifeExpectancy, GNP, GNPOld, LocalName, GovernmentForm, HeadOfState, Capital, Code2. countr...
which continent has the most diverse languages?
world_1
select t1.continent from country as t1 join countrylanguage as t2 on t1.code = t2.countrycode group by t1.continent order by count(*) desc limit 1
Question: which continent speaks the most languages? | Tables: city -> ID, Name, CountryCode, District, Population. sqlite_sequence -> name, seq. country -> Code, Name, Continent, Region, SurfaceArea, IndepYear, Population, LifeExpectancy, GNP, GNPOld, LocalName, GovernmentForm, HeadOfState, Capital, Code2. countrylang...
which continent speaks the most languages?
world_1
select count(*) from (select t1.name from country as t1 join countrylanguage as t2 on t1.code = t2.countrycode where t2.language = 'english' intersect select t1.name from country as t1 join countrylanguage as t2 on t1.code = t2.countrycode where t2.language = 'dutch')
Question: how many countries speak both english and dutch? | Tables: city -> ID, Name, CountryCode, District, Population. sqlite_sequence -> name, seq. country -> Code, Name, Continent, Region, SurfaceArea, IndepYear, Population, LifeExpectancy, GNP, GNPOld, LocalName, GovernmentForm, HeadOfState, Capital, Code2. count...
how many countries speak both english and dutch?
world_1
select count(*) from (select t1.name from country as t1 join countrylanguage as t2 on t1.code = t2.countrycode where t2.language = 'english' intersect select t1.name from country as t1 join countrylanguage as t2 on t1.code = t2.countrycode where t2.language = 'dutch')
Question: what is the number of nations that use english and dutch? | Tables: city -> ID, Name, CountryCode, District, Population. sqlite_sequence -> name, seq. country -> Code, Name, Continent, Region, SurfaceArea, IndepYear, Population, LifeExpectancy, GNP, GNPOld, LocalName, GovernmentForm, HeadOfState, Capital, Cod...
what is the number of nations that use english and dutch?
world_1
select t1.name from country as t1 join countrylanguage as t2 on t1.code = t2.countrycode where t2.language = 'english' intersect select t1.name from country as t1 join countrylanguage as t2 on t1.code = t2.countrycode where t2.language = 'french'
Question: what are the names of nations speak both english and french? | Tables: city -> ID, Name, CountryCode, District, Population. sqlite_sequence -> name, seq. country -> Code, Name, Continent, Region, SurfaceArea, IndepYear, Population, LifeExpectancy, GNP, GNPOld, LocalName, GovernmentForm, HeadOfState, Capital, ...
what are the names of nations speak both english and french?
world_1
select t1.name from country as t1 join countrylanguage as t2 on t1.code = t2.countrycode where t2.language = 'english' intersect select t1.name from country as t1 join countrylanguage as t2 on t1.code = t2.countrycode where t2.language = 'french'
Question: give the names of nations that speak both english and french. | Tables: city -> ID, Name, CountryCode, District, Population. sqlite_sequence -> name, seq. country -> Code, Name, Continent, Region, SurfaceArea, IndepYear, Population, LifeExpectancy, GNP, GNPOld, LocalName, GovernmentForm, HeadOfState, Capital,...
give the names of nations that speak both english and french.
world_1
select t1.name from country as t1 join countrylanguage as t2 on t1.code = t2.countrycode where t2.language = 'english' and t2.isofficial = 't' intersect select t1.name from country as t1 join countrylanguage as t2 on t1.code = t2.countrycode where t2.language = 'french' and t2.isofficial = 't'
Question: what are the names of nations where both english and french are official languages? | Tables: city -> ID, Name, CountryCode, District, Population. sqlite_sequence -> name, seq. country -> Code, Name, Continent, Region, SurfaceArea, IndepYear, Population, LifeExpectancy, GNP, GNPOld, LocalName, GovernmentForm,...
what are the names of nations where both english and french are official languages?
world_1
select t1.name from country as t1 join countrylanguage as t2 on t1.code = t2.countrycode where t2.language = 'english' and t2.isofficial = 't' intersect select t1.name from country as t1 join countrylanguage as t2 on t1.code = t2.countrycode where t2.language = 'french' and t2.isofficial = 't'
Question: give the names of countries with english and french as official languages. | Tables: city -> ID, Name, CountryCode, District, Population. sqlite_sequence -> name, seq. country -> Code, Name, Continent, Region, SurfaceArea, IndepYear, Population, LifeExpectancy, GNP, GNPOld, LocalName, GovernmentForm, HeadOfSt...
give the names of countries with english and french as official languages.
world_1
select count( distinct continent) from country as t1 join countrylanguage as t2 on t1.code = t2.countrycode where t2.language = 'chinese'
Question: what is the number of distinct continents where chinese is spoken? | Tables: city -> ID, Name, CountryCode, District, Population. sqlite_sequence -> name, seq. country -> Code, Name, Continent, Region, SurfaceArea, IndepYear, Population, LifeExpectancy, GNP, GNPOld, LocalName, GovernmentForm, HeadOfState, Cap...
what is the number of distinct continents where chinese is spoken?
world_1
select count( distinct continent) from country as t1 join countrylanguage as t2 on t1.code = t2.countrycode where t2.language = 'chinese'
Question: how many continents speak chinese? | Tables: city -> ID, Name, CountryCode, District, Population. sqlite_sequence -> name, seq. country -> Code, Name, Continent, Region, SurfaceArea, IndepYear, Population, LifeExpectancy, GNP, GNPOld, LocalName, GovernmentForm, HeadOfState, Capital, Code2. countrylanguage -> ...
how many continents speak chinese?
world_1
select distinct t1.region from country as t1 join countrylanguage as t2 on t1.code = t2.countrycode where t2.language = 'english' or t2.language = 'dutch'
Question: what are the regions that use english or dutch? | Tables: city -> ID, Name, CountryCode, District, Population. sqlite_sequence -> name, seq. country -> Code, Name, Continent, Region, SurfaceArea, IndepYear, Population, LifeExpectancy, GNP, GNPOld, LocalName, GovernmentForm, HeadOfState, Capital, Code2. countr...
what are the regions that use english or dutch?
world_1
select distinct t1.region from country as t1 join countrylanguage as t2 on t1.code = t2.countrycode where t2.language = 'english' or t2.language = 'dutch'
Question: which regions speak dutch or english? | Tables: city -> ID, Name, CountryCode, District, Population. sqlite_sequence -> name, seq. country -> Code, Name, Continent, Region, SurfaceArea, IndepYear, Population, LifeExpectancy, GNP, GNPOld, LocalName, GovernmentForm, HeadOfState, Capital, Code2. countrylanguage ...
which regions speak dutch or english?
world_1
select t1.name from country as t1 join countrylanguage as t2 on t1.code = t2.countrycode where t2.language = 'english' and isofficial = 't' union select t1.name from country as t1 join countrylanguage as t2 on t1.code = t2.countrycode where t2.language = 'dutch' and isofficial = 't'
Question: what are the countries where either english or dutch is the official language ? | Tables: city -> ID, Name, CountryCode, District, Population. sqlite_sequence -> name, seq. country -> Code, Name, Continent, Region, SurfaceArea, IndepYear, Population, LifeExpectancy, GNP, GNPOld, LocalName, GovernmentForm, Hea...
what are the countries where either english or dutch is the official language ?
world_1
select * from country as t1 join countrylanguage as t2 on t1.code = t2.countrycode where t2.language = 'english' and isofficial = 't' union select * from country as t1 join countrylanguage as t2 on t1.code = t2.countrycode where t2.language = 'dutch' and isofficial = 't'
Question: which countries have either english or dutch as an official language? | Tables: city -> ID, Name, CountryCode, District, Population. sqlite_sequence -> name, seq. country -> Code, Name, Continent, Region, SurfaceArea, IndepYear, Population, LifeExpectancy, GNP, GNPOld, LocalName, GovernmentForm, HeadOfState, ...
which countries have either english or dutch as an official language?
world_1
select t2.language from country as t1 join countrylanguage as t2 on t1.code = t2.countrycode where t1.continent = 'asia' group by t2.language order by count (*) desc limit 1
Question: which language is the most popular on the asian continent? | Tables: city -> ID, Name, CountryCode, District, Population. sqlite_sequence -> name, seq. country -> Code, Name, Continent, Region, SurfaceArea, IndepYear, Population, LifeExpectancy, GNP, GNPOld, LocalName, GovernmentForm, HeadOfState, Capital, Co...
which language is the most popular on the asian continent?
world_1
select t2.language from country as t1 join countrylanguage as t2 on t1.code = t2.countrycode where t1.continent = 'asia' group by t2.language order by count (*) desc limit 1
Question: what is the language that is used by the largest number of asian nations? | Tables: city -> ID, Name, CountryCode, District, Population. sqlite_sequence -> name, seq. country -> Code, Name, Continent, Region, SurfaceArea, IndepYear, Population, LifeExpectancy, GNP, GNPOld, LocalName, GovernmentForm, HeadOfSta...
what is the language that is used by the largest number of asian nations?
world_1
select t2.language from country as t1 join countrylanguage as t2 on t1.code = t2.countrycode where t1.governmentform = 'republic' group by t2.language having count(*) = 1
Question: which languages are spoken by only one country in republic governments? | Tables: city -> ID, Name, CountryCode, District, Population. sqlite_sequence -> name, seq. country -> Code, Name, Continent, Region, SurfaceArea, IndepYear, Population, LifeExpectancy, GNP, GNPOld, LocalName, GovernmentForm, HeadOfState...
which languages are spoken by only one country in republic governments?
world_1
select t2.language from country as t1 join countrylanguage as t2 on t1.code = t2.countrycode where t1.governmentform = 'republic' group by t2.language having count(*) = 1
Question: what languages are only used by a single country with a republic government? | Tables: city -> ID, Name, CountryCode, District, Population. sqlite_sequence -> name, seq. country -> Code, Name, Continent, Region, SurfaceArea, IndepYear, Population, LifeExpectancy, GNP, GNPOld, LocalName, GovernmentForm, HeadOf...
what languages are only used by a single country with a republic government?
world_1
select t1.name , t1.population from city as t1 join countrylanguage as t2 on t1.countrycode = t2.countrycode where t2.language = 'english' order by t1.population desc limit 1
Question: find the city with the largest population that uses english. | Tables: city -> ID, Name, CountryCode, District, Population. sqlite_sequence -> name, seq. country -> Code, Name, Continent, Region, SurfaceArea, IndepYear, Population, LifeExpectancy, GNP, GNPOld, LocalName, GovernmentForm, HeadOfState, Capital, ...
find the city with the largest population that uses english.
world_1
select t1.name , t1.population from city as t1 join countrylanguage as t2 on t1.countrycode = t2.countrycode where t2.language = 'english' order by t1.population desc limit 1
Question: what is the most populace city that speaks english? | Tables: city -> ID, Name, CountryCode, District, Population. sqlite_sequence -> name, seq. country -> Code, Name, Continent, Region, SurfaceArea, IndepYear, Population, LifeExpectancy, GNP, GNPOld, LocalName, GovernmentForm, HeadOfState, Capital, Code2. co...
what is the most populace city that speaks english?
world_1
select name , population , lifeexpectancy from country where continent = 'asia' order by surfacearea desc limit 1
Question: find the name, population and expected life length of asian country with the largest area? | Tables: city -> ID, Name, CountryCode, District, Population. sqlite_sequence -> name, seq. country -> Code, Name, Continent, Region, SurfaceArea, IndepYear, Population, LifeExpectancy, GNP, GNPOld, LocalName, Governme...
find the name, population and expected life length of asian country with the largest area?
world_1
select name , population , lifeexpectancy from country where continent = 'asia' order by surfacearea desc limit 1
Question: what are the name, population, and life expectancy of the largest asian country by land? | Tables: city -> ID, Name, CountryCode, District, Population. sqlite_sequence -> name, seq. country -> Code, Name, Continent, Region, SurfaceArea, IndepYear, Population, LifeExpectancy, GNP, GNPOld, LocalName, Government...
what are the name, population, and life expectancy of the largest asian country by land?
world_1
select avg(lifeexpectancy) from country where name not in (select t1.name from country as t1 join countrylanguage as t2 on t1.code = t2.countrycode where t2.language = 'english' and t2.isofficial = 't')
Question: what is average life expectancy in the countries where english is not the official language? | Tables: city -> ID, Name, CountryCode, District, Population. sqlite_sequence -> name, seq. country -> Code, Name, Continent, Region, SurfaceArea, IndepYear, Population, LifeExpectancy, GNP, GNPOld, LocalName, Govern...
what is average life expectancy in the countries where english is not the official language?
world_1
select avg(lifeexpectancy) from country where name not in (select t1.name from country as t1 join countrylanguage as t2 on t1.code = t2.countrycode where t2.language = 'english' and t2.isofficial = 't')
Question: give the mean life expectancy of countries in which english is not the official language. | Tables: city -> ID, Name, CountryCode, District, Population. sqlite_sequence -> name, seq. country -> Code, Name, Continent, Region, SurfaceArea, IndepYear, Population, LifeExpectancy, GNP, GNPOld, LocalName, Governmen...
give the mean life expectancy of countries in which english is not the official language.
world_1
select sum(population) from country where name not in (select t1.name from country as t1 join countrylanguage as t2 on t1.code = t2.countrycode where t2.language = 'english')
Question: what is the total number of people living in the nations that do not use english? | Tables: city -> ID, Name, CountryCode, District, Population. sqlite_sequence -> name, seq. country -> Code, Name, Continent, Region, SurfaceArea, IndepYear, Population, LifeExpectancy, GNP, GNPOld, LocalName, GovernmentForm, H...
what is the total number of people living in the nations that do not use english?
world_1
select sum(population) from country where name not in (select t1.name from country as t1 join countrylanguage as t2 on t1.code = t2.countrycode where t2.language = 'english')
Question: how many people live in countries that do not speak english? | Tables: city -> ID, Name, CountryCode, District, Population. sqlite_sequence -> name, seq. country -> Code, Name, Continent, Region, SurfaceArea, IndepYear, Population, LifeExpectancy, GNP, GNPOld, LocalName, GovernmentForm, HeadOfState, Capital, ...
how many people live in countries that do not speak english?
world_1
select t2.language from country as t1 join countrylanguage as t2 on t1.code = t2.countrycode where t1.headofstate = 'beatrix' and t2.isofficial = 't'
Question: what is the official language spoken in the country whose head of state is beatrix? | Tables: city -> ID, Name, CountryCode, District, Population. sqlite_sequence -> name, seq. country -> Code, Name, Continent, Region, SurfaceArea, IndepYear, Population, LifeExpectancy, GNP, GNPOld, LocalName, GovernmentForm,...
what is the official language spoken in the country whose head of state is beatrix?
world_1
select t2.language from country as t1 join countrylanguage as t2 on t1.code = t2.countrycode where t1.headofstate = 'beatrix' and t2.isofficial = 't'
Question: what is the official language used in the country the name of whose head of state is beatrix. | Tables: city -> ID, Name, CountryCode, District, Population. sqlite_sequence -> name, seq. country -> Code, Name, Continent, Region, SurfaceArea, IndepYear, Population, LifeExpectancy, GNP, GNPOld, LocalName, Gover...
what is the official language used in the country the name of whose head of state is beatrix.
world_1
select count(distinct t2.language) from country as t1 join countrylanguage as t2 on t1.code = t2.countrycode where indepyear < 1930 and t2.isofficial = 't'
Question: what is the total number of unique official languages spoken in the countries that are founded before 1930? | Tables: city -> ID, Name, CountryCode, District, Population. sqlite_sequence -> name, seq. country -> Code, Name, Continent, Region, SurfaceArea, IndepYear, Population, LifeExpectancy, GNP, GNPOld, Lo...
what is the total number of unique official languages spoken in the countries that are founded before 1930?
world_1
select count(distinct t2.language) from country as t1 join countrylanguage as t2 on t1.code = t2.countrycode where indepyear < 1930 and t2.isofficial = 't'
Question: for the countries founded before 1930, what is the total number of distinct official languages? | Tables: city -> ID, Name, CountryCode, District, Population. sqlite_sequence -> name, seq. country -> Code, Name, Continent, Region, SurfaceArea, IndepYear, Population, LifeExpectancy, GNP, GNPOld, LocalName, Gov...
for the countries founded before 1930, what is the total number of distinct official languages?