Chinastark/bird_dataset huggingface dataset:
Database: music_tracker
Note: no more than 100 downloads refer to totalsnatched ≤ 100; groupyear = 1980; tag = 'funk';
Question: Provide the name of artists who had no more than 100 downloads and are tagged "funk" in 1980.
SQL: SELECT torrents.artist FROM torrents INNER JOIN tags ON torrents.id = tags.id WHERE tags.tag = 'funk' AND torrents.groupyear = 1980 AND torrents.totalsnatched <= 100
Database: music_tracker
Note: the most singles refer to MAX(COUNT(releasetype = 'single'));
Question: Which artist has released the most singles with the tag "soul"?
SQL: SELECT torrents.artist FROM torrents INNER JOIN tags ON torrents.id = tags.id WHERE tags.tag = 'soul' AND torrents.releasetype = 'single' GROUP BY torrents.artist ORDER BY count(torrents.releasetype) DESC LIMIT 1
Database: music_tracker
Note: id from 10 to 30 refers to id between 10 and 30; groupyear = 1980;
Question: Among the artists with the id from 10 to 30. Which artist released the product with the tag "funk" in 1980?
SQL: SELECT torrents.artist FROM torrents INNER JOIN tags ON torrents.id = tags.id WHERE tags.tag = 'funk' AND torrents.groupyear = 1980 AND torrents.id BETWEEN 10 AND 30
Database: music_tracker
Note: the most downloaded refers to MAX(totalsnatched); tag = 'jazz'; from 1982 or later refers to groupyear ≥ 1982;
Question: List the group name has the most downloaded that have released jazz genres from 1982 or later.
SQL: SELECT torrents.groupname FROM torrents INNER JOIN tags ON torrents.id = tags.id WHERE tags.tag = 'jazz' AND torrents.groupyear >= 1982 ORDER BY torrents.totalsnatched DESC LIMIT 1
Database: music_tracker
Note: FALSE;
Question: Which artist has id "16"? Provide her or his tag genre.
SQL: SELECT tags.tag FROM torrents INNER JOIN tags ON torrents.id = tags.id WHERE torrents.id = 16
Database: music_tracker
Note: Among id from 10 to 50 refers to id between 10 and 50; tag = 'new.york'; the most downloads refer to MAX(totalsnatched);
Question: Among id from 10 to 50. Which artist tagged as "new.york" has the most downloads?
SQL: SELECT torrents.artist FROM torrents INNER JOIN tags ON torrents.id = tags.id WHERE torrents.id BETWEEN 10 AND 50 AND tags.tag LIKE 'new.york' ORDER BY torrents.totalsnatched DESC LIMIT 1
Database: music_tracker
Note: albums and mixtape refer to releasetype; from 1980 to 1985 refers to groupyear between 1980 and 1985; tag = 'dance';
Question: List the name of artists who have released albums and mixtape from 1980 to 1985 in "dance" genre.
SQL: SELECT count(torrents.artist) FROM torrents INNER JOIN tags ON torrents.id = tags.id WHERE tags.tag = 'dance' AND torrents.groupyear BETWEEN 1980 AND 1985 AND torrents.releasetype LIKE 'album' OR torrents.releasetype LIKE 'mixtape'
Database: music_tracker
Note: releasetype = 'single'; between 1979 and 1981 refers to groupyear between 1979 and 1981; tag = 'soul';
Question: How many singles were released between 1979 and 1981 labeled as "soul"?
SQL: SELECT count(tags.tag) FROM torrents INNER JOIN tags ON torrents.id = tags.id WHERE tags.tag = 'soul' AND torrents.groupyear BETWEEN 1979 AND 1981 AND torrents.releasetype LIKE 'single'
Database: music_tracker
Note: releasetype = 'single'; groupyear = 1979;
Question: How many singles were released in 1979?
SQL: SELECT count(releasetype) FROM torrents WHERE releasetype LIKE 'single' AND groupyear = 1979
Database: music_tracker
Note: sugar daddy is an artist; releasetype = 'single'; groupyear = 1980;
Question: In 1980, how many singles were released by sugar daddy?
SQL: SELECT count(releasetype) FROM torrents WHERE artist LIKE 'sugar daddy' AND releasetype LIKE 'Single' AND groupyear = 1980
Database: music_tracker
Note: album refers to releasetype; groupyear = 2004; tag = 'christmas';
Question: How many christmas albums were released in 2004?
SQL: SELECT count(torrents.id) FROM torrents INNER JOIN tags ON torrents.id = tags.id WHERE tags.tag = 'christmas' AND torrents.groupyear = 2004 AND torrents.releasetype LIKE 'album'
Database: music_tracker
Note: kurtis blow is an artist; from 2000 to 2010 refers to groupyear between 2000 and 2010;
Question: Please list all tags of kurtis blow from 2000 to 2010.
SQL: SELECT tags.tag FROM torrents INNER JOIN tags ON torrents.id = tags.id WHERE torrents.groupyear BETWEEN 2000 AND 2010 AND torrents.artist LIKE 'kurtis blow'
Database: music_tracker
Note: millie jackson is an artist; album title refers to groupname where releasetype = 'album'; groupyear = 1980;
Question: Which album title and tag that millie jackson released in 1980?
SQL: SELECT torrents.groupname, tags.tag FROM torrents INNER JOIN tags ON torrents.id = tags.id WHERE torrents.groupyear = 1980 AND torrents.artist LIKE 'millie jackson' AND torrents.releasetype LIKE 'album'
Database: music_tracker
Note: release titles refer to groupname; groupyear = 2005;
Question: Please list all release titles whose tag is jazz in 2005.
SQL: SELECT torrents.groupname FROM torrents INNER JOIN tags ON torrents.id = tags.id WHERE torrents.groupyear = 2005 AND tags.tag LIKE 'jazz'
Database: music_tracker
Note: From 1980 to 2000 refers to groupyear between 1980 and 2000; tag = 'disco'; the most releases refer to MAX(COUNT(id));
Question: From 1980 to 2000, which artist had the most disco releases?
SQL: SELECT torrents.artist FROM torrents INNER JOIN tags ON torrents.id = tags.id WHERE torrents.groupyear BETWEEN 1980 AND 2000 AND tags.tag LIKE 'disco' GROUP BY torrents.artist ORDER BY count(tags.tag) DESC LIMIT 1
Database: music_tracker
Note: releasetype = 'single';
Question: Which artists have released singles with the tag 1970s?
SQL: SELECT torrents.artist FROM torrents INNER JOIN tags ON torrents.id = tags.id WHERE torrents.releasetype = 'single' AND tags.tag LIKE '1970s'
Database: music_tracker
Note: 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;
Question: From 1979 to 1982, what was the percentage of united.states albums out of total albums were released?
SQL: SELECT cast(sum(CASE WHEN tags.tag LIKE 'united.states' THEN 1 ELSE 0 END) AS REAL) * 100 / count(torrents.releasetype) FROM torrents INNER JOIN tags ON torrents.id = tags.id WHERE torrents.groupyear BETWEEN 1979 AND 1982 AND torrents.releasetype LIKE 'album'
Database: world_development_indicators
Note: group of Heavily Indebted Poor Countries is othergroups = 'HIPC'; International Development Associations refers to lendingcategory = 'IDA';
Question: 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?
SQL: SELECT count(countrycode) FROM country WHERE lendingcategory = 'IDA' AND othergroups = 'HIPC'
Database: world_development_indicators
Note: countries refer to the shortname; International Development Associations refers to lendingcategory = 'IDA'; have a external debt reporting finished by estimation refers to externaldebtreportingstatus = 'Estimate';
Question: Please list the countries under the lending category of the International Development Associations and have a external debt reporting finished by estimation.
SQL: SELECT shortname, externaldebtreportingstatus FROM country WHERE lendingcategory = 'IDA'
Database: world_development_indicators
Note: Aruba is the name of the country where shortname = 'Aruba';
Question: What's the description of the series code SM.POP.TOTL for Aruba?
SQL: SELECT countrynotes.description FROM country INNER JOIN countrynotes ON country.countrycode = countrynotes.countrycode WHERE country.shortname = 'Aruba' AND countrynotes.seriescode = 'SM.POP.TOTL'
Database: world_development_indicators
Note: Countries refer to the shortname; Latin America & Caribbean is the name of the region;
Question: Please list the countries in Latin America & Caribbean with a note on the series code SM.POP.TOTL.
SQL: SELECT country.shortname, countrynotes.description FROM country INNER JOIN countrynotes ON country.countrycode = countrynotes.countrycode WHERE country.region = 'Latin America & Caribbean' AND countrynotes.seriescode = 'SM.POP.TOTL'
Database: world_development_indicators
Note: 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';
Question: Among the countries with note on the series code SM.POP.TOTL, how many of them are in the low-income group?
SQL: SELECT count(country.countrycode) FROM country INNER JOIN countrynotes ON country.countrycode = countrynotes.countrycode WHERE countrynotes.seriescode = 'SM.POP.TOTL' AND country.incomegroup = 'Low income'
Database: world_development_indicators
Note: Countries are the countrycode; International Development Associations refers to lendingcategory = 'IDA';
Question: 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.
SQL: SELECT countrynotes.description FROM country INNER JOIN countrynotes ON country.countrycode = countrynotes.countrycode WHERE country.lendingcategory = 'IDA' AND countrynotes.seriescode = 'SM.POP.TOTL'
Database: world_development_indicators
Note: low-income countries are where the incomegroup = Low income;
Question: How many low-income countries under the lending category of the International Development Associations have a note on the series code SM.POP.TOTL?
SQL: SELECT count(country.countrycode) FROM country INNER JOIN countrynotes ON country.countrycode = countrynotes.countrycode WHERE country.lendingcategory = 'IDA' AND countrynotes.seriescode = 'SM.POP.TOTL' AND incomegroup = 'Low income'
Database: world_development_indicators
Note: 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';
Question: 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?
SQL: SELECT count(country.countrycode) FROM country INNER JOIN countrynotes ON country.countrycode = countrynotes.countrycode WHERE country.incomegroup = 'High income: OECD' AND country.currencyunit = 'Euro' AND countrynotes.seriescode = 'SP.DYN.AMRT.FE'
Database: world_development_indicators
Question: What is the long name of the country with the description "Estimates are derived from data on foreign-born population." on the series code SM.POP.TOTL?
SQL: SELECT country.longname FROM country INNER JOIN countrynotes ON country.countrycode = countrynotes.countrycode WHERE countrynotes.description = 'Estimates are derived FROM data on foreign-born population.' AND countrynotes.seriescode = 'SM.POP.TOTL'
Database: world_development_indicators
Note: year = 1990; Aruba is the name of country where shortname = 'Aruba';
Question: What is the description of the footnote on the series code AG.LND.FRST.K2 in 1990 for Aruba?
SQL: SELECT footnotes.description FROM country INNER JOIN footnotes ON country.countrycode = footnotes.countrycode WHERE country.shortname = 'Aruba' AND footnotes.seriescode = 'AG.LND.FRST.K2' AND footnotes.year = 'YR1990'
Database: world_development_indicators
Note: Aruba is the name of country where shortname = 'Aruba';
Question: On which years did Aruba got a footnote on the series code AG.LND.FRST.K2?
SQL: SELECT footnotes.year FROM country INNER JOIN footnotes ON country.countrycode = footnotes.countrycode WHERE country.shortname = 'Aruba' AND footnotes.seriescode = 'AG.LND.FRST.K2'
Database: world_development_indicators
Note: countries are the countrycode; footnote refers to description = 'Data are classified as official aid';
Question: Please list the countries that got the footnote "Data are classified as official aid." on the series code DC.DAC.AUSL.CD in 2002.
SQL: SELECT country.shortname FROM country INNER JOIN footnotes ON country.countrycode = footnotes.countrycode WHERE footnotes.description = 'Data are classified as official aid.' AND footnotes.seriescode = 'DC.DAC.AUSL.CD' AND footnotes.year LIKE '%2002%'
Database: world_development_indicators
Note: Aruba is the name of country where shortname = 'Aruba';
Question: How many footnotes did Aruba got on different series code in the year 2002?
SQL: SELECT count(footnotes.seriescode) FROM country INNER JOIN footnotes ON country.countrycode = footnotes.countrycode WHERE country.shortname = 'Aruba' AND footnotes.year = 'YR2002'
Database: world_development_indicators
Note: Aruba is the name of country where shortname = 'Aruba';
Question: For how many consecutive years did Aruba get a footnote on the series code BX.KLT.DINV.CD.WD?
SQL: SELECT count(footnotes.year) FROM country INNER JOIN footnotes ON country.countrycode = footnotes.countrycode WHERE country.shortname = 'Aruba' AND footnotes.seriescode = 'BX.KLT.DINV.CD.WD'
Database: world_development_indicators
Note: the average adolescent fertility rate is DIVIDE(SUM(value), SUM(indicatorname like 'adolescent fertility rate%'));
Question: What is the average adolescent fertility rate of the country whose Alpha2Code is 1A over the years this indicator was calculated.
SQL: SELECT avg(indicators.value) FROM country INNER JOIN indicators ON country.countrycode = indicators.countrycode WHERE country.alpha2code = '1A' AND indicators.indicatorname LIKE 'adolescent fertility rate%'
Database: world_development_indicators
Note: the average adolescent fertility rate is DIVIDE(SUM(value), SUM(indicatorname like 'adolescent fertility rate%')); MAX(average adolescent fertility rate);
Question: What are the special notes for the country whose average adolescent fertility rate is the highest?
SQL: SELECT DISTINCT country.specialnotes FROM country INNER JOIN indicators ON country.countrycode = indicators.countrycode WHERE indicators.value = ( SELECT value FROM indicators WHERE indicatorname LIKE 'Adolescent fertility rate%' ORDER BY value DESC LIMIT 1 )
Database: world_development_indicators
Note: the East Asia & Pacific countries are where region = 'East Asia & Pacific'; High income: nonOECD group is where incomegroup = 'High income: nonOECD';
Question: List the East Asia & Pacific countries which are under the High income: nonOECD group. Please include their alpha code.
SQL: SELECT countrycode, alpha2code FROM country WHERE region = 'East Asia & Pacific' AND incomegroup = 'High income: nonOECD'
Database: world_development_indicators
Question: 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.
SQL: SELECT longname, alpha2code FROM country WHERE latesttradedata = 2013 AND latestwaterwithdrawaldata = 2013
Database: world_development_indicators
Note: 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';
Question: What is the average value of Adjusted net enrolment rate, primary, both sexes (%) indicator in Algeria from 1975 to 1980?
SQL: 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 (%)'
Database: world_development_indicators
Question: What are the Indicator names and aggregation methods when the topic is Economic Policy & Debt: Balance of payments: Capital & financial account?
SQL: SELECT indicatorname, aggregationmethod FROM series WHERE topic = 'Economic Policy & Debt: Balance of payments: Capital & financial account'
Database: world_development_indicators
Question: List down the series codes in which the topic is about Environment: Emissions and the license type is restricted. Please include their alpha code.
SQL: SELECT seriescode FROM series WHERE topic = 'Environment: Emissions' AND licensetype = 'Restricted'
Database: world_development_indicators
Note: 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)';
Question: In 1970, how many Middle Eastern & North African countries whose value for CO2 emissions from gaseous fuel consumption (kt) indicator is more than 600?
SQL: SELECT count(country.countrycode)  FROM indicators INNER JOIN country ON indicators.countrycode = country.countrycode WHERE country.region = 'Middle East & North Africa' AND indicators.indicatorname = 'CO2 emissions FROM gaseous fuel consumption (kt)' AND indicators.year = 1970 AND indicators.value > 600
Database: world_development_indicators
Note: 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;
Question: 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.
SQL: SELECT DISTINCT indicators.countrycode, indicators.year, indicators.value FROM indicators INNER JOIN country ON indicators.countrycode = country.countrycode WHERE country.region = 'Latin America & Caribbean' AND indicators.indicatorname = 'CO2 emissions (kt)' AND indicators.year > 1965 AND indicators.year < 1980 ORDER BY indicators.value DESC LIMIT 3
Database: world_development_indicators
Note: in 1967 refers to year = 'YR1967';
Question: What is the series note description of the series "SP.DYN.TO65.MA.ZS" which covers the topic "Health: Mortality" in 1967?
SQL: SELECT seriesnotes.description FROM series INNER JOIN seriesnotes ON series.seriescode = seriesnotes.seriescode WHERE series.seriescode = 'SP.DYN.TO65.MA.ZS' AND series.topic = 'Health: Mortality' AND seriesnotes.year = 'YR1967'
Database: world_development_indicators
Note: Albania is the name of country where country = 'Albania';
Question: Please write down the footnote descriptions of Albania in 1981.
SQL: SELECT DISTINCT footnotes.description FROM footnotes INNER JOIN country ON footnotes.countrycode = country.countrycode WHERE footnotes.year = 'YR1981' AND country.shortname = 'Albania'
Database: world_development_indicators
Note: narratives is description; The Bahamas is the name of the country where country = 'The Bahamas';
Question: Enumerate the footnote narratives of The Bahamas under the series code SH.DTH.IMRT in the year 1984.
SQL: SELECT DISTINCT footnotes.description FROM footnotes INNER JOIN country ON footnotes.countrycode = country.countrycode WHERE footnotes.year = 'YR1984' AND country.shortname = 'The Bahamas' AND footnotes.seriescode = 'SH.DTH.IMRT'
Database: world_development_indicators
Note: Net bilateral aid flows from DAC donors, Sweden (current US$) is the name of indicator where indicatorname = 'Net bilateral aid flows from DAC donors, Sweden (current US$)'; year = 1970; value > 570,000;
Question: What is the short name of the country in which the "Net bilateral aid flows from DAC donors, Sweden (current US$)" indicator hit the 570,000 value in 1970?
SQL: SELECT country.shortname FROM indicators INNER JOIN country ON indicators.countrycode = country.countrycode WHERE indicators.indicatorname = 'Net bilateral aid flows FROM DAC donors, Sweden (current US$)' AND indicators.year = 1970 AND indicators.value = 570000
Database: world_development_indicators
Note: World Bank code refers to wb2code; Data source refers to description;
Question: 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.
SQL: SELECT DISTINCT country.wb2code, country.lendingcategory FROM country INNER JOIN countrynotes ON country.countrycode = countrynotes.countrycode WHERE countrynotes.description = 'Data source : Human Mortality Database by University of California, Berkeley, and Max Planck Institute for Demographic Research.' AND country.lendingcategory != ''
Database: world_development_indicators
Note: Total reserves minus gold (current US$) is the indicatorname; Haiti is the countryname; year = 1961;
Question: 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.
SQL: SELECT series.topic, series.seriescode, series.licensetype FROM indicators INNER JOIN series ON indicators.indicatorname = series.indicatorname WHERE indicators.year = 1961 AND indicators.countryname = 'Haiti' AND indicators.indicatorname = 'Total reserves minus gold (current US$)' AND indicators.value = 3000000
Database: world_development_indicators
Note: Adjusted net national income per capita (constant 2005 US$) is the indicatorname; have not finished their external debt reporting means externaldebtreportingstatus = 'Preliminary';
Question: 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?
SQL: SELECT count(country.countrycode) FROM country INNER JOIN indicators ON country.countrycode = indicators.countrycode WHERE indicators.indicatorname = 'Adjusted net national income per capita (constant 2005 US$)' AND country.externaldebtreportingstatus = 'Preliminary' AND indicators.value > 1000
Database: world_development_indicators
Note: year = 1979; fertility rate refers to indicatorname = 'Fertility rate, total (births per woman)'; value is between 4 and 5;
Question: Which countries have a fertility rate between 4 and 5 in 1979? List their names.
SQL: SELECT countryname FROM indicators WHERE YEAR = 1979 AND indicatorname = 'Fertility rate, total (births per woman)' AND value >= 4 AND value <= 5
Database: world_development_indicators
Note: South Asia is the name of the region; incomegroup = 'Low income';
Question: 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.
SQL: SELECT tablename, sourceofmostrecentincomeandexpendituredata FROM country WHERE region = 'South Asia' AND incomegroup = 'Low income'
Database: world_development_indicators
Note: 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;
Question: What are the sources for the data of children who finished primary school education in Latin America & Caribbean countries?
SQL: SELECT DISTINCT series.source FROM footnotes INNER JOIN series ON footnotes.seriescode = series.seriescode INNER JOIN country ON footnotes.countrycode = country.countrycode WHERE country.region = 'Latin America & Caribbean' AND series.indicatorname = 'Children out of school, primary'
Database: world_development_indicators
Note: South American is the name of the region; year contains '2002'; sources refer to description; indicatorname = 'Net migration';
Question: List the sources for the Net Migration in South American countries in 2002.
SQL: SELECT series.source FROM countrynotes INNER JOIN series ON countrynotes.seriescode = series.seriescode INNER JOIN country ON countrynotes.countrycode = country.countrycode INNER JOIN seriesnotes ON series.seriescode = seriesnotes.seriescode WHERE seriesnotes.year LIKE '%2002%' AND series.indicatorname = 'Net migration'