db_id
stringclasses 20
values | question
stringlengths 18
174
| db_info
stringclasses 20
values | ground_truth
stringlengths 20
474
|
---|---|---|---|
voter_1 | List the area codes in which voters voted both for the contestant 'Tabatha Gehling' and the contestant 'Kelly Clauss'. | # area_code_state ( area_code , state )
# contestants ( contestant_number , contestant_name )
# votes ( vote_id , phone_number , state , contestant_number , created )
# votes.contestant_number = contestants.contestant_number
# votes.state = area_code_state.state
| select area_code_state.area_code from contestants join votes on contestants.contestant_number = votes.contestant_number join area_code_state on votes.state = area_code_state.state where contestants.contestant_name = 'Tabatha Gehling' intersect select area_code_state.area_code from contestants join votes on contestants.contestant_number = votes.contestant_number join area_code_state on votes.state = area_code_state.state where contestants.contestant_name = 'Kelly Clauss' |
voter_1 | Return the names of the contestants whose names contain the substring 'Al' . | # area_code_state ( area_code , state )
# contestants ( contestant_number , contestant_name )
# votes ( vote_id , phone_number , state , contestant_number , created )
# votes.contestant_number = contestants.contestant_number
# votes.state = area_code_state.state
| select contestant_name from contestants where contestant_name like '%al%' |
world_1 | What are the names of all the countries that became independent after 1950? | # 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 ( countrycode , language , isofficial , percentage )
# city.countrycode = country.code
# countrylanguage.countrycode = country.code
| select name from country where indepyear > 1950 |
world_1 | Give the names of the nations that were founded after 1950. | # 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 ( countrycode , language , isofficial , percentage )
# city.countrycode = country.code
# countrylanguage.countrycode = country.code
| select name from country where indepyear > 1950 |
world_1 | How many countries have a republic as their form of government? | # 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 ( countrycode , language , isofficial , percentage )
# city.countrycode = country.code
# countrylanguage.countrycode = country.code
| select count ( * ) from country where governmentform = 'Republic' |
world_1 | How many countries have governments that are republics? | # 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 ( countrycode , language , isofficial , percentage )
# city.countrycode = country.code
# countrylanguage.countrycode = country.code
| select count ( * ) from country where governmentform = 'Republic' |
world_1 | What is the total surface area of the countries in the Caribbean region? | # 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 ( countrycode , language , isofficial , percentage )
# city.countrycode = country.code
# countrylanguage.countrycode = country.code
| select sum ( surfacearea ) from country where region = 'Caribbean' |
world_1 | How much surface area do the countires in the Carribean cover together? | # 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 ( countrycode , language , isofficial , percentage )
# city.countrycode = country.code
# countrylanguage.countrycode = country.code
| select sum ( surfacearea ) from country where region = 'Caribbean' |
world_1 | Which continent is Anguilla in? | # 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 ( countrycode , language , isofficial , percentage )
# city.countrycode = country.code
# countrylanguage.countrycode = country.code
| select continent from country where name = 'Anguilla' |
world_1 | What is the continent name which Anguilla belongs to? | # 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 ( countrycode , language , isofficial , percentage )
# city.countrycode = country.code
# countrylanguage.countrycode = country.code
| select continent from country where name = 'Anguilla' |
world_1 | Which region is the city Kabul located in? | # 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 ( countrycode , language , isofficial , percentage )
# city.countrycode = country.code
# countrylanguage.countrycode = country.code
| select region from country join city on country.code = city.countrycode where city.name = 'Kabul' |
world_1 | What region is Kabul in? | # 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 ( countrycode , language , isofficial , percentage )
# city.countrycode = country.code
# countrylanguage.countrycode = country.code
| select region from country join city on country.code = city.countrycode where city.name = 'Kabul' |
world_1 | Which language is the most popular in Aruba? | # 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 ( countrycode , language , isofficial , percentage )
# city.countrycode = country.code
# countrylanguage.countrycode = country.code
| select countrylanguage.language from country join countrylanguage on country.code = countrylanguage.countrycode where country.name = 'Aruba' order by percentage desc limit 1 |
world_1 | What language is predominantly spoken in Aruba? | # 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 ( countrycode , language , isofficial , percentage )
# city.countrycode = country.code
# countrylanguage.countrycode = country.code
| select countrylanguage.language from country join countrylanguage on country.code = countrylanguage.countrycode where country.name = 'Aruba' order by percentage desc limit 1 |
world_1 | What are the population and life expectancies in Brazil? | # 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 ( countrycode , language , isofficial , percentage )
# city.countrycode = country.code
# countrylanguage.countrycode = country.code
| select population , lifeexpectancy from country where name = 'Brazil' |
world_1 | Give me Brazil's population and life expectancies. | # 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 ( countrycode , language , isofficial , percentage )
# city.countrycode = country.code
# countrylanguage.countrycode = country.code
| select population , lifeexpectancy from country where name = 'Brazil' |
world_1 | What are the region and population of Angola? | # 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 ( countrycode , language , isofficial , percentage )
# city.countrycode = country.code
# countrylanguage.countrycode = country.code
| select population , region from country where name = 'Angola' |
world_1 | What region does Angola belong to and what is its population? | # 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 ( countrycode , language , isofficial , percentage )
# city.countrycode = country.code
# countrylanguage.countrycode = country.code
| select population , region from country where name = 'Angola' |
world_1 | What is the average expected life expectancy for countries in the region of Central Africa? | # 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 ( countrycode , language , isofficial , percentage )
# city.countrycode = country.code
# countrylanguage.countrycode = country.code
| select avg ( lifeexpectancy ) from country where region = 'Central Africa' |
world_1 | How long is the people's average life expectancy in Central Africa? | # 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 ( countrycode , language , isofficial , percentage )
# city.countrycode = country.code
# countrylanguage.countrycode = country.code
| select avg ( lifeexpectancy ) from country where region = 'Central Africa' |
world_1 | What is the name of country that has the shortest life expectancy in Asia? | # 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 ( countrycode , language , isofficial , percentage )
# city.countrycode = country.code
# countrylanguage.countrycode = country.code
| select name from country where continent = 'Asia' order by lifeexpectancy asc limit 1 |
world_1 | Give the name of the country in Asia with the lowest life expectancy. | # 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 ( countrycode , language , isofficial , percentage )
# city.countrycode = country.code
# countrylanguage.countrycode = country.code
| select name from country where continent = 'Asia' order by lifeexpectancy asc limit 1 |
world_1 | What is the total population and maximum GNP in Asia? | # 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 ( countrycode , language , isofficial , percentage )
# city.countrycode = country.code
# countrylanguage.countrycode = country.code
| select sum ( population ) , max ( gnp ) from country where continent = 'Asia' |
world_1 | How many people live in Asia, and what is the largest GNP among them? | # 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 ( countrycode , language , isofficial , percentage )
# city.countrycode = country.code
# countrylanguage.countrycode = country.code
| select sum ( population ) , max ( gnp ) from country where continent = 'Asia' |
world_1 | What is the average life expectancy in African countries that are republics? | # 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 ( countrycode , language , isofficial , percentage )
# city.countrycode = country.code
# countrylanguage.countrycode = country.code
| select avg ( lifeexpectancy ) from country where continent = 'Africa' and governmentform = 'Republic' |
world_1 | Give the average life expectancy for countries in Africa which are republics? | # 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 ( countrycode , language , isofficial , percentage )
# city.countrycode = country.code
# countrylanguage.countrycode = country.code
| select avg ( lifeexpectancy ) from country where continent = 'Africa' and governmentform = 'Republic' |
world_1 | What is the total surface area of the continents Asia and Europe? | # 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 ( countrycode , language , isofficial , percentage )
# city.countrycode = country.code
# countrylanguage.countrycode = country.code
| select sum ( surfacearea ) from country where continent = 'Asia' or continent = 'Europe' |
world_1 | Give the total surface area covered by countries in Asia or Europe. | # 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 ( countrycode , language , isofficial , percentage )
# city.countrycode = country.code
# countrylanguage.countrycode = country.code
| select sum ( surfacearea ) from country where continent = 'Asia' or continent = 'Europe' |
world_1 | How many people live in Gelderland district? | # 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 ( countrycode , language , isofficial , percentage )
# city.countrycode = country.code
# countrylanguage.countrycode = country.code
| select sum ( population ) from city where district = 'Gelderland' |
world_1 | What is the total population of Gelderland district? | # 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 ( countrycode , language , isofficial , percentage )
# city.countrycode = country.code
# countrylanguage.countrycode = country.code
| select sum ( population ) from city where district = 'Gelderland' |
world_1 | What is the average GNP and total population in all nations whose government is US territory? | # 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 ( countrycode , language , isofficial , percentage )
# city.countrycode = country.code
# countrylanguage.countrycode = country.code
| select avg ( gnp ) , sum ( population ) from country where governmentform = 'US Territory' |
world_1 | Give the mean GNP and total population of nations which are considered US territory. | # 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 ( countrycode , language , isofficial , percentage )
# city.countrycode = country.code
# countrylanguage.countrycode = country.code
| select avg ( gnp ) , sum ( population ) from country where governmentform = 'US Territory' |
world_1 | How many unique languages are spoken in the world? | # 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 ( countrycode , language , isofficial , percentage )
# city.countrycode = country.code
# countrylanguage.countrycode = country.code
| select count ( distinct language ) from countrylanguage |
world_1 | What is the number of distinct languages used around the world? | # 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 ( countrycode , language , isofficial , percentage )
# city.countrycode = country.code
# countrylanguage.countrycode = country.code
| select count ( distinct language ) from countrylanguage |
world_1 | How many type of governments are in Africa? | # 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 ( countrycode , language , isofficial , percentage )
# city.countrycode = country.code
# countrylanguage.countrycode = country.code
| select count ( distinct governmentform ) from country where continent = 'Africa' |
world_1 | How many different forms of governments are there in Africa? | # 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 ( countrycode , language , isofficial , percentage )
# city.countrycode = country.code
# countrylanguage.countrycode = country.code
| select count ( distinct governmentform ) from country where continent = 'Africa' |
world_1 | What is the total number of languages used in Aruba? | # 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 ( countrycode , language , isofficial , percentage )
# city.countrycode = country.code
# countrylanguage.countrycode = country.code
| select count ( countrylanguage.language ) from country join countrylanguage on country.code = countrylanguage.countrycode where country.name = 'Aruba' |
world_1 | How many languages are spoken in Aruba? | # 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 ( countrycode , language , isofficial , percentage )
# city.countrycode = country.code
# countrylanguage.countrycode = country.code
| select count ( countrylanguage.language ) from country join countrylanguage on country.code = countrylanguage.countrycode where country.name = 'Aruba' |
world_1 | How many official languages does Afghanistan have? | # 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 ( countrycode , language , isofficial , percentage )
# city.countrycode = country.code
# countrylanguage.countrycode = country.code
| select count ( * ) from country join countrylanguage on country.code = countrylanguage.countrycode where country.name = 'Afghanistan' and isofficial = 'T' |
world_1 | How many official languages are spoken in Afghanistan? | # 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 ( countrycode , language , isofficial , percentage )
# city.countrycode = country.code
# countrylanguage.countrycode = country.code
| select count ( * ) from country join countrylanguage on country.code = countrylanguage.countrycode where country.name = 'Afghanistan' and isofficial = 'T' |
world_1 | What is name of the country that speaks the largest number of languages? | # 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 ( countrycode , language , isofficial , percentage )
# city.countrycode = country.code
# countrylanguage.countrycode = country.code
| select country.name from country join countrylanguage on country.code = countrylanguage.countrycode group by country.name order by count ( * ) desc limit 1 |
world_1 | Give the name of the nation that uses the greatest amount of languages. | # 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 ( countrycode , language , isofficial , percentage )
# city.countrycode = country.code
# countrylanguage.countrycode = country.code
| select country.name from country join countrylanguage on country.code = countrylanguage.countrycode group by country.name order by count ( * ) desc limit 1 |
world_1 | Which continent has the most diverse languages? | # 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 ( countrycode , language , isofficial , percentage )
# city.countrycode = country.code
# countrylanguage.countrycode = country.code
| select country.continent from country join countrylanguage on country.code = countrylanguage.countrycode group by country.continent order by count ( * ) desc limit 1 |
world_1 | Which continent speaks the most languages? | # 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 ( countrycode , language , isofficial , percentage )
# city.countrycode = country.code
# countrylanguage.countrycode = country.code
| select country.continent from country join countrylanguage on country.code = countrylanguage.countrycode group by country.continent order by count ( * ) desc limit 1 |
world_1 | How many countries speak both English and Dutch? | # 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 ( countrycode , language , isofficial , percentage )
# city.countrycode = country.code
# countrylanguage.countrycode = country.code
| select count ( * ) from ( select country.name from country join countrylanguage on country.code = countrylanguage.countrycode where countrylanguage.language = 'English' intersect select country.name from country join countrylanguage on country.code = countrylanguage.countrycode where countrylanguage.language = 'Dutch' ) |
world_1 | What is the number of nations that use English and Dutch? | # 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 ( countrycode , language , isofficial , percentage )
# city.countrycode = country.code
# countrylanguage.countrycode = country.code
| select count ( * ) from ( select country.name from country join countrylanguage on country.code = countrylanguage.countrycode where countrylanguage.language = 'English' intersect select country.name from country join countrylanguage on country.code = countrylanguage.countrycode where countrylanguage.language = 'Dutch' ) |
world_1 | What are the names of nations speak both English and French? | # 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 ( countrycode , language , isofficial , percentage )
# city.countrycode = country.code
# countrylanguage.countrycode = country.code
| select country.name from country join countrylanguage on country.code = countrylanguage.countrycode where countrylanguage.language = 'English' intersect select country.name from country join countrylanguage on country.code = countrylanguage.countrycode where countrylanguage.language = 'French' |
world_1 | Give the names of nations that speak both English and French. | # 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 ( countrycode , language , isofficial , percentage )
# city.countrycode = country.code
# countrylanguage.countrycode = country.code
| select country.name from country join countrylanguage on country.code = countrylanguage.countrycode where countrylanguage.language = 'English' intersect select country.name from country join countrylanguage on country.code = countrylanguage.countrycode where countrylanguage.language = 'French' |
world_1 | What are the names of nations where both English and French are official languages? | # 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 ( countrycode , language , isofficial , percentage )
# city.countrycode = country.code
# countrylanguage.countrycode = country.code
| select country.name from country join countrylanguage on country.code = countrylanguage.countrycode where countrylanguage.language = 'English' and countrylanguage.isofficial = 'T' intersect select country.name from country join countrylanguage on country.code = countrylanguage.countrycode where countrylanguage.language = 'French' and countrylanguage.isofficial = 'T' |
world_1 | Give the names of countries with English and French as official languages. | # 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 ( countrycode , language , isofficial , percentage )
# city.countrycode = country.code
# countrylanguage.countrycode = country.code
| select country.name from country join countrylanguage on country.code = countrylanguage.countrycode where countrylanguage.language = 'English' and countrylanguage.isofficial = 'T' intersect select country.name from country join countrylanguage on country.code = countrylanguage.countrycode where countrylanguage.language = 'French' and countrylanguage.isofficial = 'T' |
world_1 | What is the number of distinct continents where Chinese is spoken? | # 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 ( countrycode , language , isofficial , percentage )
# city.countrycode = country.code
# countrylanguage.countrycode = country.code
| select count ( distinct continent ) from country join countrylanguage on country.code = countrylanguage.countrycode where countrylanguage.language = 'Chinese' |
world_1 | How many continents speak Chinese? | # 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 ( countrycode , language , isofficial , percentage )
# city.countrycode = country.code
# countrylanguage.countrycode = country.code
| select count ( distinct continent ) from country join countrylanguage on country.code = countrylanguage.countrycode where countrylanguage.language = 'Chinese' |
world_1 | What are the regions that use English or Dutch? | # 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 ( countrycode , language , isofficial , percentage )
# city.countrycode = country.code
# countrylanguage.countrycode = country.code
| select distinct country.region from country join countrylanguage on country.code = countrylanguage.countrycode where countrylanguage.language = 'English' or countrylanguage.language = 'Dutch' |
world_1 | Which regions speak Dutch or English? | # 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 ( countrycode , language , isofficial , percentage )
# city.countrycode = country.code
# countrylanguage.countrycode = country.code
| select distinct country.region from country join countrylanguage on country.code = countrylanguage.countrycode where countrylanguage.language = 'English' or countrylanguage.language = 'Dutch' |
world_1 | What are the countries where either English or Dutch is the official language ? | # 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 ( countrycode , language , isofficial , percentage )
# city.countrycode = country.code
# countrylanguage.countrycode = country.code
| select country.name from country join countrylanguage on country.code = countrylanguage.countrycode where countrylanguage.language = 'english' and isofficial = 't' union select country.name from country join countrylanguage on country.code = countrylanguage.countrycode where countrylanguage.language = 'dutch' and isofficial = 't' |
world_1 | Which countries have either English or Dutch as an official language? | # 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 ( countrycode , language , isofficial , percentage )
# city.countrycode = country.code
# countrylanguage.countrycode = country.code
| select * from country join countrylanguage on country.code = countrylanguage.countrycode where countrylanguage.language = 'English' and isofficial = 'T' union select * from country join countrylanguage on country.code = countrylanguage.countrycode where countrylanguage.language = 'Dutch' and isofficial = 'T' |
world_1 | Which language is the most popular on the Asian continent? | # 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 ( countrycode , language , isofficial , percentage )
# city.countrycode = country.code
# countrylanguage.countrycode = country.code
| select countrylanguage.language from country join countrylanguage on country.code = countrylanguage.countrycode where country.continent = 'Asia' group by countrylanguage.language order by count ( * ) desc limit 1 |
world_1 | What is the language that is used by the largest number of Asian nations? | # 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 ( countrycode , language , isofficial , percentage )
# city.countrycode = country.code
# countrylanguage.countrycode = country.code
| select countrylanguage.language from country join countrylanguage on country.code = countrylanguage.countrycode where country.continent = 'Asia' group by countrylanguage.language order by count ( * ) desc limit 1 |
world_1 | Which languages are spoken by only one country in republic governments? | # 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 ( countrycode , language , isofficial , percentage )
# city.countrycode = country.code
# countrylanguage.countrycode = country.code
| select countrylanguage.language from country join countrylanguage on country.code = countrylanguage.countrycode where country.governmentform = 'Republic' group by countrylanguage.language having count ( * ) = 1 |
world_1 | What languages are only used by a single country with a republic government? | # 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 ( countrycode , language , isofficial , percentage )
# city.countrycode = country.code
# countrylanguage.countrycode = country.code
| select countrylanguage.language from country join countrylanguage on country.code = countrylanguage.countrycode where country.governmentform = 'Republic' group by countrylanguage.language having count ( * ) = 1 |
world_1 | Find the city with the largest population that uses English. | # 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 ( countrycode , language , isofficial , percentage )
# city.countrycode = country.code
# countrylanguage.countrycode = country.code
| select city.name , city.population from city join countrylanguage on city.countrycode = countrylanguage.countrycode where countrylanguage.language = 'English' order by city.population desc limit 1 |
world_1 | What is the most populace city that speaks English? | # 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 ( countrycode , language , isofficial , percentage )
# city.countrycode = country.code
# countrylanguage.countrycode = country.code
| select city.name , city.population from city join countrylanguage on city.countrycode = countrylanguage.countrycode where countrylanguage.language = 'English' order by city.population desc limit 1 |
world_1 | Find the name, population and expected life length of asian country with the largest area? | # 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 ( countrycode , language , isofficial , percentage )
# city.countrycode = country.code
# countrylanguage.countrycode = country.code
| select name , population , lifeexpectancy from country where continent = 'Asia' order by surfacearea desc limit 1 |
world_1 | What are the name, population, and life expectancy of the largest Asian country by land? | # 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 ( countrycode , language , isofficial , percentage )
# city.countrycode = country.code
# countrylanguage.countrycode = country.code
| select name , population , lifeexpectancy from country where continent = 'Asia' order by surfacearea desc limit 1 |
world_1 | What is average life expectancy in the countries where English is not the official language? | # 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 ( countrycode , language , isofficial , percentage )
# city.countrycode = country.code
# countrylanguage.countrycode = country.code
| select avg ( lifeexpectancy ) from country where name not in ( select country.name from country join countrylanguage on country.code = countrylanguage.countrycode where countrylanguage.language = 'English' and countrylanguage.isofficial = 'T' ) |
world_1 | Give the mean life expectancy of countries in which English is not the official language. | # 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 ( countrycode , language , isofficial , percentage )
# city.countrycode = country.code
# countrylanguage.countrycode = country.code
| select avg ( lifeexpectancy ) from country where name not in ( select country.name from country join countrylanguage on country.code = countrylanguage.countrycode where countrylanguage.language = 'English' and countrylanguage.isofficial = 'T' ) |
world_1 | What is the total number of people living in the nations that do not use English? | # 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 ( countrycode , language , isofficial , percentage )
# city.countrycode = country.code
# countrylanguage.countrycode = country.code
| select sum ( population ) from country where name not in ( select country.name from country join countrylanguage on country.code = countrylanguage.countrycode where countrylanguage.language = 'English' ) |
world_1 | How many people live in countries that do not speak English? | # 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 ( countrycode , language , isofficial , percentage )
# city.countrycode = country.code
# countrylanguage.countrycode = country.code
| select sum ( population ) from country where name not in ( select country.name from country join countrylanguage on country.code = countrylanguage.countrycode where countrylanguage.language = 'English' ) |
world_1 | What is the official language spoken in the country whose head of state is Beatrix? | # 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 ( countrycode , language , isofficial , percentage )
# city.countrycode = country.code
# countrylanguage.countrycode = country.code
| select countrylanguage.language from country join countrylanguage on country.code = countrylanguage.countrycode where country.headofstate = 'Beatrix' and countrylanguage.isofficial = 'T' |
world_1 | What is the official language used in the country the name of whose head of state is Beatrix. | # 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 ( countrycode , language , isofficial , percentage )
# city.countrycode = country.code
# countrylanguage.countrycode = country.code
| select countrylanguage.language from country join countrylanguage on country.code = countrylanguage.countrycode where country.headofstate = 'Beatrix' and countrylanguage.isofficial = 'T' |
world_1 | What is the total number of unique official languages spoken in the countries that are founded before 1930? | # 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 ( countrycode , language , isofficial , percentage )
# city.countrycode = country.code
# countrylanguage.countrycode = country.code
| select count ( distinct countrylanguage.language ) from country join countrylanguage on country.code = countrylanguage.countrycode where indepyear < 1930 and countrylanguage.isofficial = 'T' |
world_1 | For the countries founded before 1930, what is the total number of distinct official languages? | # 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 ( countrycode , language , isofficial , percentage )
# city.countrycode = country.code
# countrylanguage.countrycode = country.code
| select count ( distinct countrylanguage.language ) from country join countrylanguage on country.code = countrylanguage.countrycode where indepyear < 1930 and countrylanguage.isofficial = 'T' |
world_1 | What are the countries that have greater surface area than any country in Europe? | # 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 ( countrycode , language , isofficial , percentage )
# city.countrycode = country.code
# countrylanguage.countrycode = country.code
| select name from country where surfacearea > ( select min ( surfacearea ) from country where continent = 'Europe' ) |
world_1 | Which countries have greater area than that of any country in Europe? | # 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 ( countrycode , language , isofficial , percentage )
# city.countrycode = country.code
# countrylanguage.countrycode = country.code
| select name from country where surfacearea > ( select min ( surfacearea ) from country where continent = 'Europe' ) |
world_1 | What are the African countries that have a population less than any country in Asia? | # 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 ( countrycode , language , isofficial , percentage )
# city.countrycode = country.code
# countrylanguage.countrycode = country.code
| select name from country where continent = 'Africa' and population < ( select max ( population ) from country where continent = 'Asia' ) |
world_1 | Which African countries have a smaller population than that of any country in Asia? | # 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 ( countrycode , language , isofficial , percentage )
# city.countrycode = country.code
# countrylanguage.countrycode = country.code
| select name from country where continent = 'Africa' and population < ( select min ( population ) from country where continent = 'Asia' ) |
world_1 | Which Asian countries have a population that is larger than any country in Africa? | # 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 ( countrycode , language , isofficial , percentage )
# city.countrycode = country.code
# countrylanguage.countrycode = country.code
| select name from country where continent = 'Asia' and population > ( select max ( population ) from country where continent = 'Africa' ) |
world_1 | What are the Asian countries which have a population larger than that of any country in Africa? | # 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 ( countrycode , language , isofficial , percentage )
# city.countrycode = country.code
# countrylanguage.countrycode = country.code
| select name from country where continent = 'Asia' and population > ( select min ( population ) from country where continent = 'Africa' ) |
world_1 | What are the country codes for countries that do not speak English? | # 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 ( countrycode , language , isofficial , percentage )
# city.countrycode = country.code
# countrylanguage.countrycode = country.code
| select countrycode from countrylanguage except select countrycode from countrylanguage where language = 'English' |
world_1 | Return the country codes for countries that do not speak English. | # 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 ( countrycode , language , isofficial , percentage )
# city.countrycode = country.code
# countrylanguage.countrycode = country.code
| select countrycode from countrylanguage except select countrycode from countrylanguage where language = 'English' |
world_1 | What are the country codes of countries where people use languages other than English? | # 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 ( countrycode , language , isofficial , percentage )
# city.countrycode = country.code
# countrylanguage.countrycode = country.code
| select distinct countrycode from countrylanguage where language != 'English' |
world_1 | Give the country codes for countries in which people speak langauges that are not English. | # 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 ( countrycode , language , isofficial , percentage )
# city.countrycode = country.code
# countrylanguage.countrycode = country.code
| select distinct countrycode from countrylanguage where language != 'English' |
world_1 | What are the codes of the countries that do not speak English and whose government forms are not Republic? | # 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 ( countrycode , language , isofficial , percentage )
# city.countrycode = country.code
# countrylanguage.countrycode = country.code
| select code from country where governmentform != 'Republic' except select countrycode from countrylanguage where language = 'English' |
world_1 | Return the codes of countries that do not speak English and do not have Republics for governments. | # 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 ( countrycode , language , isofficial , percentage )
# city.countrycode = country.code
# countrylanguage.countrycode = country.code
| select code from country where governmentform != 'Republic' except select countrycode from countrylanguage where language = 'English' |
world_1 | Which cities are in European countries where English is not the official language? | # 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 ( countrycode , language , isofficial , percentage )
# city.countrycode = country.code
# countrylanguage.countrycode = country.code
| select distinct city.name from country join city on city.countrycode = country.code where country.continent = 'Europe' and country.name not in ( select country.name from country join countrylanguage on country.code = countrylanguage.countrycode where countrylanguage.isofficial = 'T' and countrylanguage.language = 'English' ) |
world_1 | What are the names of cities in Europe for which English is not the official language? | # 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 ( countrycode , language , isofficial , percentage )
# city.countrycode = country.code
# countrylanguage.countrycode = country.code
| select distinct city.name from country join city on city.countrycode = country.code where country.continent = 'Europe' and country.name not in ( select country.name from country join countrylanguage on country.code = countrylanguage.countrycode where countrylanguage.isofficial = 'T' and countrylanguage.language = 'English' ) |
world_1 | Which unique cities are in Asian countries where Chinese is the official language ? | # 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 ( countrycode , language , isofficial , percentage )
# city.countrycode = country.code
# countrylanguage.countrycode = country.code
| select distinct city.name from country join countrylanguage on country.code = countrylanguage.countrycode join city on country.code = city.countrycode where countrylanguage.isofficial = 't' and countrylanguage.language = 'chinese' and country.continent = 'asia' |
world_1 | Return the different names of cities that are in Asia and for which Chinese is the official language. | # 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 ( countrycode , language , isofficial , percentage )
# city.countrycode = country.code
# countrylanguage.countrycode = country.code
| select distinct city.name from country join countrylanguage on country.code = countrylanguage.countrycode join city on country.code = city.countrycode where countrylanguage.isofficial = 'T' and countrylanguage.language = 'Chinese' and country.continent = 'Asia' |
world_1 | What are the name, independence year, and surface area of the country with the smallest population? | # 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 ( countrycode , language , isofficial , percentage )
# city.countrycode = country.code
# countrylanguage.countrycode = country.code
| select name , surfacearea , indepyear from country order by population asc limit 1 |
world_1 | Give the name, year of independence, and surface area of the country that has the lowest population. | # 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 ( countrycode , language , isofficial , percentage )
# city.countrycode = country.code
# countrylanguage.countrycode = country.code
| select name , surfacearea , indepyear from country order by population asc limit 1 |
world_1 | What are the population, name and leader of the country with the largest area? | # 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 ( countrycode , language , isofficial , percentage )
# city.countrycode = country.code
# countrylanguage.countrycode = country.code
| select name , population , headofstate from country order by surfacearea desc limit 1 |
world_1 | Give the name, population, and head of state for the country that has the largest area. | # 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 ( countrycode , language , isofficial , percentage )
# city.countrycode = country.code
# countrylanguage.countrycode = country.code
| select name , population , headofstate from country order by surfacearea desc limit 1 |
world_1 | Return the country name and the numbers of languages spoken for each country that speaks at least 3 languages. | # 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 ( countrycode , language , isofficial , percentage )
# city.countrycode = country.code
# countrylanguage.countrycode = country.code
| select count ( countrylanguage.language ) , country.name from country join countrylanguage on country.code = countrylanguage.countrycode group by country.name having count ( * ) > 2 |
world_1 | What are the names of countries that speak more than 2 languages, as well as how many languages they speak? | # 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 ( countrycode , language , isofficial , percentage )
# city.countrycode = country.code
# countrylanguage.countrycode = country.code
| select count ( countrylanguage.language ) , country.name from country join countrylanguage on country.code = countrylanguage.countrycode group by country.name having count ( * ) > 2 |
world_1 | Find the number of cities in each district whose population is greater than the average population of cities? | # 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 ( countrycode , language , isofficial , percentage )
# city.countrycode = country.code
# countrylanguage.countrycode = country.code
| select count ( * ) , district from city where population > ( select avg ( population ) from city ) group by district |
world_1 | How many cities in each district have a population that is above the average population across all cities? | # 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 ( countrycode , language , isofficial , percentage )
# city.countrycode = country.code
# countrylanguage.countrycode = country.code
| select count ( * ) , district from city where population > ( select avg ( population ) from city ) group by district |
world_1 | Find the government form name and total population for each government form whose average life expectancy is longer than 72. | # 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 ( countrycode , language , isofficial , percentage )
# city.countrycode = country.code
# countrylanguage.countrycode = country.code
| select sum ( population ) , governmentform from country group by governmentform having avg ( lifeexpectancy ) > 72 |
world_1 | What are the different government forms and what is the total population of each for government forms that have an average life expectancy greater than 72? | # 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 ( countrycode , language , isofficial , percentage )
# city.countrycode = country.code
# countrylanguage.countrycode = country.code
| select sum ( population ) , governmentform from country group by governmentform having avg ( lifeexpectancy ) > 72 |
world_1 | Find the average life expectancy and total population for each continent where the average life expectancy is shorter than 72? | # 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 ( countrycode , language , isofficial , percentage )
# city.countrycode = country.code
# countrylanguage.countrycode = country.code
| select sum ( population ) , avg ( lifeexpectancy ) , continent from country group by continent having avg ( lifeexpectancy ) < 72 |
world_1 | What are the different continents and the total popuation and average life expectancy corresponding to each, for continents that have an average life expectancy less than 72? | # 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 ( countrycode , language , isofficial , percentage )
# city.countrycode = country.code
# countrylanguage.countrycode = country.code
| select sum ( population ) , avg ( lifeexpectancy ) , continent from country group by continent having avg ( lifeexpectancy ) < 72 |