Chinastark/bird_dataset huggingface dataset:
Database: world_development_indicators
Note: incomegroup = 'Middle income'; year = 1960; urban population refers to indicatorname;
Question: How much is the total urban population of middle income countries in 1960?
SQL: SELECT sum(indicators.value) FROM country INNER JOIN indicators ON country.countrycode = indicators.countrycode WHERE country.incomegroup LIKE '%middle income' AND indicators.year = 1960 AND indicators.indicatorname = 'Urban population'
Database: world_development_indicators
Note: fastest growth refers to MAX(value); indicatorname = 'Adjusted net national income (annual % growth)'; year = '1980'; currency refers to currencyunit;
Question: Name the country with fastest growth in adjusted net national income in 1980 and state the currency used by this country.
SQL: SELECT indicators.countryname, country.currencyunit FROM country INNER JOIN indicators ON country.countrycode = indicators.countrycode WHERE indicators.indicatorname = 'Adjusted net national income (annual % growth)' AND indicators.year = 1980 AND country.currencyunit != '' ORDER BY indicators.value DESC LIMIT 1
Database: world_development_indicators
Note: use the 1993 System of National Accounts methodology refers to systemofnationalaccounts = '1993 System of National Accounts methodology.';
Question: How many countries using the 1993 System of National Accounts methodology?
SQL: SELECT count(countrycode) FROM country WHERE systemofnationalaccounts = 'Country uses the 1993 System of National Accounts methodology.'
Database: world_development_indicators
Note: have completed vital registration refers to vitalregistrationcomplete = Yes; country name refers to shortname;
Question: Which country have completed vital registration? List all the countries.
SQL: SELECT shortname FROM country WHERE vitalregistrationcomplete = 'Yes'
Database: world_development_indicators
Note: from 2010 until 2012 refers to latestpopulationcensus between '2010' and '2012'; have completed vital registration refers to vitalregistrationcomplete = 'Yes'; countryname = shortname + longname;
Question: Which country have conducted population census from 2010 until 2012 and have completed vital registration?
SQL: SELECT shortname, longname FROM country WHERE latestpopulationcensus >= 2010 AND latestpopulationcensus < 2013 AND vitalregistrationcomplete = 'Yes'
Database: world_development_indicators
Note: which country refers to countryname; the highest CO2 emissions refers to max(value where indicatorname = 'CO2 emissions (metric tons per capita)'); in 1960 refers to year = '1970';
Question: Which country have the highest CO2 emissions in 1960?
SQL: SELECT countryname FROM indicators WHERE YEAR = 1960 AND indicatorname = 'CO2 emissions (metric tons per capita)' ORDER BY value DESC LIMIT 1
Database: world_development_indicators
Note: ratio = divide(max(value where indicatorname = 'Number of infant deaths' and year = '1971'), min(value where indicatorname = 'Number of infant deaths' and year = '1971')); the highest number of infant deaths in 1971 refers to max(value where indicatorname = 'Number of infant deaths' and year = '1971'); the lowest number of infant deaths in 1971 refers to min(value where indicatorname = 'Number of infant deaths' and year = '1971');
Question: What is the ratio between country with the highest number of infant deaths in 1971 and the lowest number of infant deaths in 1971? List the country with the highest number of infant deaths in 1971 and the lowest number of infant deaths in 1971.
SQL: SELECT cast(max(value) AS REAL) / min(value) FROM indicators WHERE indicatorname = 'Number of infant deaths' AND YEAR = '1971' UNION ALL SELECT countryname FROM ( SELECT countryname, max(value) FROM indicators WHERE indicatorname = 'Number of infant deaths' AND YEAR = '1971' ) UNION SELECT countryname FROM ( SELECT countryname, min(value) FROM indicators WHERE indicatorname = 'Number of infant deaths' AND YEAR = '1971' )
Database: world_development_indicators
Note: what country refers to shortname;
Question: What country have the series code of SP.DYN.CBRT.IN?
SQL: SELECT country.shortname FROM country INNER JOIN countrynotes ON country.countrycode = countrynotes.countrycode WHERE countrynotes.seriescode = 'SP.DYN.CBRT.IN'
Database: world_development_indicators
Note: which country refers to shortname; have data classified as official aid refers to description = 'Data are classified as official aid.';
Question: Which country have data classified as official aid?
SQL: SELECT DISTINCT country.countrycode FROM country INNER JOIN footnotes ON country.countrycode = footnotes.countrycode WHERE footnotes.description = 'Data are classified as official aid.'
Database: world_development_indicators
Note: what country refers to longname; have its data estimated based on regression refers to description = 'Estimates are based on regression.';
Question: What country have its data estimated based on regression?
SQL: SELECT DISTINCT country.shortname FROM country INNER JOIN countrynotes ON country.countrycode = countrynotes.countrycode WHERE countrynotes.description = 'Estimates are based on regression.'
Database: world_development_indicators
Note: country refers to longname; have more than 2000000 urban population refers to value where indicatorname = 'Urban population'>2000000; in 1970 refers to year = '1970';
Question: List all the country in East Asia & Pacific region that have more than 2000000 urban population in 1970.
SQL: SELECT DISTINCT country.countrycode FROM country INNER JOIN indicators ON country.countrycode = indicators.countrycode WHERE indicators.year = 1970 AND country.region = 'East Asia & Pacific' AND indicators.value > 2000000 AND indicators.indicatorname = 'Urban population'
Database: world_development_indicators
Note: in 1960 refers to year = '1960'; the largest population refers to max(value where indicatorname = 'Population, total'); country with upper middle income refers to incomegroup = 'Upper middle income';
Question: In 1960, what is largest population for country with upper middle income?
SQL: SELECT max(indicators.value) FROM country INNER JOIN indicators ON country.countrycode = indicators.countrycode WHERE country.incomegroup = 'Upper middle income' AND indicators.year = 1960 AND indicators.indicatorname = 'Population, total'
Database: world_development_indicators
Note: uses the 1968 System of National Accounts methodology refers to systemofnationalaccounts = '1968 System of National Accounts methodology';
Question: How many countries uses the 1968 System of National Accounts methodology?
SQL: SELECT count(countrycode)  FROM country WHERE systemofnationalaccounts = 'Country uses the 1968 System of National Accounts methodology.'
Database: world_development_indicators
Note: upper middle income country refers to incomegroup = 'Upper middle income';
Question: What upper middle income country under East Asia & Pacific region which covers the topic about Social Protection & Labor: Migration ? Indicate the short name of the said country.
SQL: SELECT DISTINCT country.shortname FROM country INNER JOIN footnotes ON country.countrycode = footnotes.countrycode INNER JOIN series ON footnotes.seriescode = series.seriescode WHERE country.incomegroup = 'Upper middle income' AND country.region = 'East Asia & Pacific' AND series.topic = 'Social Protection & Labor: Migration'
Database: world_development_indicators
Question: Name the country in which the topic is about Poverty: Shared Prosperity. Indicate the long name of the country.
SQL: SELECT DISTINCT country.longname FROM country INNER JOIN footnotes ON country.countrycode = footnotes.countrycode INNER JOIN series ON footnotes.seriescode = series.seriescode WHERE series.topic = 'Poverty: Shared prosperity'
Database: world_development_indicators
Note: the latest trade data refers to latesttradedata = '2013'; with a series code of "SP.DYN.CDRT.IN " refers to indicatorcode = 'SP.DYN.CDRT.IN';
Question: What country has the latest trade data with a series code of "SP.DYN.CDRT.IN "? List the table name of the country.
SQL: SELECT DISTINCT country.tablename FROM country INNER JOIN indicators ON country.countrycode = indicators.countrycode WHERE country.latesttradedata = 2013 AND indicators.indicatorcode = 'SP.DYN.CDRT.IN'
Database: world_development_indicators
Question: What country in the region of Sub-Saharan Africa has a series code of "SP.DYN.AMRT.FE"? Indicate the long name of the country
SQL: SELECT DISTINCT country.longname FROM seriesnotes INNER JOIN countrynotes ON seriesnotes.seriescode = countrynotes.seriescode INNER JOIN country ON countrynotes.countrycode = country.countrycode WHERE country.region = 'Sub-Saharan Africa' AND seriesnotes.seriescode = 'SP.DYN.AMRT.FE'
Database: world_development_indicators
Note: any 3 countries refers to count(shortname)>3;
Question: How many countries are using the same type of currency? Please list the short names of any 3 countries.
SQL: SELECT shortname FROM country WHERE currencyunit = 'U.S. dollar' LIMIT 3
Database: world_development_indicators
Note: South Asian nations refers to region = 'South Asia'; have low incomes refers to incomegroup = 'Low income'; the entire names refers to longname;
Question: What South Asian nations have low incomes? Please include the entire names of the nations in your answer.
SQL: SELECT longname FROM country WHERE incomegroup = 'Low income' AND region = 'South Asia'
Database: world_development_indicators
Note: full name refers to longname; using special trade system refers to systemoftrade = 'Special trade system';
Question: Please provide full name of any two countries using special trade system.
SQL: SELECT longname FROM country WHERE systemoftrade = 'Special trade system' LIMIT 2
Database: world_development_indicators
Note: the highest proportion of CO2 emissions from transport refers to max(value where indicatorname = 'CO2 emissions from transport (% of total fuel combustion)');
Question: Which country has had the highest proportion of CO2 emissions from transport?
SQL: SELECT countryname FROM indicators WHERE indicatorname LIKE 'CO2 emissions FROM transport%' ORDER BY value DESC LIMIT 1
Database: world_development_indicators
Note: which country refers to countryname; the lowest percentage of arable land refers to min(value where indicatorname = 'Arable land (% of land area)');
Question: Which country has the lowest percentage of arable land?
SQL: SELECT countryname FROM indicators WHERE indicatorname LIKE 'Arable land (% of land area)' ORDER BY value DESC LIMIT 1
Database: world_development_indicators
Note: subjects refers to topic; a restricted type of license refers to  licensetype = 'Restricted';
Question: What are the subjects of series that have a restricted type of license?
SQL: SELECT DISTINCT topic FROM series WHERE licensetype = 'Restricted'
Database: world_development_indicators
Note: in the upper middle income category refers to incomegroup = 'Upper middle income'; still have unfinished external debt reporting refers to externaldebtreportingstatus = 'Preliminary';
Question: Which countries in the upper middle income category still have unfinished external debt reporting? Please provide the country codes in your answer.
SQL: SELECT countrycode FROM country WHERE incomegroup = 'Upper middle income' AND externaldebtreportingstatus = 'Preliminary'
Database: world_development_indicators
Note: percentage = divide(count(countrycode where  externaldebtreportingstatus = 'Actual' ), count(countrycode))*100%; in the Middle East and North Africa refers to region = 'Middle East & North Africa'; have finished reporting on their real external debt refers to externaldebtreportingstatus = 'Actual';
Question: What is the percentage of countries in the Middle East and North Africa that have finished reporting on their real external debt?
SQL: SELECT cast(sum(CASE WHEN externaldebtreportingstatus = 'Actual' THEN 1 ELSE 0 END) AS REAL) * 100 / count(countrycode) FROM country WHERE region = 'Middle East & North Africa'
Database: world_development_indicators
Note: have completed the actual external debt reporting refers to externaldebtreportingstatus = 'Actual';
Question: Which form of government has more countries that have completed the actual external debt reporting between the two types of government accounting concepts, budgetary central government vs. consolidated central government?
SQL: SELECT sum(CASE WHEN governmentaccountingconcept = 'Budgetary central government' THEN 1 ELSE 0 END), sum(CASE WHEN governmentaccountingconcept = 'Consolidated central government' THEN 1 ELSE 0 END) central_nums FROM country WHERE externaldebtreportingstatus = 'Actual'
Database: world_development_indicators
Note: in East Asia and the Pacific refers to region = 'East Asia & Pacific'; have completed their external debt reporting on time refers to externaldebtreportingstatus = 'Estimate';
Question: How many nations in East Asia and the Pacific have completed their external debt reporting on time?
SQL: SELECT count(countrycode)  FROM country WHERE region = 'East Asia & Pacific' AND externaldebtreportingstatus = 'Estimate'
Database: world_development_indicators
Note: proportion = divide(count(countrycode where incomegroup = 'Low income'), count(countrycode))*100%; Sub-Saharan Africa's countries refers to region = 'Sub-Saharan Africa'; have lower middle incomes refers to incomegroup = 'Low income';
Question: What proportion of Sub-Saharan Africa's countries have lower middle incomes?
SQL: SELECT sum(CASE WHEN incomegroup = 'Lower middle income' THEN 1 ELSE 0 END) * 100.0 / count(countrycode) persentage FROM country WHERE region = 'Sub-Saharan Africa'
Database: world_development_indicators
Note: from 1961 to 1980 refers to year between '1961' and '1980'; the highest percentage of land used for agriculture refers to max(value where indicatorname = 'Agricultural land (% of land area)'); in the Republic of Benin refers to longname = 'Republic of Benin';
Question: From 1961 to 1980, what was the highest percentage of land used for agriculture in the Republic of Benin?
SQL: SELECT max(indicators.value) FROM indicators INNER JOIN country ON indicators.countrycode = country.countrycode WHERE indicators.year >= 1961 AND indicators.year < 1981 AND indicators.indicatorname LIKE 'Agricultural land (% of land area)' AND country.longname = 'Republic of Benin'
Database: world_development_indicators
Note: full name refers to longname;
Question: Please list the full names of any three countries that have their series code with a description of UN Energy Statistics (2014).
SQL: SELECT DISTINCT country.longname FROM countrynotes INNER JOIN country ON countrynotes.countrycode = country.countrycode WHERE countrynotes.description = 'Sources: UN Energy Statistics (2014)' LIMIT 3
Database: world_development_indicators
Note: deposit interest rate refers to value where indicatorname = 'Deposit interest rate (%)'; in the Commonwealth of Australia refers to  longname = 'Commonwealth of Australia'; in 1979 refers to year = '1979';
Question: What was the deposit interest rate in the Commonwealth of Australia in 1979 in percentage?
SQL: SELECT indicators.value FROM indicators INNER JOIN country ON indicators.countrycode = country.countrycode WHERE country.longname = 'Commonwealth of Australia' AND indicators.indicatorname = 'Deposit interest rate (%)' AND indicators.year = 1979
Database: world_development_indicators
Note: Germany refers to shortname = 'Germany';
Question: What is the series code for Germany and what is its description?
SQL: SELECT countrynotes.seriescode, countrynotes.description FROM countrynotes INNER JOIN country ON countrynotes.countrycode = country.countrycode WHERE country.shortname = 'Germany'
Database: world_development_indicators
Note: subject refers to topic; Austria refers to shortname = 'Austria';
Question: Please provide the subject of series of Austria.
SQL: SELECT DISTINCT series.topic FROM countrynotes INNER JOIN country ON countrynotes.countrycode = country.countrycode INNER JOIN series ON countrynotes.seriescode = series.seriescode WHERE country.shortname = 'Austria'
Database: world_development_indicators
Note: subject refers to topic; pertain to refers to description;
Question: What is the subject of the series SP.DYN.AMRT.MA and what does it pertain to?
SQL: SELECT DISTINCT series.topic, seriesnotes.description FROM series INNER JOIN seriesnotes ON series.seriescode = seriesnotes.seriescode WHERE series.seriescode = 'SP.DYN.AMRT.MA'
Database: world_development_indicators
Note: described as "unspecified" refers to description = 'Not specified'; full names refers to longname;
Question: How many countries are having their country's footnotes described as "unspecified"? Please provide the full names of any three of those countries.
SQL: SELECT count(DISTINCT country.countrycode)  FROM country INNER JOIN footnotes ON country.countrycode = footnotes.countrycode WHERE footnotes.description = 'Unspecified' OR footnotes.description = 'Not specified' UNION SELECT country.longname FROM country INNER JOIN footnotes ON country.countrycode = footnotes.countrycode WHERE footnotes.description = 'Unspecified' OR footnotes.description = 'Not specified' LIMIT 4
Database: world_development_indicators
Note: completed its external debt reporting refers to externaldebtreportingstatus = 'Actual'; in 1980 refers to year = 1980; Land under cereal production value of 3018500 refers to value = 3018500;
Question: Which nation completed its external debt reporting in 1980 and had a Land under cereal production value of 3018500?
SQL: SELECT country.countrycode FROM indicators INNER JOIN country ON indicators.countrycode = country.countrycode WHERE indicators.indicatorname LIKE 'Land under cereal production%' AND indicators.value = 3018500 AND indicators.year = 1980 AND country.externaldebtreportingstatus = 'Actual'
Database: world_development_indicators
Note: portion = divide(count(countryname where year = '1961' and value>50), count(countryname))*100%; nations in Latin America and the Caribbean refers to region = 'Latin America & Caribbean';  more than 50% of their land used for agriculture refers to value where indicatorname = 'Agricultural land (% of land area)'>50; in 1961 refers to year = '1961';
Question: What portion of the nations in Latin America and the Caribbean had more than 50% of their land used for agriculture in 1961?
SQL: SELECT cast(sum(CASE WHEN indicators.value > 50 THEN 1 ELSE 0 END) AS REAL) * 100 / count(country.countrycode) FROM indicators INNER JOIN country ON indicators.countrycode = country.countrycode WHERE indicators.year = 1961 AND country.region = 'Latin America & Caribbean' AND indicatorname = 'Agricultural land (% of land area)'
Database: world_development_indicators
Note: full name refers to longname; the countries in South Asia refer to region = 'South Asia'; belongs to the low income group refers to incomegroup = 'Low income';
Question: What are the full names of the countries in South Asia that belongs to the low income group?
SQL: SELECT longname FROM country WHERE incomegroup = 'Low income' AND region = 'South Asia'
Database: world_development_indicators
Note: Mobile Cellular Subscriptions refers to indicatorname = 'Mobile cellular subscriptions'; Brazil refers to countryname = 'Brazil';
Question: What is the indicator code for Mobile Cellular Subscriptions of Brazil?
SQL: SELECT DISTINCT indicatorcode FROM indicators WHERE countryname = 'Brazil' AND indicatorname = 'Mobile cellular subscriptions'
Database: world_development_indicators
Note: countries in Europe & Central Asia refer to region = 'Europe & Central Asia'; uses Danish krone refers to currencyunit = 'Danish krone'; full name refers to longname;
Question: How many countries in Europe & Central Asia uses Danish krone as its currency? List the full names of those coutnries.
SQL: SELECT count(longname) FROM country WHERE region = 'Europe & Central Asia' AND currencyunit = 'Danish krone' UNION SELECT longname FROM country WHERE currencyunit = 'Danish krone' AND region = 'Europe & Central Asia'
Database: world_development_indicators
Note: the highest percentage of rural population in the overall total population refers to max(value where indicatorname = 'Rural population (% of total population)');
Question: What is the name of the country with the highest percentage of rural population in the overall total population? Indicate the rural population percentage of total population.
SQL: SELECT countryname, max(value) FROM indicators WHERE indicatorname = 'Rural population (% of total population)'
Database: world_development_indicators
Note: have a latest population census in 2011 refers to latestpopulationcensus = '2011'; full name refers to longname;
Question: How many countries have a latest population census in 2011? Indicate their full names.
SQL: SELECT count(longname) FROM country WHERE latestpopulationcensus = '2011' UNION ALL SELECT longname FROM country WHERE latestpopulationcensus = '2011'
Database: world_development_indicators
Note: agricultural land area in sq. km refers value where indicatorname = 'Agricultural land (sq. km)'; Italy refers to countryname = 'Italy'; in 1968 refers to year = '1968';
Question: What is the agricultural land area in sq. km of Italy in 1968?
SQL: SELECT value FROM indicators WHERE indicatorname = 'Agricultural land (sq. km)' AND YEAR = 1968 AND countryname = 'Italy'
Database: world_development_indicators
Note: in Sub-Saharan Africa refers to region = 'Sub-Saharan Africa'; the higest number of female out-of-school children of primary school age refers to max(value where indicatorname = 'Out-of-school children of primary school age, female (number)');
Question: In Sub-Saharan Africa, how many female out-of-school children of primary school age are there in the country with the higest number of female out-of-school children of primary school age? Indicate the year of when it was recorded.
SQL: SELECT max(indicators.value), indicators.year FROM indicators INNER JOIN country ON indicators.countrycode = country.countrycode WHERE country.region = 'Sub-Saharan Africa' AND indicators.indicatorname = 'Out-of-school children of primary school age, female (number)'
Database: world_development_indicators
Note: number of infant deaths refers to indicatorname = 'Number of infant deaths'; in year 1965 refers to year = '1965'; full name is Islamic State of Afghanistan refers to longname = 'Islamic State of Afghanistan';
Question: What is the series code for number of infant deaths in year 1965 for the country whose full name is Islamic State of Afghanistan?
SQL: SELECT DISTINCT countrynotes.seriescode FROM country INNER JOIN indicators ON country.countrycode = indicators.countrycode INNER JOIN countrynotes ON indicators.countrycode = countrynotes.countrycode WHERE indicators.indicatorname = 'Number of infant deaths' AND country.longname = 'Islamic State of Afghanistan' AND indicators.year = 1965
Database: world_development_indicators
Note: uses the 1968 System of National Accounts methodology refers to systemofnationalaccounts = '1968 System of National Accounts methodology'; in the Middle East & North Africa refers to region = 'Middle East & North Africa'; the highest CO2 emissions from solid fuel consumption in kiloton refers to max(value where indicatorname = 'CO2 emissions from solid fuel consumption (kt)');
Question: Among the countries who uses the 1968 System of National Accounts methodology, how many are in the Middle East & North Africa? Name the country with the highest CO2 emissions from solid fuel consumption in kiloton.
SQL: SELECT count(DISTINCT indicators.countrycode) FROM indicators INNER JOIN country ON indicators.countrycode = country.countrycode WHERE country.region = 'Middle East & North Africa' AND country.systemofnationalaccounts = 'Country uses the 1968 System of National Accounts methodology.' AND indicators.indicatorname = 'CO2 emissions FROM solid fuel consumption (kt)' UNION SELECT * FROM ( SELECT indicators.countryname FROM indicators INNER JOIN country ON indicators.countrycode = country.countrycode WHERE country.region = 'Middle East & North Africa' AND country.systemofnationalaccounts = 'Country uses the 1968 System of National Accounts methodology.' AND indicators.indicatorname = 'CO2 emissions FROM solid fuel consumption (kt)' GROUP BY indicators.countryname ORDER BY sum(indicators.value) DESC LIMIT 1 )