db_id stringlengths 4 31 | SQL stringlengths 18 1.45k | input_sequence stringlengths 148 11k | question stringlengths 16 325 |
|---|---|---|---|
hockey | select cast((sum(case when t1.year = 2005 then t1.gp else 0 end) - sum(case when t1.year = 2006 then t1.gp else 0 end)) as real) * 100 / sum(case when t1.year = 2005 then t1.gp else 0 end) from goalies as t1 inner join master as t2 on t1.playerid = t2.playerid where t2.firstname = 'david' and t2.lastname = 'aebischer' | Question: what's the decrease rate of the game plays did david aebischer after he got traded in 2005? | Tables: AwardsMisc -> name, ID, award, year, lgID, note. HOF -> year, hofID, name, category. Teams -> year, lgID, tmID, franchID, confID, divID, rank, playoff, G, W, L, T, OTL, Pts, SoW, SoL, GF, GA, name, PIM, Bench... | what's the decrease rate of the game plays did david aebischer after he got traded in 2005? |
hockey | select playerid, coachid from master where playerid is not null and coachid is not null | Question: state the player id and coach id of person who have become coach after retirement. | Tables: AwardsMisc -> name, ID, award, year, lgID, note. HOF -> year, hofID, name, category. Teams -> year, lgID, tmID, franchID, confID, divID, rank, playoff, G, W, L, T, OTL, Pts, SoW, SoL, GF, GA, name, PIM, BenchMinor, PP... | state the player id and coach id of person who have become coach after retirement. |
hockey | select distinct playerid from master group by playerid having avg(height) = 75 | Question: state the player id of player with average height of 75. | Tables: AwardsMisc -> name, ID, award, year, lgID, note. HOF -> year, hofID, name, category. Teams -> year, lgID, tmID, franchID, confID, divID, rank, playoff, G, W, L, T, OTL, Pts, SoW, SoL, GF, GA, name, PIM, BenchMinor, PPG, PPC, SHA, PKG, PKC, SHF... | state the player id of player with average height of 75. |
hockey | select playerid from master order by weight desc limit 5 | Question: who is the heaviest player? state player id of 5 heaviest players. | Tables: AwardsMisc -> name, ID, award, year, lgID, note. HOF -> year, hofID, name, category. Teams -> year, lgID, tmID, franchID, confID, divID, rank, playoff, G, W, L, T, OTL, Pts, SoW, SoL, GF, GA, name, PIM, BenchMinor, PPG, PPC, SHA, PKG... | who is the heaviest player? state player id of 5 heaviest players. |
hockey | select distinct firstname, lastname from master where birthcountry = 'finland' | Question: what is the full name of players origin from finland? | Tables: AwardsMisc -> name, ID, award, year, lgID, note. HOF -> year, hofID, name, category. Teams -> year, lgID, tmID, franchID, confID, divID, rank, playoff, G, W, L, T, OTL, Pts, SoW, SoL, GF, GA, name, PIM, BenchMinor, PPG, PPC, SHA, PKG, PKC, SHF. C... | what is the full name of players origin from finland? |
hockey | select distinct playerid from master where deathyear is not null and playerid is not null | Question: list down player id of players who have passed away. | Tables: AwardsMisc -> name, ID, award, year, lgID, note. HOF -> year, hofID, name, category. Teams -> year, lgID, tmID, franchID, confID, divID, rank, playoff, G, W, L, T, OTL, Pts, SoW, SoL, GF, GA, name, PIM, BenchMinor, PPG, PPC, SHA, PKG, PKC, SHF. Co... | list down player id of players who have passed away. |
hockey | select distinct t1.firstname from master as t1 inner join coaches as t2 on t1.coachid = t2.coachid where t2.year > 2000 | Question: list down the first name of coaches who still coach after year 2000. | Tables: AwardsMisc -> name, ID, award, year, lgID, note. HOF -> year, hofID, name, category. Teams -> year, lgID, tmID, franchID, confID, divID, rank, playoff, G, W, L, T, OTL, Pts, SoW, SoL, GF, GA, name, PIM, BenchMinor, PPG, PPC, SHA, P... | list down the first name of coaches who still coach after year 2000. |
hockey | select t1.height, t1.weight from master as t1 inner join awardscoaches as t2 on t1.coachid = t2.coachid where t2.year = '1930' | Question: what is the height and weight for coaches who have won awards in 1930? | Tables: AwardsMisc -> name, ID, award, year, lgID, note. HOF -> year, hofID, name, category. Teams -> year, lgID, tmID, franchID, confID, divID, rank, playoff, G, W, L, T, OTL, Pts, SoW, SoL, GF, GA, name, PIM, BenchMinor, PPG, PPC, SHA,... | what is the height and weight for coaches who have won awards in 1930? |
hockey | select sum(t2.g), strftime('%y', current_timestamp) - t1.birthyear from master as t1 inner join scoring as t2 on t1.playerid = t2.playerid where t1.playerid = 'aaltoan01' group by t1.birthyear | Question: how much is the total goals for player with player id aaltoan01 and how old is this person? | Tables: AwardsMisc -> name, ID, award, year, lgID, note. HOF -> year, hofID, name, category. Teams -> year, lgID, tmID, franchID, confID, divID, rank, playoff, G, W, L, T, OTL, Pts, SoW, SoL, GF, GA, name, PIM, Bench... | how much is the total goals for player with player id aaltoan01 and how old is this person? |
hockey | select distinct t2.coachid from master as t1 inner join awardscoaches as t2 on t1.coachid = t2.coachid where t1.playerid is null | Question: is there any coach who has not been a player before but has won award? state the id. | Tables: AwardsMisc -> name, ID, award, year, lgID, note. HOF -> year, hofID, name, category. Teams -> year, lgID, tmID, franchID, confID, divID, rank, playoff, G, W, L, T, OTL, Pts, SoW, SoL, GF, GA, name, PIM, BenchMinor, ... | is there any coach who has not been a player before but has won award? state the id. |
hockey | select distinct playerid from master where pos like '%l%' and weight > 200 and playerid is not null and pos = 'l' | Question: which player id are left winger and weight more than 200? | Tables: AwardsMisc -> name, ID, award, year, lgID, note. HOF -> year, hofID, name, category. Teams -> year, lgID, tmID, franchID, confID, divID, rank, playoff, G, W, L, T, OTL, Pts, SoW, SoL, GF, GA, name, PIM, BenchMinor, PPG, PPC, SHA, PKG, PKC, SH... | which player id are left winger and weight more than 200? |
hockey | select count(t2.gp) from master as t1 inner join scoring as t2 on t1.playerid = t2.playerid where t1.birthcountry = 'usa' | Question: what is the total number of game played for players from usa? | Tables: AwardsMisc -> name, ID, award, year, lgID, note. HOF -> year, hofID, name, category. Teams -> year, lgID, tmID, franchID, confID, divID, rank, playoff, G, W, L, T, OTL, Pts, SoW, SoL, GF, GA, name, PIM, BenchMinor, PPG, PPC, SHA, PKG, PKC... | what is the total number of game played for players from usa? |
hockey | select sum(t2.pts), t1.coachid from coaches as t1 inner join teams as t2 on t2.tmid = t1.tmid where t2.tmid = 'ana' group by t1.coachid | Question: calculate the total points scored by team id ana and list down the coashes of the team. | Tables: AwardsMisc -> name, ID, award, year, lgID, note. HOF -> year, hofID, name, category. Teams -> year, lgID, tmID, franchID, confID, divID, rank, playoff, G, W, L, T, OTL, Pts, SoW, SoL, GF, GA, name, PIM, BenchMino... | calculate the total points scored by team id ana and list down the coashes of the team. |
hockey | select sum(t2.g) from teams as t1 inner join scoring as t2 on t1.tmid = t2.tmid and t1.year = t2.year where t1.divid = 'ew' and t1.tmid = 'bir' and t1.year = 1976 | Question: in 1976, how many goals achieved by team 'bir' in division 'ew'? | Tables: AwardsMisc -> name, ID, award, year, lgID, note. HOF -> year, hofID, name, category. Teams -> year, lgID, tmID, franchID, confID, divID, rank, playoff, G, W, L, T, OTL, Pts, SoW, SoL, GF, GA, name, PIM, BenchMinor, PPG, PPC, SHA, PKG, ... | in 1976, how many goals achieved by team 'bir' in division 'ew'? |
hockey | select sum(t1.l), sum(t2.a) from teams as t1 inner join scoring as t2 on t1.tmid = t2.tmid and t1.year = t2.year where t1.tmid = 'bos' and t1.year = 2010 | Question: in 2010, how many loses made by team 'bos' and how many assists were made by the players? | Tables: AwardsMisc -> name, ID, award, year, lgID, note. HOF -> year, hofID, name, category. Teams -> year, lgID, tmID, franchID, confID, divID, rank, playoff, G, W, L, T, OTL, Pts, SoW, SoL, GF, GA, name, PIM, BenchMi... | in 2010, how many loses made by team 'bos' and how many assists were made by the players? |
hockey | select sum(t1.weight) from master as t1 inner join scoring as t2 on t1.playerid = t2.playerid where t2.year = 1997 and t2.tmid = 'ana' | Question: what are the total weights of players for team 'ana' as per year 1997? | Tables: AwardsMisc -> name, ID, award, year, lgID, note. HOF -> year, hofID, name, category. Teams -> year, lgID, tmID, franchID, confID, divID, rank, playoff, G, W, L, T, OTL, Pts, SoW, SoL, GF, GA, name, PIM, BenchMinor, PPG, PPC, SHA,... | what are the total weights of players for team 'ana' as per year 1997? |
hockey | select t2.playerid, t2.tmid from ( select playerid from master where height is not null order by height asc limit 1 ) as t1 inner join ( select distinct playerid, tmid from scoring where year between 1925 and 1936 ) as t2 on t1.playerid = t2.playerid | Question: who is the shortest player and state the team id of that player from 1925 to 1936. | Tables: AwardsMisc -> name, ID, award, year, lgID, note. HOF -> year, hofID, name, category. Teams -> year, lgID, tmID, franchID, confID, divID, rank, playoff, G, W, L, T, OTL, Pts, SoW, SoL, GF, GA, name, PIM, BenchMinor, PP... | who is the shortest player and state the team id of that player from 1925 to 1936. |
hockey | select distinct t3.tmid, t1.birthcountry from master as t1 inner join scoring as t2 on t1.playerid = t2.playerid inner join ( select year, tmid from teams where year = 2000 order by w / (w + l) desc limit 1 ) as t3 on t2.tmid = t3.tmid and t2.year = t3.year | Question: which team has the highest winning rate in year 2000? state the team id and list down the birth country of it's players. | Tables: AwardsMisc -> name, ID, award, year, lgID, note. HOF -> year, hofID, name, category. Teams -> year, lgID, tmID, franchID, confID, divID, rank, playoff, G, W, L, T, OTL, Pts, SoW, ... | which team has the highest winning rate in year 2000? state the team id and list down the birth country of it's players. |
hockey | select cast(t1.w as real) / t1.g, t2.playerid from teams as t1 inner join scoring as t2 on t1.tmid = t2.tmid and t1.year = t2.year where t1.tmid = 'car' and t1.year = 1998 group by t1.w / t1.g, t2.playerid order by sum(t2.g) desc limit 1 | Question: in 1998, how many wins were made by team 'car' per game played? who contributed the most goals? state the player id. | Tables: AwardsMisc -> name, ID, award, year, lgID, note. HOF -> year, hofID, name, category. Teams -> year, lgID, tmID, franchID, confID, divID, rank, playoff, G, W, L, T, OTL, Pts, SoW, SoL,... | in 1998, how many wins were made by team 'car' per game played? who contributed the most goals? state the player id. |
world | select name from country order by lifeexpectancy limit 1 | Question: which country has the shortest life expectancy? | Tables: City -> ID, Name, CountryCode, District, Population. Country -> Code, Name, Continent, Region, SurfaceArea, IndepYear, Population, LifeExpectancy, GNP, GNPOld, LocalName, GovernmentForm, HeadOfState, Capital, Code2. CountryLanguage -> CountryCode, Lang... | which country has the shortest life expectancy? |
world | select t1.name from country as t1 inner join countrylanguage as t2 on t1.code = t2.countrycode where t2.language = 'english' and t2.isofficial = 't' limit 5 | Question: list any five countries which use english as an official language. | Tables: City -> ID, Name, CountryCode, District, Population. Country -> Code, Name, Continent, Region, SurfaceArea, IndepYear, Population, LifeExpectancy, GNP, GNPOld, LocalName, GovernmentForm, HeadOfState, Capital, Code2. CountryLanguage -... | list any five countries which use english as an official language. |
world | select avg(population) from city where district = 'karnataka' group by id | Question: calculate the average population per city in karnataka district. | Tables: City -> ID, Name, CountryCode, District, Population. Country -> Code, Name, Continent, Region, SurfaceArea, IndepYear, Population, LifeExpectancy, GNP, GNPOld, LocalName, GovernmentForm, HeadOfState, Capital, Code2. CountryLanguage -> ... | calculate the average population per city in karnataka district. |
world | select language from countrylanguage where countrycode = 'usa' | Question: list the languages used in the usa. | Tables: City -> ID, Name, CountryCode, District, Population. Country -> Code, Name, Continent, Region, SurfaceArea, IndepYear, Population, LifeExpectancy, GNP, GNPOld, LocalName, GovernmentForm, HeadOfState, Capital, Code2. CountryLanguage -> CountryCode, Language, IsOffi... | list the languages used in the usa. |
world | select sum(case when language = 'portuguese' then 1 else 0 end) from countrylanguage | Question: how many countries use portuguese? | Tables: City -> ID, Name, CountryCode, District, Population. Country -> Code, Name, Continent, Region, SurfaceArea, IndepYear, Population, LifeExpectancy, GNP, GNPOld, LocalName, GovernmentForm, HeadOfState, Capital, Code2. CountryLanguage -> CountryCode, Language, IsOffic... | how many countries use portuguese? |
world | select count(id) from city where district = 'england' | Question: how many cities are there in england? | Tables: City -> ID, Name, CountryCode, District, Population. Country -> Code, Name, Continent, Region, SurfaceArea, IndepYear, Population, LifeExpectancy, GNP, GNPOld, LocalName, GovernmentForm, HeadOfState, Capital, Code2. CountryLanguage -> CountryCode, Language, IsOf... | how many cities are there in england? |
world | select t2.id from country as t1 inner join city as t2 on t1.code = t2.countrycode where t1.surfacearea = ( select max(surfacearea) from country ) | Question: how many cities are there in the country with the largest surface area? | Tables: City -> ID, Name, CountryCode, District, Population. Country -> Code, Name, Continent, Region, SurfaceArea, IndepYear, Population, LifeExpectancy, GNP, GNPOld, LocalName, GovernmentForm, HeadOfState, Capital, Code2. CountryLangu... | how many cities are there in the country with the largest surface area? |
world | select t1.capital, t2.population from country as t1 inner join city as t2 on t1.code = t2.countrycode where t1.name = 'san marino' | Question: what is the capital city and population of san marino? | Tables: City -> ID, Name, CountryCode, District, Population. Country -> Code, Name, Continent, Region, SurfaceArea, IndepYear, Population, LifeExpectancy, GNP, GNPOld, LocalName, GovernmentForm, HeadOfState, Capital, Code2. CountryLanguage -> CountryCod... | what is the capital city and population of san marino? |
world | select t2.language from country as t1 inner join countrylanguage as t2 on t1.code = t2.countrycode where t1.name = 'turkmenistan' | Question: list the languages used in turkmenistan. | Tables: City -> ID, Name, CountryCode, District, Population. Country -> Code, Name, Continent, Region, SurfaceArea, IndepYear, Population, LifeExpectancy, GNP, GNPOld, LocalName, GovernmentForm, HeadOfState, Capital, Code2. CountryLanguage -> CountryCode, Language, I... | list the languages used in turkmenistan. |
world | select t1.name, t1.capital, t2.language from country as t1 inner join countrylanguage as t2 on t1.code = t2.countrycode inner join city as t3 on t1.code = t3.countrycode where t2.isofficial = 't' order by t1.lifeexpectancy desc limit 1 | Question: provide the name, capital city and its official language of the country with the highest life expectancy. | Tables: City -> ID, Name, CountryCode, District, Population. Country -> Code, Name, Continent, Region, SurfaceArea, IndepYear, Population, LifeExpectancy, GNP, GNPOld, LocalName, GovernmentForm, HeadOfS... | provide the name, capital city and its official language of the country with the highest life expectancy. |
world | select t1.name, t2.language from country as t1 inner join countrylanguage as t2 on t1.code = t2.countrycode where t1.continent = 'antarctica' and t2.isofficial = 't' | Question: list the countries and their official languages in antarctica. | Tables: City -> ID, Name, CountryCode, District, Population. Country -> Code, Name, Continent, Region, SurfaceArea, IndepYear, Population, LifeExpectancy, GNP, GNPOld, LocalName, GovernmentForm, HeadOfState, Capital, Code2. CountryLanguage -> Co... | list the countries and their official languages in antarctica. |
world | select t1.name from country as t1 inner join countrylanguage as t2 on t1.code = t2.countrycode where t2.language = 'english' and t2.isofficial = 't' limit 5 | Question: list any five countries which use english as an official language. | Tables: City -> ID, Name, CountryCode, District, Population. Country -> Code, Name, Continent, Region, SurfaceArea, IndepYear, Population, LifeExpectancy, GNP, GNPOld, LocalName, GovernmentForm, HeadOfState, Capital, Code2. CountryLanguage -... | list any five countries which use english as an official language. |
world | select t2.language from country as t1 inner join countrylanguage as t2 on t1.code = t2.countrycode where t1.region = 'baltic countries' and t2.percentage > 80 | Question: among the languages used in baltic countries, provide the languages which are used by over 80%. | Tables: City -> ID, Name, CountryCode, District, Population. Country -> Code, Name, Continent, Region, SurfaceArea, IndepYear, Population, LifeExpectancy, GNP, GNPOld, LocalName, GovernmentForm, HeadOfState, Capi... | among the languages used in baltic countries, provide the languages which are used by over 80%. |
world | select t2.language from country as t1 inner join countrylanguage as t2 on t1.code = t2.countrycode where t1.region = 'baltic countries' and t2.percentage > 80 | Question: among the languages used in baltic countries, provide the languages which are used by over 80%. | Tables: City -> ID, Name, CountryCode, District, Population. Country -> Code, Name, Continent, Region, SurfaceArea, IndepYear, Population, LifeExpectancy, GNP, GNPOld, LocalName, GovernmentForm, HeadOfState, Capi... | among the languages used in baltic countries, provide the languages which are used by over 80%. |
world | select t2.name, t1.code, t1.lifeexpectancy from country as t1 inner join city as t2 on t1.code = t2.countrycode order by t2.population desc limit 1 | Question: provide the name, located country, and life expectancy of the most populated city | Tables: City -> ID, Name, CountryCode, District, Population. Country -> Code, Name, Continent, Region, SurfaceArea, IndepYear, Population, LifeExpectancy, GNP, GNPOld, LocalName, GovernmentForm, HeadOfState, Capital, Code2. Co... | provide the name, located country, and life expectancy of the most populated city |
world | select t1.capital, t2.language from country as t1 inner join countrylanguage as t2 on t1.code = t2.countrycode inner join city as t3 on t1.code = t3.countrycode order by t1.lifeexpectancy limit 1 | Question: describe the capital city and languages used in the country with the shortest life expectancy. | Tables: City -> ID, Name, CountryCode, District, Population. Country -> Code, Name, Continent, Region, SurfaceArea, IndepYear, Population, LifeExpectancy, GNP, GNPOld, LocalName, GovernmentForm, HeadOfState, Capit... | describe the capital city and languages used in the country with the shortest life expectancy. |
world | select t1.name, t1.population, t1.capital, t2.language from country as t1 inner join countrylanguage as t2 on t1.code = t2.countrycode inner join city as t3 on t1.code = t3.countrycode where t2.isofficial = 't' order by t1.surfacearea limit 1 | Question: provide the country, population, capital city, and official language of the country with the smallest surface area. | Tables: City -> ID, Name, CountryCode, District, Population. Country -> Code, Name, Continent, Region, SurfaceArea, IndepYear, Population, LifeExpectancy, GNP, GNPOld, LocalName, GovernmentFor... | provide the country, population, capital city, and official language of the country with the smallest surface area. |
world | select cast(sum(iif(t2.language = 'english', 1, 0)) as real) * 100 / count(t1.code) from country as t1 inner join countrylanguage as t2 on t1.code = t2.countrycode | Question: how many percent of countries in north america use english? | Tables: City -> ID, Name, CountryCode, District, Population. Country -> Code, Name, Continent, Region, SurfaceArea, IndepYear, Population, LifeExpectancy, GNP, GNPOld, LocalName, GovernmentForm, HeadOfState, Capital, Code2. CountryLanguage -> Count... | how many percent of countries in north america use english? |
world | select district from city order by population limit 1 | Question: list the district name of the city with the smallest population. | Tables: City -> ID, Name, CountryCode, District, Population. Country -> Code, Name, Continent, Region, SurfaceArea, IndepYear, Population, LifeExpectancy, GNP, GNPOld, LocalName, GovernmentForm, HeadOfState, Capital, Code2. CountryLanguage -> ... | list the district name of the city with the smallest population. |
world | select continent from country order by surfacearea limit 1 | Question: in which continent does the country with the smallest surface area belongs? | Tables: City -> ID, Name, CountryCode, District, Population. Country -> Code, Name, Continent, Region, SurfaceArea, IndepYear, Population, LifeExpectancy, GNP, GNPOld, LocalName, GovernmentForm, HeadOfState, Capital, Code2. CountryL... | in which continent does the country with the smallest surface area belongs? |
world | select t1.headofstate from country as t1 inner join city as t2 on t1.code = t2.countrycode order by t2.population desc limit 1 | Question: who is the head of the state where the most crowded city belongs? | Tables: City -> ID, Name, CountryCode, District, Population. Country -> Code, Name, Continent, Region, SurfaceArea, IndepYear, Population, LifeExpectancy, GNP, GNPOld, LocalName, GovernmentForm, HeadOfState, Capital, Code2. CountryLanguage ->... | who is the head of the state where the most crowded city belongs? |
world | select t1.code from country as t1 inner join countrylanguage as t2 on t1.code = t2.countrycode where t2.language = 'english' and t2.isofficial = 't' order by t1.capital desc limit 1 | Question: among the countries that officially use the english language, what country has the highest capital? | Tables: City -> ID, Name, CountryCode, District, Population. Country -> Code, Name, Continent, Region, SurfaceArea, IndepYear, Population, LifeExpectancy, GNP, GNPOld, LocalName, GovernmentForm, HeadOfState, ... | among the countries that officially use the english language, what country has the highest capital? |
world | select t2.name from country as t1 inner join city as t2 on t1.code = t2.countrycode where t1.lifeexpectancy = 66.4 | Question: list down the cities that belong to the country with a life expectancy of 66.4. | Tables: City -> ID, Name, CountryCode, District, Population. Country -> Code, Name, Continent, Region, SurfaceArea, IndepYear, Population, LifeExpectancy, GNP, GNPOld, LocalName, GovernmentForm, HeadOfState, Capital, Code2. Coun... | list down the cities that belong to the country with a life expectancy of 66.4. |
world | select t1.headofstate from country as t1 inner join countrylanguage as t2 on t1.code = t2.countrycode where t2.language = 'english' order by t2.percentage limit 1 | Question: give the head of the state of the country with the lowest percentage use of english as their language. | Tables: City -> ID, Name, CountryCode, District, Population. Country -> Code, Name, Continent, Region, SurfaceArea, IndepYear, Population, LifeExpectancy, GNP, GNPOld, LocalName, GovernmentForm, HeadOfStat... | give the head of the state of the country with the lowest percentage use of english as their language. |
world | select t1.surfacearea from country as t1 inner join city as t2 on t1.code = t2.countrycode where t2.name = 'sutton coldfield' | Question: what is the surface area of the country where sutton coldfield city belongs? | Tables: City -> ID, Name, CountryCode, District, Population. Country -> Code, Name, Continent, Region, SurfaceArea, IndepYear, Population, LifeExpectancy, GNP, GNPOld, LocalName, GovernmentForm, HeadOfState, Capital, Code2. Country... | what is the surface area of the country where sutton coldfield city belongs? |
world | select t2.language from country as t1 inner join countrylanguage as t2 on t1.code = t2.countrycode where t1.population < 8000 | Question: list down the languages of the countries that have population below 8000. | Tables: City -> ID, Name, CountryCode, District, Population. Country -> Code, Name, Continent, Region, SurfaceArea, IndepYear, Population, LifeExpectancy, GNP, GNPOld, LocalName, GovernmentForm, HeadOfState, Capital, Code2. CountryLan... | list down the languages of the countries that have population below 8000. |
world | select t2.language from country as t1 inner join countrylanguage as t2 on t1.code = t2.countrycode where t1.name = 'belgium' and t2.isofficial = 't' | Question: what are the official languages used in belgium? | Tables: City -> ID, Name, CountryCode, District, Population. Country -> Code, Name, Continent, Region, SurfaceArea, IndepYear, Population, LifeExpectancy, GNP, GNPOld, LocalName, GovernmentForm, HeadOfState, Capital, Code2. CountryLanguage -> CountryCode, Lan... | what are the official languages used in belgium? |
world | select t2.name, t2.district from country as t1 inner join city as t2 on t1.code = t2.countrycode where t1.localname = 'hajastan' | Question: give the cities and district names that belong to the country with hajastan as its local name. | Tables: City -> ID, Name, CountryCode, District, Population. Country -> Code, Name, Continent, Region, SurfaceArea, IndepYear, Population, LifeExpectancy, GNP, GNPOld, LocalName, GovernmentForm, HeadOfState, Capit... | give the cities and district names that belong to the country with hajastan as its local name. |
world | select sum(case when t1.name = 'cyprus' then 1 else 0 end) from country as t1 inner join countrylanguage as t2 on t1.code = t2.countrycode | Question: how many languages are used in cyprus? | Tables: City -> ID, Name, CountryCode, District, Population. Country -> Code, Name, Continent, Region, SurfaceArea, IndepYear, Population, LifeExpectancy, GNP, GNPOld, LocalName, GovernmentForm, HeadOfState, Capital, Code2. CountryLanguage -> CountryCode, Language, IsO... | how many languages are used in cyprus? |
world | select t2.language from country as t1 inner join countrylanguage as t2 on t1.code = t2.countrycode where t1.name = 'belize' | Question: provide the language used by the people of belize. | Tables: City -> ID, Name, CountryCode, District, Population. Country -> Code, Name, Continent, Region, SurfaceArea, IndepYear, Population, LifeExpectancy, GNP, GNPOld, LocalName, GovernmentForm, HeadOfState, Capital, Code2. CountryLanguage -> CountryCode, L... | provide the language used by the people of belize. |
world | select t2.district from country as t1 inner join city as t2 on t1.code = t2.countrycode where t1.headofstate = 'adolf ogi' | Question: list down the districts belong to the country headed by adolf ogi. | Tables: City -> ID, Name, CountryCode, District, Population. Country -> Code, Name, Continent, Region, SurfaceArea, IndepYear, Population, LifeExpectancy, GNP, GNPOld, LocalName, GovernmentForm, HeadOfState, Capital, Code2. CountryLanguage -... | list down the districts belong to the country headed by adolf ogi. |
world | select t1.headofstate from country as t1 inner join city as t2 on t1.code = t2.countrycode where t2.district = 'santa catarina' | Question: who is the head of the country where santa catarina district belongs? | Tables: City -> ID, Name, CountryCode, District, Population. Country -> Code, Name, Continent, Region, SurfaceArea, IndepYear, Population, LifeExpectancy, GNP, GNPOld, LocalName, GovernmentForm, HeadOfState, Capital, Code2. CountryLanguag... | who is the head of the country where santa catarina district belongs? |
world | select cast(sum(iif(t2.language = 'english', 1, 0)) as real) * 100 / count(t1.code) from country as t1 inner join countrylanguage as t2 on t1.code = t2.countrycode where t1.gnp > 1500 | Question: among the countries that have gnp greater than 1500, what is the percentage of the countries have english as its language? | Tables: City -> ID, Name, CountryCode, District, Population. Country -> Code, Name, Continent, Region, SurfaceArea, IndepYear, Population, LifeExpectancy, GNP, GNPOld, LocalName, Govern... | among the countries that have gnp greater than 1500, what is the percentage of the countries have english as its language? |
world | select count(t1.governmentform = 'republic') - count(t1.governmentform = 'constitutionalmonarchy') from country as t1 inner join countrylanguage as t2 on t1.code = t2.countrycode where t2.language = 'english' | Question: in english speaking countries, provide the difference between the number of countries with republic and constitutional monarchy as its government form. | Tables: City -> ID, Name, CountryCode, District, Population. Country -> Code, Name, Continent, Region, SurfaceArea, IndepYear, Population, LifeExpectancy, G... | in english speaking countries, provide the difference between the number of countries with republic and constitutional monarchy as its government form. |
world | select name from country where indepyear = 1994 | Question: what country declared its independence in 1994? | Tables: City -> ID, Name, CountryCode, District, Population. Country -> Code, Name, Continent, Region, SurfaceArea, IndepYear, Population, LifeExpectancy, GNP, GNPOld, LocalName, GovernmentForm, HeadOfState, Capital, Code2. CountryLanguage -> CountryCode, Lang... | what country declared its independence in 1994? |
world | select name from country where continent = 'asia' | Question: list all the countries in asia. | Tables: City -> ID, Name, CountryCode, District, Population. Country -> Code, Name, Continent, Region, SurfaceArea, IndepYear, Population, LifeExpectancy, GNP, GNPOld, LocalName, GovernmentForm, HeadOfState, Capital, Code2. CountryLanguage -> CountryCode, Language, IsOfficial... | list all the countries in asia. |
world | select name from country where continent = 'asia' order by gnp desc limit 1 | Question: what country in asia has the largest gross national product(gnp)? | Tables: City -> ID, Name, CountryCode, District, Population. Country -> Code, Name, Continent, Region, SurfaceArea, IndepYear, Population, LifeExpectancy, GNP, GNPOld, LocalName, GovernmentForm, HeadOfState, Capital, Code2. CountryLanguage ->... | what country in asia has the largest gross national product(gnp)? |
world | select count(id) from city where name = 'phl' | Question: how many cities are in the philippines? | Tables: City -> ID, Name, CountryCode, District, Population. Country -> Code, Name, Continent, Region, SurfaceArea, IndepYear, Population, LifeExpectancy, GNP, GNPOld, LocalName, GovernmentForm, HeadOfState, Capital, Code2. CountryLanguage -> CountryCode, Language, Is... | how many cities are in the philippines? |
world | select localname from country where name = 'ukraine' | Question: what is the local name of ukraine that they are also known for? | Tables: City -> ID, Name, CountryCode, District, Population. Country -> Code, Name, Continent, Region, SurfaceArea, IndepYear, Population, LifeExpectancy, GNP, GNPOld, LocalName, GovernmentForm, HeadOfState, Capital, Code2. CountryLanguage -> C... | what is the local name of ukraine that they are also known for? |
world | select count(code) from country where governmentform = 'socialistic republic' | Question: how many countries have socialistic republic form of government? | Tables: City -> ID, Name, CountryCode, District, Population. Country -> Code, Name, Continent, Region, SurfaceArea, IndepYear, Population, LifeExpectancy, GNP, GNPOld, LocalName, GovernmentForm, HeadOfState, Capital, Code2. CountryLanguage -> ... | how many countries have socialistic republic form of government? |
world | select t2.language from country as t1 inner join countrylanguage as t2 on t1.code = t2.countrycode where t1.name = 'china' and t2.isofficial = 't' | Question: what is the official language of china? | Tables: City -> ID, Name, CountryCode, District, Population. Country -> Code, Name, Continent, Region, SurfaceArea, IndepYear, Population, LifeExpectancy, GNP, GNPOld, LocalName, GovernmentForm, HeadOfState, Capital, Code2. CountryLanguage -> CountryCode, Language, Is... | what is the official language of china? |
world | select t2.percentage from country as t1 inner join countrylanguage as t2 on t1.code = t2.countrycode where t1.name = 'china' and t2.language = 'chinese' | Question: how many percent of the population of china used chinese as their language? | Tables: City -> ID, Name, CountryCode, District, Population. Country -> Code, Name, Continent, Region, SurfaceArea, IndepYear, Population, LifeExpectancy, GNP, GNPOld, LocalName, GovernmentForm, HeadOfState, Capital, Code2. CountryL... | how many percent of the population of china used chinese as their language? |
world | select t1.governmentform from country as t1 inner join city as t2 on t1.code = t2.countrycode where t2.name = 'manila' | Question: what is the form of government that the city of manila has? | Tables: City -> ID, Name, CountryCode, District, Population. Country -> Code, Name, Continent, Region, SurfaceArea, IndepYear, Population, LifeExpectancy, GNP, GNPOld, LocalName, GovernmentForm, HeadOfState, Capital, Code2. CountryLanguage -> Count... | what is the form of government that the city of manila has? |
world | select t1.capital from country as t1 inner join city as t2 on t1.code = t2.countrycode where t1.name = 'philipiines' | Question: what is the capital city of the philippines? | Tables: City -> ID, Name, CountryCode, District, Population. Country -> Code, Name, Continent, Region, SurfaceArea, IndepYear, Population, LifeExpectancy, GNP, GNPOld, LocalName, GovernmentForm, HeadOfState, Capital, Code2. CountryLanguage -> CountryCode, Languag... | what is the capital city of the philippines? |
world | select t2.language from country as t1 inner join countrylanguage as t2 on t1.code = t2.countrycode where t1.continent = 'europe' | Question: list all the languages used in europe. | Tables: City -> ID, Name, CountryCode, District, Population. Country -> Code, Name, Continent, Region, SurfaceArea, IndepYear, Population, LifeExpectancy, GNP, GNPOld, LocalName, GovernmentForm, HeadOfState, Capital, Code2. CountryLanguage -> CountryCode, Language, IsO... | list all the languages used in europe. |
world | select t1.headofstate from country as t1 inner join city as t2 on t1.code = t2.countrycode where t2.name = 'pyongyang' | Question: who is the head of state of the country where the city of pyongyang is under? | Tables: City -> ID, Name, CountryCode, District, Population. Country -> Code, Name, Continent, Region, SurfaceArea, IndepYear, Population, LifeExpectancy, GNP, GNPOld, LocalName, GovernmentForm, HeadOfState, Capital, Code2. Countr... | who is the head of state of the country where the city of pyongyang is under? |
world | select sum(case when t2.isofficial = 'f' then 1 else 0 end) from country as t1 inner join countrylanguage as t2 on t1.code = t2.countrycode where t1.name = 'italy' | Question: how many unofficial languages are used in italy? | Tables: City -> ID, Name, CountryCode, District, Population. Country -> Code, Name, Continent, Region, SurfaceArea, IndepYear, Population, LifeExpectancy, GNP, GNPOld, LocalName, GovernmentForm, HeadOfState, Capital, Code2. CountryLanguage -> CountryCode, Lan... | how many unofficial languages are used in italy? |
world | select t2.name from country as t1 inner join city as t2 on t1.code = t2.countrycode where t1.name = 'russian federation' order by t2.population asc limit 1 | Question: what city in russia has the least population? | Tables: City -> ID, Name, CountryCode, District, Population. Country -> Code, Name, Continent, Region, SurfaceArea, IndepYear, Population, LifeExpectancy, GNP, GNPOld, LocalName, GovernmentForm, HeadOfState, Capital, Code2. CountryLanguage -> CountryCode, Langua... | what city in russia has the least population? |
world | select t2.name from country as t1 inner join city as t2 on t1.code = t2.countrycode order by t1.lifeexpectancy desc limit 1 | Question: list all the cities in the country where there is high life expectancy at birth. | Tables: City -> ID, Name, CountryCode, District, Population. Country -> Code, Name, Continent, Region, SurfaceArea, IndepYear, Population, LifeExpectancy, GNP, GNPOld, LocalName, GovernmentForm, HeadOfState, Capital, Code2. Cou... | list all the cities in the country where there is high life expectancy at birth. |
world | select t2.language, t2.isofficial from country as t1 inner join countrylanguage as t2 on t1.code = t2.countrycode where t1.indepyear = 1830 group by t2.language, t2.isofficial | Question: list all the official and unofficial languages used by the country that declared its independence in 1830. | Tables: City -> ID, Name, CountryCode, District, Population. Country -> Code, Name, Continent, Region, SurfaceArea, IndepYear, Population, LifeExpectancy, GNP, GNPOld, LocalName, GovernmentForm, HeadOf... | list all the official and unofficial languages used by the country that declared its independence in 1830. |
world | select t1.capital from country as t1 inner join city as t2 on t1.code = t2.countrycode order by t1.population desc limit 1 | Question: what is the capital city of the country with largest population? | Tables: City -> ID, Name, CountryCode, District, Population. Country -> Code, Name, Continent, Region, SurfaceArea, IndepYear, Population, LifeExpectancy, GNP, GNPOld, LocalName, GovernmentForm, HeadOfState, Capital, Code2. CountryLanguage -> ... | what is the capital city of the country with largest population? |
world | select t1.name from country as t1 inner join countrylanguage as t2 on t1.code = t2.countrycode where t1.continent = 'asia' and t2.isofficial = 'f' group by t1.name | Question: list all the countries in the continent of asia that use english as their unofficial language. | Tables: City -> ID, Name, CountryCode, District, Population. Country -> Code, Name, Continent, Region, SurfaceArea, IndepYear, Population, LifeExpectancy, GNP, GNPOld, LocalName, GovernmentForm, HeadOfState, Capit... | list all the countries in the continent of asia that use english as their unofficial language. |
world | select avg(t1.gnp) from country as t1 inner join countrylanguage as t2 on t1.code = t2.countrycode where t2.language = 'arabic' | Question: calculate the average gnp of all countries that use arabic language. | Tables: City -> ID, Name, CountryCode, District, Population. Country -> Code, Name, Continent, Region, SurfaceArea, IndepYear, Population, LifeExpectancy, GNP, GNPOld, LocalName, GovernmentForm, HeadOfState, Capital, Code2. CountryLanguage... | calculate the average gnp of all countries that use arabic language. |
world | select cast(sum(iif(t2.language = 'chinese', t1.surfacearea, 0)) as real) * 100 / sum(t1.surfacearea) from country as t1 inner join countrylanguage as t2 on t1.code = t2.countrycode | Question: calculate the percentage of the surface area of all countries that uses chinese as one of their languages. | Tables: City -> ID, Name, CountryCode, District, Population. Country -> Code, Name, Continent, Region, SurfaceArea, IndepYear, Population, LifeExpectancy, GNP, GNPOld, LocalName, GovernmentForm, HeadOf... | calculate the percentage of the surface area of all countries that uses chinese as one of their languages. |
world | select name from country order by surfacearea asc limit 1 | Question: which country has the smallest surface area? | Tables: City -> ID, Name, CountryCode, District, Population. Country -> Code, Name, Continent, Region, SurfaceArea, IndepYear, Population, LifeExpectancy, GNP, GNPOld, LocalName, GovernmentForm, HeadOfState, Capital, Code2. CountryLanguage -> CountryCode, Languag... | which country has the smallest surface area? |
world | select name from country order by population desc limit 1 | Question: write down the name of the largest population country. | Tables: City -> ID, Name, CountryCode, District, Population. Country -> Code, Name, Continent, Region, SurfaceArea, IndepYear, Population, LifeExpectancy, GNP, GNPOld, LocalName, GovernmentForm, HeadOfState, Capital, Code2. CountryLanguage -> CountryCod... | write down the name of the largest population country. |
world | select t2.language from country as t1 inner join countrylanguage as t2 on t1.code = t2.countrycode order by t1.population asc limit 1 | Question: what is the language of the smallest population country? | Tables: City -> ID, Name, CountryCode, District, Population. Country -> Code, Name, Continent, Region, SurfaceArea, IndepYear, Population, LifeExpectancy, GNP, GNPOld, LocalName, GovernmentForm, HeadOfState, Capital, Code2. CountryLanguage -> CountryC... | what is the language of the smallest population country? |
world | select t1.name from country as t1 inner join countrylanguage as t2 on t1.code = t2.countrycode where t2.language = 'english' and t2.isofficial = 't' | Question: list down the name of countries whereby english is their official language. | Tables: City -> ID, Name, CountryCode, District, Population. Country -> Code, Name, Continent, Region, SurfaceArea, IndepYear, Population, LifeExpectancy, GNP, GNPOld, LocalName, GovernmentForm, HeadOfState, Capital, Code2. CountryL... | list down the name of countries whereby english is their official language. |
world | select t1.name, t2.language from country as t1 inner join countrylanguage as t2 on t1.code = t2.countrycode where t1.indepyear > 1990 and t2.isofficial = 't' | Question: list down the official language of the countries which declared independence after 1990, | Tables: City -> ID, Name, CountryCode, District, Population. Country -> Code, Name, Continent, Region, SurfaceArea, IndepYear, Population, LifeExpectancy, GNP, GNPOld, LocalName, GovernmentForm, HeadOfState, Capital, Co... | list down the official language of the countries which declared independence after 1990, |
world | select t2.percentage from country as t1 inner join countrylanguage as t2 on t1.code = t2.countrycode where t1.name = 'australia' and t2.language = 'english' | Question: what is the percentage of english used in australia? | Tables: City -> ID, Name, CountryCode, District, Population. Country -> Code, Name, Continent, Region, SurfaceArea, IndepYear, Population, LifeExpectancy, GNP, GNPOld, LocalName, GovernmentForm, HeadOfState, Capital, Code2. CountryLanguage -> CountryCode,... | what is the percentage of english used in australia? |
world | select t2.language from country as t1 inner join countrylanguage as t2 on t1.code = t2.countrycode where t1.name = 'malaysia' | Question: list down languages used in malaysia. | Tables: City -> ID, Name, CountryCode, District, Population. Country -> Code, Name, Continent, Region, SurfaceArea, IndepYear, Population, LifeExpectancy, GNP, GNPOld, LocalName, GovernmentForm, HeadOfState, Capital, Code2. CountryLanguage -> CountryCode, Language, IsOf... | list down languages used in malaysia. |
world | select t1.name from country as t1 inner join city as t2 on t1.code = t2.countrycode order by t2.population desc limit 1 | Question: which country has the most crowded city in the world? | Tables: City -> ID, Name, CountryCode, District, Population. Country -> Code, Name, Continent, Region, SurfaceArea, IndepYear, Population, LifeExpectancy, GNP, GNPOld, LocalName, GovernmentForm, HeadOfState, Capital, Code2. CountryLanguage -> CountryCode... | which country has the most crowded city in the world? |
world | select t2.lifeexpectancy from city as t1 inner join country as t2 on t1.countrycode = t2.code order by t1.population desc limit 1 | Question: what is the life expectancy of residents in the most crowded city? | Tables: City -> ID, Name, CountryCode, District, Population. Country -> Code, Name, Continent, Region, SurfaceArea, IndepYear, Population, LifeExpectancy, GNP, GNPOld, LocalName, GovernmentForm, HeadOfState, Capital, Code2. CountryLanguage -... | what is the life expectancy of residents in the most crowded city? |
world | select t2.gnp from city as t1 inner join country as t2 on t1.countrycode = t2.code order by t1.population asc limit 1 | Question: what is the gnp of the least crowded city in the world? | Tables: City -> ID, Name, CountryCode, District, Population. Country -> Code, Name, Continent, Region, SurfaceArea, IndepYear, Population, LifeExpectancy, GNP, GNPOld, LocalName, GovernmentForm, HeadOfState, Capital, Code2. CountryLanguage -> CountryCo... | what is the gnp of the least crowded city in the world? |
world | select name from ( select t1.name, t2.language from city as t1 inner join countrylanguage as t2 on t1.countrycode = t2.countrycode group by t1.name, t1.population, t2.language order by t1.population desc ) as t3 group by t3.name order by count(language) desc limit 1 | Question: within the 5 most crowded cities in the world, which country has the most languages used? | Tables: City -> ID, Name, CountryCode, District, Population. Country -> Code, Name, Continent, Region, SurfaceArea, IndepYear, Population, LifeExpectancy, GNP, GNPOld, LocalName, GovernmentForm, HeadOfState, Capital, C... | within the 5 most crowded cities in the world, which country has the most languages used? |
world | select t2.name from city as t1 inner join country as t2 on t1.countrycode = t2.code order by t1.population desc, t2.surfacearea desc limit 1 | Question: which country has the smallest surface area and the most crowded city? | Tables: City -> ID, Name, CountryCode, District, Population. Country -> Code, Name, Continent, Region, SurfaceArea, IndepYear, Population, LifeExpectancy, GNP, GNPOld, LocalName, GovernmentForm, HeadOfState, Capital, Code2. CountryLangua... | which country has the smallest surface area and the most crowded city? |
world | select t1.name from city as t1 inner join country as t2 on t1.countrycode = t2.code where t2.name = 'china' | Question: list down all cities of china. | Tables: City -> ID, Name, CountryCode, District, Population. Country -> Code, Name, Continent, Region, SurfaceArea, IndepYear, Population, LifeExpectancy, GNP, GNPOld, LocalName, GovernmentForm, HeadOfState, Capital, Code2. CountryLanguage -> CountryCode, Language, IsOfficial,... | list down all cities of china. |
world | select t1.name from city as t1 inner join country as t2 on t1.countrycode = t2.code where t2.localname = 'uman' | Question: what are the cities for country called 'uman' in local name. | Tables: City -> ID, Name, CountryCode, District, Population. Country -> Code, Name, Continent, Region, SurfaceArea, IndepYear, Population, LifeExpectancy, GNP, GNPOld, LocalName, GovernmentForm, HeadOfState, Capital, Code2. CountryLanguage -> Coun... | what are the cities for country called 'uman' in local name. |
world | select avg(t1.lifeexpectancy) from country as t1 inner join countrylanguage as t2 on t1.code = t2.countrycode where t2.language = 'arabic' | Question: what is the average life expentancy of countries that speak arabic? | Tables: City -> ID, Name, CountryCode, District, Population. Country -> Code, Name, Continent, Region, SurfaceArea, IndepYear, Population, LifeExpectancy, GNP, GNPOld, LocalName, GovernmentForm, HeadOfState, Capital, Code2. CountryLanguage ... | what is the average life expentancy of countries that speak arabic? |
world | select cast((t1.gnp - t1.gnpold) as real) / t1.gnpold from country as t1 inner join city as t2 on t1.code = t2.countrycode where t2.name = 'shanghai' | Question: what is the gnp growth rate by the country of shanghai? | Tables: City -> ID, Name, CountryCode, District, Population. Country -> Code, Name, Continent, Region, SurfaceArea, IndepYear, Population, LifeExpectancy, GNP, GNPOld, LocalName, GovernmentForm, HeadOfState, Capital, Code2. CountryLanguage -> CountryCo... | what is the gnp growth rate by the country of shanghai? |
world | select district from city where name = 'zaanstad' | Question: what is the district of zaanstad? | Tables: City -> ID, Name, CountryCode, District, Population. Country -> Code, Name, Continent, Region, SurfaceArea, IndepYear, Population, LifeExpectancy, GNP, GNPOld, LocalName, GovernmentForm, HeadOfState, Capital, Code2. CountryLanguage -> CountryCode, Language, IsOffici... | what is the district of zaanstad? |
world | select name from city order by population desc limit 1 | Question: what city has the highest population? | Tables: City -> ID, Name, CountryCode, District, Population. Country -> Code, Name, Continent, Region, SurfaceArea, IndepYear, Population, LifeExpectancy, GNP, GNPOld, LocalName, GovernmentForm, HeadOfState, Capital, Code2. CountryLanguage -> CountryCode, Language, IsOf... | what city has the highest population? |
world | select district from city where population = 201843 | Question: provide the district of the city with a population of 201843. | Tables: City -> ID, Name, CountryCode, District, Population. Country -> Code, Name, Continent, Region, SurfaceArea, IndepYear, Population, LifeExpectancy, GNP, GNPOld, LocalName, GovernmentForm, HeadOfState, Capital, Code2. CountryLanguage -> Cou... | provide the district of the city with a population of 201843. |
world | select name from country order by surfacearea desc limit 1 | Question: what country has the largest surface area? | Tables: City -> ID, Name, CountryCode, District, Population. Country -> Code, Name, Continent, Region, SurfaceArea, IndepYear, Population, LifeExpectancy, GNP, GNPOld, LocalName, GovernmentForm, HeadOfState, Capital, Code2. CountryLanguage -> CountryCode, Language,... | what country has the largest surface area? |
world | select count(*) from country where lifeexpectancy = 75.1 | Question: how many countries have a life expectancy of 75.1? | Tables: City -> ID, Name, CountryCode, District, Population. Country -> Code, Name, Continent, Region, SurfaceArea, IndepYear, Population, LifeExpectancy, GNP, GNPOld, LocalName, GovernmentForm, HeadOfState, Capital, Code2. CountryLanguage -> CountryCode, L... | how many countries have a life expectancy of 75.1? |
world | select indepyear from country where name = 'brunei' | Question: what is the year of independence of brunei? | Tables: City -> ID, Name, CountryCode, District, Population. Country -> Code, Name, Continent, Region, SurfaceArea, IndepYear, Population, LifeExpectancy, GNP, GNPOld, LocalName, GovernmentForm, HeadOfState, Capital, Code2. CountryLanguage -> CountryCode, Language... | what is the year of independence of brunei? |
world | select count(*) from country where gnp = 0 | Question: how many countries have no gnp? | Tables: City -> ID, Name, CountryCode, District, Population. Country -> Code, Name, Continent, Region, SurfaceArea, IndepYear, Population, LifeExpectancy, GNP, GNPOld, LocalName, GovernmentForm, HeadOfState, Capital, Code2. CountryLanguage -> CountryCode, Language, IsOfficial... | how many countries have no gnp? |
world | select avg(surfacearea) from country | Question: what is the average surface area of all countries? | Tables: City -> ID, Name, CountryCode, District, Population. Country -> Code, Name, Continent, Region, SurfaceArea, IndepYear, Population, LifeExpectancy, GNP, GNPOld, LocalName, GovernmentForm, HeadOfState, Capital, Code2. CountryLanguage -> CountryCode, L... | what is the average surface area of all countries? |
world | select count(distinct t2.language) from city as t1 inner join countrylanguage as t2 on t1.countrycode = t2.countrycode where t1.district = 'tocantins' | Question: how many languages are there in the country where tocantins district belongs? | Tables: City -> ID, Name, CountryCode, District, Population. Country -> Code, Name, Continent, Region, SurfaceArea, IndepYear, Population, LifeExpectancy, GNP, GNPOld, LocalName, GovernmentForm, HeadOfState, Capital, Code2. Countr... | how many languages are there in the country where tocantins district belongs? |
world | select t1.district from city as t1 inner join country as t2 on t1.countrycode = t2.code where t2.name = ( select name from country order by surfacearea desc limit 1 ) | Question: what are the districts that belong to the country with the largest surface area? | Tables: City -> ID, Name, CountryCode, District, Population. Country -> Code, Name, Continent, Region, SurfaceArea, IndepYear, Population, LifeExpectancy, GNP, GNPOld, LocalName, GovernmentForm, HeadOfState, Capital, Code2. Cou... | what are the districts that belong to the country with the largest surface area? |
world | select count(distinct t1.name) from city as t1 inner join country as t2 on t1.countrycode = t2.code where t2.headofstate = 'kostis stefanopoulos' | Question: how many cities are there in the country ruled by kostis stefanopoulos? | Tables: City -> ID, Name, CountryCode, District, Population. Country -> Code, Name, Continent, Region, SurfaceArea, IndepYear, Population, LifeExpectancy, GNP, GNPOld, LocalName, GovernmentForm, HeadOfState, Capital, Code2. CountryLangu... | how many cities are there in the country ruled by kostis stefanopoulos? |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.