db_id
stringclasses
68 values
question
stringlengths
24
325
evidence
stringlengths
0
580
SQL
stringlengths
23
728
music_tracker
How many releases are tagged "1980s"?
tag = '1980s';
SELECT COUNT(id) FROM tags WHERE tag LIKE '1980s'
music_tracker
How many times has the release "city funk" been downloaded?
groupName = 'city funk'; downloaded refers to totalSnatched;
SELECT totalSnatched FROM torrents WHERE groupName LIKE 'city funk'
music_tracker
Please list the releases that have been downloaded for more than 20000 times.
releases refer to groupName; downloaded for more than 20000 times refers to totalSnatched > 20000;
SELECT groupName FROM torrents WHERE totalSnatched > 20000
music_tracker
What are the tags of the release "sugarhill gang"?
release "sugarhill gang" refers to groupName = 'sugarhill gang';
SELECT T2.tag FROM torrents AS T1 INNER JOIN tags AS T2 ON T1.id = T2.id WHERE T1.groupName = 'sugarhill gang'
music_tracker
How many tags does the release "city funk" have?
release "city funk" refers to groupName = 'city funk';
SELECT COUNT(T2.tag) FROM torrents AS T1 INNER JOIN tags AS T2 ON T1.id = T2.id WHERE T1.groupName = 'city funk'
music_tracker
Please list the titles of all the releases with the tag "1980s".
titles refer to groupName;
SELECT T1.groupName FROM torrents AS T1 INNER JOIN tags AS T2 ON T1.id = T2.id WHERE T2.tag = '1980s'
music_tracker
Among the releases with the tag "1980s", which one of them is the most downloaded? Please give its title.
title refers to groupName; the most downloaded refers to MAX(totalSnatched);
SELECT T1.groupName FROM torrents AS T1 INNER JOIN tags AS T2 ON T1.id = T2.id WHERE T2.tag = '1980s' ORDER BY T1.totalSnatched DESC LIMIT 1
music_tracker
How many releases by the artist michael jackson are tagged "pop"?
tag = 'pop';
SELECT COUNT(T1.groupName) FROM torrents AS T1 INNER JOIN tags AS T2 ON T1.id = T2.id WHERE T2.tag = 'pop' AND T1.artist = 'michael jackson'
music_tracker
Among the releases that were released in 2000, how many of them were released as an album and tagged "pop"?
groupYear = 2000; album refers to releaseType;
SELECT COUNT(T1.groupName) FROM torrents AS T1 INNER JOIN tags AS T2 ON T1.id = T2.id WHERE T2.tag = 'pop' AND T1.releaseType = 'album' AND T1.groupYear = 2000
music_tracker
What are the average download times for the a release tagged "1980s"?
AVG(totalSnatched where tag = '1980s');
SELECT CAST(SUM(T1.totalSnatched) AS REAL) / COUNT(T2.tag) FROM torrents AS T1 INNER JOIN tags AS T2 ON T1.id = T2.id WHERE T2.tag = '1980s'
music_tracker
Name the title of the top three releases with the highest number of downloads.
title refers to groupName; the highest number of downloads refers to MAX(totalSnatched);
SELECT groupName FROM torrents ORDER BY totalSnatched DESC LIMIT 3
music_tracker
How many albums and Single-Tables were released by the artist named '50 cent' between 2010 and 2015?
albums refer to releaseType = 'album'; releaseType = 'single'; between 2010 and 2015 refers to groupYear between 2010 and 2015;
SELECT COUNT(id), ( SELECT COUNT(id) FROM torrents WHERE groupYear BETWEEN 2010 AND 2015 AND artist LIKE '50 cent' AND releaseType LIKE 'album' ) FROM torrents WHERE groupYear BETWEEN 2010 AND 2015 AND artist LIKE '50 cent' AND releaseType LIKE 'Single'
music_tracker
Provide the title, release year and the tag associated with the live album that has the highest number of downloads?
release year refers to groupYear; title of live album refers to groupName where releaseType = 'live album'; the highest number of downloads refers to MAX(totalSnatched);
SELECT T1.groupName, T1.groupYear, T2.tag FROM torrents AS T1 INNER JOIN tags AS T2 ON T1.id = T2.id WHERE T1.releaseType = 'live album' ORDER BY T1.totalSnatched DESC LIMIT 1
music_tracker
Provide the name of artists who released at least two bootlegs in 2016.
at least two bootlegs refer to COUNT(releaseType = 'bootleg')≥ 2; groupYear = 2016;
SELECT artist FROM torrents WHERE groupYear = 2016 AND releaseType LIKE 'bootleg' GROUP BY artist HAVING COUNT(releaseType) > 2
music_tracker
Which artist released singles between 1980 to 1982?
releaseType = 'single'; between 1980 to 1982 refers to groupYear between 1980 and 1982;
SELECT artist FROM torrents WHERE groupYear BETWEEN 1980 AND 1982 AND releaseType LIKE 'single'
music_tracker
Indicates groups with id from 10 to 20 with singles downloaded at least 20.
releaseType = 'single'; downloaded at least 20 refers to totalSnatched ≥ 20; id from 10 to 20 refer to id between 10 and 20; groups refer to groupName;
SELECT groupName FROM torrents WHERE totalSnatched >= 20 AND releaseType LIKE 'single' AND id BETWEEN 10 AND 20
music_tracker
Among the artists from 1980 to 1982. Which artist was tagged as "disco"?
from 1980 to 1982 refers to groupYear between 1980 and 1982; tag = 'disco';
SELECT T1.artist FROM torrents AS T1 INNER JOIN tags AS T2 ON T1.id = T2.id WHERE T2.tag = 'disco' AND T1.groupYear BETWEEN 1980 AND 1982
music_tracker
Provide the name of artists who had no more than 100 downloads and are tagged "funk" in 1980.
no more than 100 downloads refer to totalSnatched ≤ 100; groupYear = 1980; tag = 'funk';
SELECT T1.artist FROM torrents AS T1 INNER JOIN tags AS T2 ON T1.id = T2.id WHERE T2.tag = 'funk' AND T1.groupYear = 1980 AND T1.totalSnatched <= 100
music_tracker
Which artist has released the most singles with the tag "soul"?
the most singles refer to MAX(COUNT(releaseType = 'single'));
SELECT T1.artist FROM torrents AS T1 INNER JOIN tags AS T2 ON T1.id = T2.id WHERE T2.tag = 'soul' AND T1.releaseType = 'single' GROUP BY T1.artist ORDER BY COUNT(T1.releaseType) DESC LIMIT 1
music_tracker
Among the artists with the id from 10 to 30. Which artist released the product with the tag "funk" in 1980?
id from 10 to 30 refers to id between 10 and 30; groupYear = 1980;
SELECT T1.artist FROM torrents AS T1 INNER JOIN tags AS T2 ON T1.id = T2.id WHERE T2.tag = 'funk' AND T1.groupYear = 1980 AND T1.id BETWEEN 10 AND 30
music_tracker
List the group name has the most downloaded that have released jazz genres from 1982 or later.
the most downloaded refers to MAX(totalSnatched); tag = 'jazz'; from 1982 or later refers to groupYear ≥ 1982;
SELECT T1.groupName FROM torrents AS T1 INNER JOIN tags AS T2 ON T1.id = T2.id WHERE T2.tag = 'jazz' AND T1.groupYear >= 1982 ORDER BY T1.totalSnatched DESC LIMIT 1
music_tracker
Which artist has id "16"? Provide her or his tag genre.
FALSE;
SELECT T2.tag FROM torrents AS T1 INNER JOIN tags AS T2 ON T1.id = T2.id WHERE T1.id = 16
music_tracker
Among id from 10 to 50. Which artist tagged as "new.york" has the most downloads?
Among id from 10 to 50 refers to id between 10 and 50; tag = 'new.york'; the most downloads refer to MAX(totalSnatched);
SELECT T1.artist FROM torrents AS T1 INNER JOIN tags AS T2 ON T1.id = T2.id WHERE T1.id BETWEEN 10 AND 50 AND T2.tag LIKE 'new.york' ORDER BY T1.totalSnatched DESC LIMIT 1
music_tracker
List the name of artists who have released albums and mixtape from 1980 to 1985 in "dance" genre.
albums and mixtape refer to releaseType; from 1980 to 1985 refers to groupYear between 1980 and 1985; tag = 'dance';
SELECT COUNT(T1.artist) FROM torrents AS T1 INNER JOIN tags AS T2 ON T1.id = T2.id WHERE T2.tag = 'dance' AND T1.groupYear BETWEEN 1980 AND 1985 AND T1.releaseType LIKE 'album' OR T1.releaseType LIKE 'mixtape'
music_tracker
How many singles were released between 1979 and 1981 labeled as "soul"?
releaseType = 'single'; between 1979 and 1981 refers to groupYear between 1979 and 1981; tag = 'soul';
SELECT COUNT(T2.tag) FROM torrents AS T1 INNER JOIN tags AS T2 ON T1.id = T2.id WHERE T2.tag = 'soul' AND T1.groupYear BETWEEN 1979 AND 1981 AND T1.releaseType LIKE 'single'
music_tracker
How many singles were released in 1979?
releaseType = 'single'; groupYear = 1979;
SELECT COUNT(releaseType) FROM torrents WHERE releaseType LIKE 'single' AND groupYear = 1979
music_tracker
In 1980, how many singles were released by sugar daddy?
sugar daddy is an artist; releaseType = 'single'; groupYear = 1980;
SELECT COUNT(releaseType) FROM torrents WHERE artist LIKE 'sugar daddy' AND releaseType LIKE 'Single' AND groupYear = 1980
music_tracker
How many christmas albums were released in 2004?
album refers to releaseType; groupYear = 2004; tag = 'christmas';
SELECT COUNT(T1.id) FROM torrents AS T1 INNER JOIN tags AS T2 ON T1.id = T2.id WHERE T2.tag = 'christmas' AND T1.groupYear = 2004 AND T1.releaseType LIKE 'album'
music_tracker
Please list all tags of kurtis blow from 2000 to 2010.
kurtis blow is an artist; from 2000 to 2010 refers to groupYear between 2000 and 2010;
SELECT T2.tag FROM torrents AS T1 INNER JOIN tags AS T2 ON T1.id = T2.id WHERE T1.groupYear BETWEEN 2000 AND 2010 AND T1.artist LIKE 'kurtis blow'
music_tracker
Which album title and tag that millie jackson released in 1980?
millie jackson is an artist; album title refers to groupName where releaseType = 'album'; groupYear = 1980;
SELECT T1.groupName, T2.tag FROM torrents AS T1 INNER JOIN tags AS T2 ON T1.id = T2.id WHERE T1.groupYear = 1980 AND T1.artist LIKE 'millie jackson' AND T1.releaseType LIKE 'album'
music_tracker
Please list all release titles whose tag is jazz in 2005.
release titles refer to groupName; groupYear = 2005;
SELECT T1.groupName FROM torrents AS T1 INNER JOIN tags AS T2 ON T1.id = T2.id WHERE T1.groupYear = 2005 AND T2.tag LIKE 'jazz'
music_tracker
From 1980 to 2000, which artist had the most disco releases?
From 1980 to 2000 refers to groupYear between 1980 and 2000; tag = 'disco'; the most releases refer to MAX(COUNT(id));
SELECT T1.artist FROM torrents AS T1 INNER JOIN tags AS T2 ON T1.id = T2.id WHERE T1.groupYear BETWEEN 1980 AND 2000 AND T2.tag LIKE 'disco' GROUP BY T1.artist ORDER BY COUNT(T2.tag) DESC LIMIT 1
music_tracker
Which artists have released singles with the tag 1970s?
releaseType = 'single';
SELECT T1.artist FROM torrents AS T1 INNER JOIN tags AS T2 ON T1.id = T2.id WHERE T1.releaseType = 'single' AND T2.tag LIKE '1970s'
music_tracker
From 1979 to 1982, what was the percentage of united.states albums out of total albums were released?
From 1979 to 1982 refers to groupYear between 1979 and 1982; United States refer to tag; albums refer to releaseType; DIVIDE(COUNT(releaseType = 'album' where tag = 'united.states' and groupYear between 1979 and 1982), COUNT(releaseType = 'album' where groupYear between 1979 and 1982)) as percentage;
SELECT CAST(SUM(CASE WHEN T2.tag LIKE 'united.states' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.releaseType) FROM torrents AS T1 INNER JOIN tags AS T2 ON T1.id = T2.id WHERE T1.groupYear BETWEEN 1979 AND 1982 AND T1.releaseType LIKE 'album'
world_development_indicators
Among the countries in the group of Heavily Indebted Poor Countries, how many of them are under the lending category of the International Development Associations?
group of Heavily Indebted Poor Countries is OtherGroups = 'HIPC'; International Development Associations refers to lendingcategory = 'IDA'
SELECT COUNT(CountryCode) FROM Country WHERE LendingCategory = 'IDA' AND OtherGroups = 'HIPC'
world_development_indicators
Please list the countries under the lending category of the International Development Associations and have a external debt reporting finished by estimation.
countries refer to the ShortName; International Development Associations refers to lendingcategory = 'IDA'; have a external debt reporting finished by estimation refers to ExternalDebtReportingStatus = 'Estimate'
SELECT ShortName, ExternalDebtReportingStatus FROM Country WHERE LendingCategory = 'IDA'
world_development_indicators
What's the description of the series code SM.POP.TOTL for Aruba?
Aruba is the name of the country where ShortName = 'Aruba'
SELECT T2.Description FROM Country AS T1 INNER JOIN CountryNotes AS T2 ON T1.CountryCode = T2.Countrycode WHERE T1.ShortName = 'Aruba' AND T2.Seriescode = 'SM.POP.TOTL'
world_development_indicators
Please list the countries in Latin America & Caribbean with a note on the series code SM.POP.TOTL.
Countries refer to the ShortName; Latin America & Caribbean is the name of the region
SELECT T1.SHORTNAME, T2.Description FROM Country AS T1 INNER JOIN CountryNotes AS T2 ON T1.CountryCode = T2.Countrycode WHERE T1.Region = 'Latin America & Caribbean' AND T2.Seriescode = 'SM.POP.TOTL'
world_development_indicators
Among the countries with note on the series code SM.POP.TOTL, how many of them are in the low-income group?
countries refer to Countrycode; low-income group refers to incomegroup = 'Low income'; with notes refers to description IS NOT NULL; series code SM.POP.TOTL refers to Seriescode = 'SM.POP.TOTL'
SELECT COUNT(T1.Countrycode) FROM Country AS T1 INNER JOIN CountryNotes AS T2 ON T1.CountryCode = T2.Countrycode WHERE T2.Seriescode = 'SM.POP.TOTL' AND T1.IncomeGroup = 'Low income'
world_development_indicators
Please list the descriptions of the series code SM.POP.TOTL for all the countries that are under the lending category of the International Development Associations.
Countries are the Countrycode; International Development Associations refers to lendingcategory = 'IDA'
SELECT T2.Description FROM Country AS T1 INNER JOIN CountryNotes AS T2 ON T1.CountryCode = T2.Countrycode WHERE T1.LendingCategory = 'IDA' AND T2.Seriescode = 'SM.POP.TOTL'
world_development_indicators
How many low-income countries under the lending category of the International Development Associations have a note on the series code SM.POP.TOTL?
low-income countries are where the incomegroup = Low income
SELECT COUNT(T1.Countrycode) FROM Country AS T1 INNER JOIN CountryNotes AS T2 ON T1.CountryCode = T2.Countrycode WHERE T1.LendingCategory = 'IDA' AND T2.Seriescode = 'SM.POP.TOTL' AND IncomeGroup = 'Low income'
world_development_indicators
Among the countries in the High income: OECD group whose currency unit is Euro, how many of them have a note on the series code SP.DYN.AMRT.FE?
countries refer to Countrycode; in the high income refers to incomegroup = 'High'; with notes refers to description IS NOT NULL; series code SP.DYN.AMRT.FE refers to Seriescode = 'SP.DYN.AMRT.FE'
SELECT COUNT(T1.Countrycode) FROM Country AS T1 INNER JOIN CountryNotes AS T2 ON T1.CountryCode = T2.Countrycode WHERE T1.IncomeGroup = 'High income: OECD' AND T1.CurrencyUnit = 'Euro' AND T2.Seriescode = 'SP.DYN.AMRT.FE'
world_development_indicators
What is the description of the footnote on the series code AG.LND.FRST.K2 in 1990 for Aruba?
Year = 1990; Aruba is the name of country where ShortName = 'Aruba'
SELECT T2.Description FROM Country AS T1 INNER JOIN FootNotes AS T2 ON T1.CountryCode = T2.Countrycode WHERE T1.ShortName = 'Aruba' AND T2.Seriescode = 'AG.LND.FRST.K2' AND T2.Year = 'YR1990'
world_development_indicators
On which years did Aruba got a footnote on the series code AG.LND.FRST.K2?
Aruba is the name of country where ShortName = 'Aruba'
SELECT T2.Year FROM Country AS T1 INNER JOIN FootNotes AS T2 ON T1.CountryCode = T2.Countrycode WHERE T1.ShortName = 'Aruba' AND T2.Seriescode = 'AG.LND.FRST.K2'
world_development_indicators
Please list the countries that got the footnote "Data are classified as official aid." on the series code DC.DAC.AUSL.CD in 2002.
countries are the Countrycode; footnote refers to Description = 'Data are classified as official aid'
SELECT T1.SHORTNAME FROM Country AS T1 INNER JOIN FootNotes AS T2 ON T1.CountryCode = T2.Countrycode WHERE T2.Description = 'Data are classified as official aid.' AND T2.Seriescode = 'DC.DAC.AUSL.CD' AND T2.Year LIKE '%2002%'
world_development_indicators
How many footnotes did Aruba got on different series code in the year 2002?
Aruba is the name of country where ShortName = 'Aruba'
SELECT COUNT(T2.SeriesCode) FROM Country AS T1 INNER JOIN FootNotes AS T2 ON T1.CountryCode = T2.Countrycode WHERE T1.ShortName = 'Aruba' AND T2.Year = 'YR2002'
world_development_indicators
For how many consecutive years did Aruba get a footnote on the series code BX.KLT.DINV.CD.WD?
Aruba is the name of country where ShortName = 'Aruba'
SELECT COUNT(T2.Year) FROM Country AS T1 INNER JOIN FootNotes AS T2 ON T1.CountryCode = T2.Countrycode WHERE T1.ShortName = 'Aruba' AND T2.Seriescode = 'BX.KLT.DINV.CD.WD'
world_development_indicators
What are the special notes for the country whose average adolescent fertility rate is the highest?
the average adolescent fertility rate is DIVIDE(SUM(value), SUM(IndicatorName like 'adolescent fertility rate%')); MAX(average adolescent fertility rate)
SELECT DISTINCT T1.SpecialNotes FROM Country AS T1 INNER JOIN Indicators AS T2 ON T1.CountryCode = T2.CountryCode WHERE T2.Value = ( SELECT Value FROM Indicators WHERE IndicatorName LIKE 'Adolescent fertility rate%' ORDER BY Value DESC LIMIT 1 )
world_development_indicators
List the East Asia & Pacific countries which are under the High income: nonOECD group. Please include their alpha code.
the East Asia & Pacific countries are where Region = 'East Asia & Pacific'; High income: nonOECD group is where IncomeGroup = 'High income: nonOECD'
SELECT CountryCode, Alpha2Code FROM Country WHERE Region = 'East Asia & Pacific' AND IncomeGroup = 'High income: nonOECD'
world_development_indicators
In which country's latest trade data and latest water withdrawal data were both updated in the year 2013? Give its long name and Alpha 2 code.
SELECT LongName, Alpha2Code FROM Country WHERE LatestTradeData = 2013 AND LatestWaterWithdrawalData = 2013
world_development_indicators
What is the average value of Adjusted net enrolment rate, primary, both sexes (%) indicator in Algeria from 1975 to 1980?
the average value of Adjusted net enrolment rate, primary, both sexes (%) is DIVIDE(SUM(Value), SUM(IndicatorName = 'Adjusted net enrolment rate, primary, both sexes (%)')); Year BETWEEN 1975 AND 1980; Algeria is the name of country where CountryName = 'Algeria'
SELECT CAST(SUM(Value) AS REAL) / COUNT(CountryCode) FROM Indicators WHERE CountryName = 'Algeria' AND Year > 1974 AND Year < 1981 AND IndicatorName = 'Adjusted net enrolment rate, primary, both sexes (%)'
world_development_indicators
What are the Indicator names and aggregation methods when the topic is Economic Policy & Debt: Balance of payments: Capital & financial account?
SELECT IndicatorName, AggregationMethod FROM Series WHERE Topic = 'Economic Policy & Debt: Balance of payments: Capital & financial account'
world_development_indicators
List down the series codes in which the topic is about Environment: Emissions and the license type is restricted. Please include their alpha code.
SELECT SeriesCode FROM Series WHERE Topic = 'Environment: Emissions' AND LicenseType = 'Restricted'
world_development_indicators
In 1970, how many Middle Eastern & North African countries whose value for CO2 emissions from gaseous fuel consumption (kt) indicator is more than 600?
Year = 1970; Middle East & North Africa is the name of the region where Region = 'Middle East & North Africa'; CO2 emissions from gaseous fuel consumption (kt) is the name of indicator where IndicatorName = 'CO2 emissions from gaseous fuel consumption (kt)'
SELECT COUNT(T2.CountryCode) FROM Indicators AS T1 INNER JOIN Country AS T2 ON T1.CountryCode = T2.CountryCode WHERE T2.Region = 'Middle East & North Africa' AND T1.IndicatorName = 'CO2 emissions FROM gaseous fuel consumption (kt)' AND T1.Year = 1970 AND T1.Value > 600
world_development_indicators
List down the top 3 Latin American & Caribbean countries with the highest average value in "CO2 emissions (kt)" indicator since 1965. Give their highest value and in what year.
Latin American & Caribbean countries is the name of the region where Region in ('Latin America' , 'Caribbean'); CO2 emissions from gaseous fuel consumption (kt) is the name of indicator where IndicatorName = 'CO2 emissions from gaseous fuel consumption (kt)'; average value in CO2 emissions (kt) = DIVIDE(SUM(Value), SUM(IndicatorName = 'CO2 emissions from gaseous fuel consumption (kt)')); Year > 1965
SELECT DISTINCT T1.CountryCode, T1.Year, T1.Value FROM Indicators AS T1 INNER JOIN Country AS T2 ON T1.CountryCode = T2.CountryCode WHERE T2.Region = 'Latin America & Caribbean' AND T1.IndicatorName = 'CO2 emissions (kt)' AND T1.Year > 1965 AND T1.Year < 1980 ORDER BY T1.Value DESC LIMIT 3
world_development_indicators
What is the series note description of the series "SP.DYN.TO65.MA.ZS" which covers the topic "Health: Mortality" in 1967?
in 1967 refers to Year = 'YR1967'
SELECT T2.Description FROM Series AS T1 INNER JOIN SeriesNotes AS T2 ON T1.SeriesCode = T2.Seriescode WHERE T1.SeriesCode = 'SP.DYN.TO65.MA.ZS' AND T1.Topic = 'Health: Mortality' AND T2.Year = 'YR1967'
world_development_indicators
Please write down the footnote descriptions of Albania in 1981.
Albania is the name of country where Country = 'Albania'
SELECT DISTINCT T1.Description FROM FootNotes AS T1 INNER JOIN Country AS T2 ON T1.Countrycode = T2.CountryCode WHERE T1.Year = 'YR1981' AND T2.ShortName = 'Albania'
world_development_indicators
Enumerate the footnote narratives of The Bahamas under the series code SH.DTH.IMRT in the year 1984.
narratives is Description; The Bahamas is the name of the country where Country = 'The Bahamas'
SELECT DISTINCT T1.Description FROM FootNotes AS T1 INNER JOIN Country AS T2 ON T1.Countrycode = T2.CountryCode WHERE T1.Year = 'YR1984' AND T2.ShortName = 'The Bahamas' AND T1.Seriescode = 'SH.DTH.IMRT'
world_development_indicators
List down the World Bank code of the countries whose country note has described "Data source : Human Mortality Database by University of California, Berkeley, and Max Planck Institute for Demographic Research."? Please include their lending category.
World Bank code refers to Wb2code; Data source refers to Description
SELECT DISTINCT T1.Wb2code, T1.LendingCategory FROM Country AS T1 INNER JOIN CountryNotes AS T2 ON T1.CountryCode = T2.Countrycode WHERE T2.Description = 'Data source : Human Mortality Database by University of California, Berkeley, and Max Planck Institute for Demographic Research.' AND T1.LendingCategory != ''
world_development_indicators
What is the topic of the series when the Total reserves minus gold (current US$) indicator of Haiti hit the value of 3,000,000 in 1961? Please include its series code and license type.
Total reserves minus gold (current US$) is the IndicatorName; Haiti is the CountryName; Year = 1961
SELECT T2.Topic, T2.Seriescode, T2.LicenseType FROM Indicators AS T1 INNER JOIN Series AS T2 ON T1.IndicatorName = T2.IndicatorName WHERE T1.Year = 1961 AND T1.CountryName = 'Haiti' AND T1.IndicatorName = 'Total reserves minus gold (current US$)' AND T1.Value = 3000000
world_development_indicators
How many countries have reached their Adjusted net national income per capita (constant 2005 US$) indicator value to more than 1,000 but have not finished their external debt reporting?
Adjusted net national income per capita (constant 2005 US$) is the IndicatorName; have not finished their external debt reporting means ExternalDebtReportingStatus = 'Preliminary'
SELECT COUNT(T1.CountryCode) FROM Country AS T1 INNER JOIN Indicators AS T2 ON T1.CountryCode = T2.CountryCode WHERE T2.IndicatorName = 'Adjusted net national income per capita (constant 2005 US$)' AND T1.ExternalDebtReportingStatus = 'Preliminary' AND T2.Value > 1000
world_development_indicators
Which countries have a fertility rate between 4 and 5 in 1979? List their names.
Year = 1979; fertility rate refers to IndicatorName = 'Fertility rate, total (births per woman)'; Value is between 4 and 5;
SELECT CountryName FROM Indicators WHERE Year = 1979 AND IndicatorName = 'Fertility rate, total (births per woman)' AND value >= 4 AND Value <= 5
world_development_indicators
Find the countries in south Asia which are in the low-income group. What is the source of their recent income and expenditure data? List it alongside the table name of the countries.
South Asia is the name of the region; IncomeGroup = 'Low income';
SELECT TableName, SourceOfMostRecentIncomeAndExpenditureData FROM Country WHERE Region = 'South Asia' AND IncomeGroup = 'Low income'
world_development_indicators
What are the sources for the data of children who finished primary school education in Latin America & Caribbean countries?
Latin America & Caribbean is the name of the region; children who finished primary school education refer to IndicatorName = 'Out-of-school children of primary school age, both sexes (number)'; sources refer to Description;
SELECT DISTINCT T2.Source FROM Footnotes AS T1 INNER JOIN Series AS T2 ON T1.Seriescode = T2.SeriesCode INNER JOIN Country AS T3 ON T1.Countrycode = T3.CountryCode WHERE T3.Region = 'Latin America & Caribbean' AND T2.IndicatorName = 'Children out of school, primary'
world_development_indicators
List the sources for the Net Migration in South American countries in 2002.
South American is the name of the region; Year contains '2002'; sources refer to Description; IndicatorName = 'Net migration';
SELECT T2.Source FROM CountryNotes AS T1 INNER JOIN Series AS T2 ON T1.Seriescode = T2.SeriesCode INNER JOIN Country AS T3 ON T1.Countrycode = T3.CountryCode INNER JOIN SeriesNotes AS T4 ON T2.SeriesCode = T4.Seriescode WHERE T4.Year LIKE '%2002%' AND T2.IndicatorName = 'Net migration'
world_development_indicators
What are the sources for the data of children who finished primary school education in North American countries?
North American is the name of the region; sources refer to Description; children who finished primary school education refer to IndicatorName = 'Out-of-school children of primary school age, both sexes (number)';
SELECT DISTINCT T3.Description FROM Country AS T1 INNER JOIN Indicators AS T2 ON T1.CountryCode = T2.CountryCode INNER JOIN CountryNotes AS T3 ON T2.CountryCode = T3.Countrycode WHERE T1.Region = 'North America' AND T2.IndicatorName = 'Out-of-school children of primary school age, both sexes (number)'
world_development_indicators
In the countries for which the latest trade data are from 2013, what was the GDP growth in 2014? List them in the ascending order of GDP.
IndicatorName = 'GDP growth (annual %)'; Year = 2014;
SELECT DISTINCT T1.CountryCode, T2.Value FROM Country AS T1 INNER JOIN Indicators AS T2 ON T1.CountryCode = T2.CountryCode WHERE T1.LatestTradeData = 2013 AND T2.IndicatorName LIKE 'GDP growth (annual %)' AND T2.year = 2014 AND T2.Value > 0 ORDER BY T2.Value ASC
world_development_indicators
How many low income countries are there in South Asia?
South Asia is the name of the region; IncomeGroup = 'Low income';
SELECT COUNT(CountryCode) FROM Country WHERE Region = 'South Asia' AND IncomeGroup = 'Low income'
world_development_indicators
Please list the short name of countries which have the latest trade data after 2010.
the latest trade data after 2010 implies LatestTradeData > 2010;
SELECT ShortName FROM Country WHERE LatestTradeData > 2010
world_development_indicators
Please calculate the percentage of Sub-Saharan African countries which are in the Special trade system.
Sub-Saharan African is the name of the region; SystemOfTrade = 'Special trade system'; countries refer to CountryCode; DIVIDE(COUNT (CountryCode where SystemOfTrade = 'Special trade system' and Region = 'Sub-Saharan Africa'), COUNT(CountryCode where Region = 'Sub-Saharan Africa')) as percentage;
SELECT CAST(SUM(CASE WHEN Region = 'Sub-Saharan Africa' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(CountryCode) FROM Country WHERE SystemOfTrade = 'Special trade system'
world_development_indicators
Please calculate the average of Arms imports (SIPRI trend indicator values) of the European & Central Asian countries.
European & Central Asian is the name of the region; IndicatorName = 'Arms imports (SIPRI trend indicator values)'; countries refer to CountryCode; DIVIDE(Sum(Value), Count(CountryCode));
SELECT CAST(SUM(T2.Value) AS REAL) / COUNT(T1.CountryCode) FROM Country AS T1 INNER JOIN Indicators AS T2 ON T1.CountryCode = T2.CountryCode WHERE T1.Region = 'Europe & Central Asia' AND T2.IndicatorName = 'Arms imports (SIPRI trend indicator values)'
world_development_indicators
Which upper middle income country has the lowest value of CO2 emissions (kt)?
IncomeGroup = 'Upper middle income'; IndicatorName = 'CO2 emissions (kt); the lowest value refers to MIN(Value);
SELECT T1.CountryCode FROM Country AS T1 INNER JOIN Indicators AS T2 ON T1.CountryCode = T2.CountryCode WHERE T1.IncomeGroup = 'Upper middle income' AND T2.IndicatorName = 'CO2 emissions (kt)' ORDER BY T2.Value ASC LIMIT 1
world_development_indicators
What is the minimum of International migrant stock, total of heavily indebted poor countries?
IndicatorName = 'International migrant stock, total'; heavily indebted poor countries referred to by its abbreviated 'HIPC' = OtherGroups; MIN(Value);
SELECT MIN(T2.Value) FROM Country AS T1 INNER JOIN Indicators AS T2 ON T1.CountryCode = T2.CountryCode WHERE T1.OtherGroups = 'HIPC' AND T2.IndicatorName = 'International migrant stock, total'
world_development_indicators
Please list the indicator names belonging to Education: Inputs topic in 2000.
Year = 'YR2000';
SELECT DISTINCT T2.IndicatorName FROM Footnotes AS T1 INNER JOIN Series AS T2 ON T1.Seriescode = T2.SeriesCode WHERE T1.Year = 'YR2000' AND T2.Topic = 'Education: Inputs'
world_development_indicators
How many annual indicators use the Sum aggregation method from 2001 to 2003?
Annual refers to Periodicity; from 2001 to 2003 implies Year = 'YR2001', Year = 'YR2002' , Year = 'YR2003';
SELECT COUNT(DISTINCT T2.SeriesCode) FROM Footnotes AS T1 INNER JOIN Series AS T2 ON T1.Seriescode = T2.SeriesCode WHERE T1.Year IN ('YR2001', 'YR2002', 'YR2003') AND T2.Periodicity = 'Annual' AND T2.AggregationMethod = 'Sum'
world_development_indicators
In 2005, which series codes use the International Monetary Fund, Balance of Payments Statistics Yearbook and data files source?
Year contains '2005'; series codes contain 'International Monetary Fund'
SELECT T1.Seriescode, T2.Source FROM Footnotes AS T1 INNER JOIN Series AS T2 ON T1.Seriescode = T2.SeriesCode WHERE T1.Year LIKE '%2005%' AND T2.Source LIKE 'International Monetary Fund%'
world_development_indicators
What percentage of countries in South Asia have the Life expectancy at birth, female (years) greater than 50?
South Asia is the name of the region; IndicatorName = 'Life expectancy at birth, female (years)'; greater than 50 refers to Value>50; DIVIDE(COUNT(CountryCode where IndicatorName = 'Life expectancy at birth, female (years)'; Value>50; Region = 'South Asia'), COUNT(CountryCode where Region = 'South Asia')) as percentage;
SELECT CAST(SUM(CASE WHEN T2.value > 50 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.CountryCode) FROM Country AS T1 INNER JOIN Indicators AS T2 ON T1.CountryCode = T2.CountryCode WHERE T1.Region = 'South Asia' AND T2.IndicatorName = 'Life expectancy at birth, female (years)'
world_development_indicators
From 1960 to 1965, which country had the highest Death rate, crude (per 1,000 people)?
IndicatorName = 'Death rate, crude (per 1,000 people)'; the highest refers to MAX(Value); from 1960 to 1965 refers to Year between '1960' and '1965'; country refers to CountryName;
SELECT CountryName FROM Indicators WHERE Year BETWEEN 1960 AND 1965 AND IndicatorName = 'Death rate, crude (per 1,000 people)' ORDER BY Value DESC LIMIT 1
world_development_indicators
Please list the indicator names of Arab World whose values are higher than 50 in 1960.
Arab World refers to CountryName; Year = '1960'; values are higher than 50 refers to Value>50;
SELECT IndicatorName FROM Indicators WHERE CountryName = 'Arab World' AND Year = 1960 AND Value > 50
world_development_indicators
Which country has the highest value of Merchandise imports by the reporting economy (current US$)?
country refers to CountryName; the highest value implies MAX(Value); IndicatorName = 'Merchandise imports by the reporting economy (current US$)';
SELECT CountryName FROM Indicators WHERE IndicatorName = 'Merchandise imports by the reporting economy (current US$)' ORDER BY Value DESC LIMIT 1
world_development_indicators
Please list annual indicator names which have values of more than 100 in 1965.
Annual refers to Periodicity; values of more than 100 implies Value>100; Year = '1965';
SELECT DISTINCT T2.IndicatorName FROM Indicators AS T1 INNER JOIN Series AS T2 ON T1.IndicatorName = T2.IndicatorName WHERE T1.Year = 1965 AND T1.Value > 100 AND T2.Periodicity = 'Annual'
world_development_indicators
From 1968 to 1970, what are indicator names whose license type is open and values are less than 100?
From 1968 to 1970 refers to Year between '1968' and '1970'; values are less than 100 imply Value<100;
SELECT DISTINCT T1.IndicatorName FROM Indicators AS T1 INNER JOIN Series AS T2 ON T1.IndicatorName = T2.IndicatorName WHERE T1.Year >= 1968 AND T1.Year < 1971 AND T2.LicenseType = 'Open' AND T1.Value < 100
world_development_indicators
Which country had the highest value of indicator belongs to Private Sector & Trade: Exports topic? Please list the country name and indicator name.
country refers to CountryName;
SELECT T1.CountryName, T1.IndicatorName FROM Indicators AS T1 INNER JOIN Series AS T2 ON T1.IndicatorName = T2.IndicatorName WHERE T2.Topic = 'Private Sector & Trade: Exports' ORDER BY T1.Value DESC LIMIT 1
world_development_indicators
Please list out all annual indicator names of Sudan in 1961?
Sudan is the name of the country; Periodicity = 'Annual'; Year = '1961'
SELECT T1.IndicatorName FROM Indicators AS T1 INNER JOIN Series AS T2 ON T1.IndicatorName = T2.IndicatorName WHERE T1.CountryName = 'Sudan' AND T1.Year = 1961 AND T2.Periodicity = 'Annual'
world_development_indicators
From 1960 to 1965, which country has the lowest value of indicator belongs to Health: Population: Structure?
From 1960 to 1965 refers to Year between '1960' and '1965'; the lowest value implies MIN(Value); country refers to CountryName;
SELECT CountryName FROM Indicators WHERE Value = ( SELECT MIN(T1.Value) FROM Indicators AS T1 INNER JOIN Series AS T2 ON T1.IndicatorName = T2.IndicatorName WHERE T1.Year >= 1960 AND T1.Year < 1966 AND T2.Topic = 'Health: Population: Structure' )
world_development_indicators
What percentage of upper middle income countries which have the CO2 emissions from liquid fuel consumption (% of total) less than 80%?
IndicatorName = 'CO2 emissions from liquid fuel consumption (% of total)'; less than 80% implies Value<80%; IncomeGroup = 'Upper middle income'; DIVIDE(COUNT(CountryCode where IndicatorName = 'CO2 emissions from liquid fuel consumption (% of total)'; Value<80%; IncomeGroup = 'Upper middle income'), COUNT(CountryCode where IncomeGroup = 'Upper middle income'));
SELECT SUM(CASE WHEN T2.IndicatorName = 'CO2 emissions FROM liquid fuel consumption (% of total)' AND t2.Value < 80 THEN 1 ELSE 0 END) * 1.0 / COUNT(T1.CountryCode) persent FROM Country AS T1 INNER JOIN Indicators AS T2 ON T1.CountryCode = T2.CountryCode WHERE T1.IncomeGroup = 'Upper middle income'
world_development_indicators
What is indicator code of Rural population?
IndicatorName = 'Rural population';
SELECT DISTINCT IndicatorCode FROM Indicators WHERE IndicatorName = 'Rural population'
world_development_indicators
How many country uses the 2008 System of National Accounts methodology? List our their table name.
SELECT TableName FROM Country WHERE SystemOfNationalAccounts = 'Country uses the 2008 System of National Accounts methodology.'
world_development_indicators
List out the series code of countries using Euro as their currency unit.
SELECT DISTINCT T2.SeriesCode FROM Country AS T1 INNER JOIN CountryNotes AS T2 ON T1.CountryCode = T2.Countrycode WHERE T1.CurrencyUnit = 'Euro'
world_development_indicators
List out the long name of countries using series code as DT.DOD.DSTC.CD
SELECT T1.LongName FROM Country AS T1 INNER JOIN CountryNotes AS T2 ON T1.CountryCode = T2.Countrycode WHERE T2.SeriesCode = 'DT.DOD.DSTC.CD'
world_development_indicators
Mention the series code of countries using Hong Kong dollar as their currency unit.
SELECT T2.SeriesCode FROM Country AS T1 INNER JOIN CountryNotes AS T2 ON T1.CountryCode = T2.Countrycode WHERE T1.CurrencyUnit = 'Hong Kong dollar'
world_development_indicators
List out the table name of countries using series code as SP.DYN.TO65.MA.ZS
SELECT T1.TableName FROM Country AS T1 INNER JOIN CountryNotes AS T2 ON T1.CountryCode = T2.Countrycode WHERE T2.Seriescode = 'SP.DYN.TO65.MA.ZS'
world_development_indicators
List out the country name of lower earning countries
lower earning countries refer to IncomeGroup = 'Low income';
SELECT DISTINCT T2.CountryName FROM Country AS T1 INNER JOIN Indicators AS T2 ON T1.CountryCode = T2.CountryCode WHERE T1.IncomeGroup = 'Low income'
world_development_indicators
List out the series code and country code of the poor countries that located in Latin American & Carribbean.
Latin American & Carribbean is the name of the region; poor countries refers to IncomeGroup = 'Low income';
SELECT T2.SeriesCode, T2.CountryCode FROM Country AS T1 INNER JOIN CountryNotes AS T2 ON T1.CountryCode = T2.Countrycode WHERE T1.Region = 'Latin America & Caribbean' AND t1.incomegroup = 'Low income'
world_development_indicators
Mention the series code of countries using Australian dollar as their currency unit. Which country belongs to middle income group among them.
middle income group refers to IncomeGroup = 'Low middle income';
SELECT T1.CountryCode, T2.SeriesCode FROM Country AS T1 INNER JOIN CountryNotes AS T2 ON T1.CountryCode = T2.Countrycode WHERE T1.CurrencyUnit = 'Australian dollar' AND T1.IncomeGroup = 'Lower middle income'
world_development_indicators
List out the country name of upper middle income group. Which country has the earliest national account base year? List out the region where this country locates.
IncomeGroup = 'Upper middle income'; the earliest national account base year refers to MIN(NationalAccountsBaseYear);
SELECT DISTINCT T1.CountryName FROM indicators AS T1 INNER JOIN country AS T2 ON T1.CountryCode = T2.CountryCode WHERE T2.IncomeGroup = 'Upper middle income' UNION SELECT longname FROM ( SELECT longname FROM country WHERE NationalAccountsBaseYear <> '' ORDER BY NationalAccountsBaseYear ASC LIMIT 1 )
world_development_indicators
List out the country code and country name of the rich countries using Euro as their currency unit
Non-OECD and OECD countries can be regarded as rich countries for those that are part of the High Income Group;
SELECT DISTINCT T1.CountryCode, T2.CountryName FROM Country AS T1 INNER JOIN Indicators AS T2 ON T1.CountryCode = T2.CountryCode WHERE T1.CurrencyUnit = 'Euro' AND (T1.IncomeGroup = 'High income: OECD' OR T1.IncomeGroup = 'High income: nonOECD')
world_development_indicators
List out the table name and currency unit of countries using series code as FP.CPI.TOTL
SELECT T1.TableName, T1.CurrencyUnit FROM Country AS T1 INNER JOIN CountryNotes AS T2 ON T1.CountryCode = T2.Countrycode WHERE T2.SeriesCode = 'FP.CPI.TOTL'
world_development_indicators
List out the name and indicator code of high income: nonOECD countries
high income: non-OECD' refer to IncomeGroup;
SELECT DISTINCT T1.CountryCode, T2.CountryName FROM Country AS T1 INNER JOIN Indicators AS T2 ON T1.CountryCode = T2.CountryCode WHERE T1.IncomeGroup = 'High income: nonOECD'
world_development_indicators
List down 10 country codes and it's short names.
SELECT CountryCode, ShortName FROM Country LIMIT 10