problem
stringlengths
121
422
db_id
stringclasses
69 values
solution
stringlengths
23
804
Write SQL query to solve given problem: Which artist has released the most singles with the tag "soul"?. Keep the solution inside sql tag ```sql [SQL-Query] ```
music_tracker
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
Write SQL query to solve given problem: Among the artists with the id from 10 to 30. Which artist released the product with the tag "funk" in 1980?. Keep the solution inside sql tag ```sql [SQL-Query] ```
music_tracker
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
Write SQL query to solve given problem: List the group name has the most downloaded that have released jazz genres from 1982 or later.. Keep the solution inside sql tag ```sql [SQL-Query] ```
music_tracker
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
Write SQL query to solve given problem: Which artist has id "16"? Provide her or his tag genre.. Keep the solution inside sql tag ```sql [SQL-Query] ```
music_tracker
SELECT T2.tag FROM torrents AS T1 INNER JOIN tags AS T2 ON T1.id = T2.id WHERE T1.id = 16
Write SQL query to solve given problem: Among id from 10 to 50. Which artist tagged as "new.york" has the most downloads?. Keep the solution inside sql tag ```sql [SQL-Query] ```
music_tracker
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
Write SQL query to solve given problem: List the name of artists who have released albums and mixtape from 1980 to 1985 in "dance" genre.. Keep the solution inside sql tag ```sql [SQL-Query] ```
music_tracker
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'
Write SQL query to solve given problem: How many singles were released between 1979 and 1981 labeled as "soul"?. Keep the solution inside sql tag ```sql [SQL-Query] ```
music_tracker
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'
Write SQL query to solve given problem: How many singles were released in 1979?. Keep the solution inside sql tag ```sql [SQL-Query] ```
music_tracker
SELECT COUNT(releaseType) FROM torrents WHERE releaseType LIKE 'single' AND groupYear = 1979
Write SQL query to solve given problem: In 1980, how many singles were released by sugar daddy?. Keep the solution inside sql tag ```sql [SQL-Query] ```
music_tracker
SELECT COUNT(releaseType) FROM torrents WHERE artist LIKE 'sugar daddy' AND releaseType LIKE 'Single' AND groupYear = 1980
Write SQL query to solve given problem: How many christmas albums were released in 2004?. Keep the solution inside sql tag ```sql [SQL-Query] ```
music_tracker
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'
Write SQL query to solve given problem: Please list all tags of kurtis blow from 2000 to 2010.. Keep the solution inside sql tag ```sql [SQL-Query] ```
music_tracker
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'
Write SQL query to solve given problem: Which album title and tag that millie jackson released in 1980?. Keep the solution inside sql tag ```sql [SQL-Query] ```
music_tracker
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'
Write SQL query to solve given problem: Please list all release titles whose tag is jazz in 2005.. Keep the solution inside sql tag ```sql [SQL-Query] ```
music_tracker
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'
Write SQL query to solve given problem: From 1980 to 2000, which artist had the most disco releases?. Keep the solution inside sql tag ```sql [SQL-Query] ```
music_tracker
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
Write SQL query to solve given problem: Which artists have released singles with the tag 1970s?. Keep the solution inside sql tag ```sql [SQL-Query] ```
music_tracker
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'
Write SQL query to solve given problem: From 1979 to 1982, what was the percentage of united.states albums out of total albums were released?. Keep the solution inside sql tag ```sql [SQL-Query] ```
music_tracker
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'
Write SQL query to solve given problem: Among the countries with note on the series code SM.POP.TOTL, how many of them are in the low-income group?. Keep the solution inside sql tag ```sql [SQL-Query] ```
world_development_indicators
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'
Write SQL query to solve given problem: How many low-income countries under the lending category of the International Development Associations have a note on the series code SM.POP.TOTL?. Keep the solution inside sql tag ```sql [SQL-Query] ```
world_development_indicators
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'
Write SQL query to solve given problem: 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?. Keep the solution inside sql tag ```sql [SQL-Query] ```
world_development_indicators
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'
Write SQL query to solve given problem: 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?. Keep the solution inside sql tag ```sql [SQL-Query] ```
world_development_indicators
SELECT T1.LongName FROM Country AS T1 INNER JOIN CountryNotes AS T2 ON T1.CountryCode = T2.Countrycode WHERE T2.Description = 'Estimates are derived FROM data on foreign-born population.' AND T2.Seriescode = 'SM.POP.TOTL'
Write SQL query to solve given problem: Please list the countries that got the footnote "Data are classified as official aid." on the series code DC.DAC.AUSL.CD in 2002.. Keep the solution inside sql tag ```sql [SQL-Query] ```
world_development_indicators
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%'
Write SQL query to solve given problem: What is the average adolescent fertility rate of the country whose Alpha2Code is 1A over the years this indicator was calculated.. Keep the solution inside sql tag ```sql [SQL-Query] ```
world_development_indicators
SELECT AVG(T2.Value) FROM Country AS T1 INNER JOIN Indicators AS T2 ON T1.CountryCode = T2.Countrycode WHERE T1.Alpha2Code = '1A' AND T2.IndicatorName LIKE 'adolescent fertility rate%'
Write SQL query to solve given problem: What are the special notes for the country whose average adolescent fertility rate is the highest?. Keep the solution inside sql tag ```sql [SQL-Query] ```
world_development_indicators
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 )
Write SQL query to solve given problem: List the East Asia & Pacific countries which are under the High income: nonOECD group. Please include their alpha code.. Keep the solution inside sql tag ```sql [SQL-Query] ```
world_development_indicators
SELECT CountryCode, Alpha2Code FROM Country WHERE Region = 'East Asia & Pacific' AND IncomeGroup = 'High income: nonOECD'
Write SQL query to solve given problem: 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.. Keep the solution inside sql tag ```sql [SQL-Query] ```
world_development_indicators
SELECT LongName, Alpha2Code FROM Country WHERE LatestTradeData = 2013 AND LatestWaterWithdrawalData = 2013
Write SQL query to solve given problem: What is the average value of Adjusted net enrolment rate, primary, both sexes (%) indicator in Algeria from 1975 to 1980?. Keep the solution inside sql tag ```sql [SQL-Query] ```
world_development_indicators
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 (%)'
Write SQL query to solve given problem: What are the Indicator names and aggregation methods when the topic is Economic Policy & Debt: Balance of payments: Capital & financial account?. Keep the solution inside sql tag ```sql [SQL-Query] ```
world_development_indicators
SELECT IndicatorName, AggregationMethod FROM Series WHERE Topic = 'Economic Policy & Debt: Balance of payments: Capital & financial account'
Write SQL query to solve given problem: In 1970, how many Middle Eastern & North African countries whose value for CO2 emissions from gaseous fuel consumption (kt) indicator is more than 600?. Keep the solution inside sql tag ```sql [SQL-Query] ```
world_development_indicators
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
Write SQL query to solve given problem: 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.. Keep the solution inside sql tag ```sql [SQL-Query] ```
world_development_indicators
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
Write SQL query to solve given problem: 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?. Keep the solution inside sql tag ```sql [SQL-Query] ```
world_development_indicators
SELECT T2.ShortName FROM Indicators AS T1 INNER JOIN Country AS T2 ON T1.CountryCode = T2.CountryCode WHERE T1.IndicatorName = 'Net bilateral aid flows FROM DAC donors, Sweden (current US$)' AND T1.Year = 1970 AND T1.Value = 570000
Write SQL query to solve given problem: 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.. Keep the solution inside sql tag ```sql [SQL-Query] ```
world_development_indicators
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 != ''
Write SQL query to solve given problem: 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.. Keep the solution inside sql tag ```sql [SQL-Query] ```
world_development_indicators
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
Write SQL query to solve given problem: 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?. Keep the solution inside sql tag ```sql [SQL-Query] ```
world_development_indicators
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
Write SQL query to solve given problem: Which countries have a fertility rate between 4 and 5 in 1979? List their names.. Keep the solution inside sql tag ```sql [SQL-Query] ```
world_development_indicators
SELECT CountryName FROM Indicators WHERE Year = 1979 AND IndicatorName = 'Fertility rate, total (births per woman)' AND value >= 4 AND Value <= 5
Write SQL query to solve given problem: 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.. Keep the solution inside sql tag ```sql [SQL-Query] ```
world_development_indicators
SELECT TableName, SourceOfMostRecentIncomeAndExpenditureData FROM Country WHERE Region = 'South Asia' AND IncomeGroup = 'Low income'
Write SQL query to solve given problem: What are the sources for the data of children who finished primary school education in Latin America & Caribbean countries?. Keep the solution inside sql tag ```sql [SQL-Query] ```
world_development_indicators
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'
Write SQL query to solve given problem: List the sources for the Net Migration in South American countries in 2002.. Keep the solution inside sql tag ```sql [SQL-Query] ```
world_development_indicators
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'
Write SQL query to solve given problem: What are the sources for the data of children who finished primary school education in North American countries?. Keep the solution inside sql tag ```sql [SQL-Query] ```
world_development_indicators
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)'
Write SQL query to solve given problem: 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.. Keep the solution inside sql tag ```sql [SQL-Query] ```
world_development_indicators
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
Write SQL query to solve given problem: Which European countries had the highest private expenditure on health in 2005? List the top ten countries in descending order and find the source of the data.. Keep the solution inside sql tag ```sql [SQL-Query] ```
world_development_indicators
SELECT DISTINCT T1.CountryCode, T3.Description FROM Country AS T1 INNER JOIN Indicators AS T2 ON T1.CountryCode = T2.CountryCode INNER JOIN CountryNotes AS T3 ON T1.CountryCode = T3.Countrycode WHERE T2.IndicatorName = 'Out-of-pocket health expenditure (% of private expenditure on health)' AND T2.Value > 0 AND T2.year = 2005 ORDER BY T2.Value DESC LIMIT 10
Write SQL query to solve given problem: How many low income countries are there in South Asia?. Keep the solution inside sql tag ```sql [SQL-Query] ```
world_development_indicators
SELECT COUNT(CountryCode) FROM Country WHERE Region = 'South Asia' AND IncomeGroup = 'Low income'
Write SQL query to solve given problem: Please list the short name of countries which have the latest trade data after 2010.. Keep the solution inside sql tag ```sql [SQL-Query] ```
world_development_indicators
SELECT ShortName FROM Country WHERE LatestTradeData > 2010
Write SQL query to solve given problem: Please calculate the percentage of Sub-Saharan African countries which are in the Special trade system.. Keep the solution inside sql tag ```sql [SQL-Query] ```
world_development_indicators
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'
Write SQL query to solve given problem: Please calculate the average of Arms imports (SIPRI trend indicator values) of the European & Central Asian countries.. Keep the solution inside sql tag ```sql [SQL-Query] ```
world_development_indicators
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)'
Write SQL query to solve given problem: Which upper middle income country has the lowest value of CO2 emissions (kt)?. Keep the solution inside sql tag ```sql [SQL-Query] ```
world_development_indicators
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
Write SQL query to solve given problem: What is the minimum of International migrant stock, total of heavily indebted poor countries?. Keep the solution inside sql tag ```sql [SQL-Query] ```
world_development_indicators
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'
Write SQL query to solve given problem: In 2005, which series codes use the International Monetary Fund, Balance of Payments Statistics Yearbook and data files source?. Keep the solution inside sql tag ```sql [SQL-Query] ```
world_development_indicators
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%'
Write SQL query to solve given problem: What percentage of countries in South Asia have the Life expectancy at birth, female (years) greater than 50?. Keep the solution inside sql tag ```sql [SQL-Query] ```
world_development_indicators
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)'
Write SQL query to solve given problem: From 1960 to 1965, which country had the highest Death rate, crude (per 1,000 people)?. Keep the solution inside sql tag ```sql [SQL-Query] ```
world_development_indicators
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
Write SQL query to solve given problem: Please list the indicator names of Arab World whose values are higher than 50 in 1960.. Keep the solution inside sql tag ```sql [SQL-Query] ```
world_development_indicators
SELECT IndicatorName FROM Indicators WHERE CountryName = 'Arab World' AND Year = 1960 AND Value > 50
Write SQL query to solve given problem: Which country has the highest value of Merchandise imports by the reporting economy (current US$)?. Keep the solution inside sql tag ```sql [SQL-Query] ```
world_development_indicators
SELECT CountryName FROM Indicators WHERE IndicatorName = 'Merchandise imports by the reporting economy (current US$)' ORDER BY Value DESC LIMIT 1
Write SQL query to solve given problem: Please list annual indicator names which have values of more than 100 in 1965.. Keep the solution inside sql tag ```sql [SQL-Query] ```
world_development_indicators
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'
Write SQL query to solve given problem: From 1968 to 1970, what are indicator names whose license type is open and values are less than 100?. Keep the solution inside sql tag ```sql [SQL-Query] ```
world_development_indicators
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
Write SQL query to solve given problem: Which country had the highest value of indicator belongs to Private Sector & Trade: Exports topic? Please list the country name and indicator name.. Keep the solution inside sql tag ```sql [SQL-Query] ```
world_development_indicators
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
Write SQL query to solve given problem: Which indicator name uses the Weighted average method and has the lowest value?. Keep the solution inside sql tag ```sql [SQL-Query] ```
world_development_indicators
SELECT T1.IndicatorName, MIN(T1.Value) FROM Indicators AS T1 INNER JOIN Series AS T2 ON T1.IndicatorName = T2.IndicatorName WHERE T2.AggregationMethod = 'Weighted average'
Write SQL query to solve given problem: Please list out all annual indicator names of Sudan in 1961?. Keep the solution inside sql tag ```sql [SQL-Query] ```
world_development_indicators
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'
Write SQL query to solve given problem: From 1960 to 1965, which country has the lowest value of indicator belongs to Health: Population: Structure?. Keep the solution inside sql tag ```sql [SQL-Query] ```
world_development_indicators
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' )
Write SQL query to solve given problem: What percentage of upper middle income countries which have the CO2 emissions from liquid fuel consumption (% of total) less than 80%?. Keep the solution inside sql tag ```sql [SQL-Query] ```
world_development_indicators
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'
Write SQL query to solve given problem: What is indicator code of Rural population?. Keep the solution inside sql tag ```sql [SQL-Query] ```
world_development_indicators
SELECT DISTINCT IndicatorCode FROM Indicators WHERE IndicatorName = 'Rural population'
Write SQL query to solve given problem: How many country uses the 2008 System of National Accounts methodology? List our their table name.. Keep the solution inside sql tag ```sql [SQL-Query] ```
world_development_indicators
SELECT TableName FROM Country WHERE SystemOfNationalAccounts = 'Country uses the 2008 System of National Accounts methodology.'
Write SQL query to solve given problem: Mention the series code of countries using Hong Kong dollar as their currency unit.. Keep the solution inside sql tag ```sql [SQL-Query] ```
world_development_indicators
SELECT T2.SeriesCode FROM Country AS T1 INNER JOIN CountryNotes AS T2 ON T1.CountryCode = T2.Countrycode WHERE T1.CurrencyUnit = 'Hong Kong dollar'
Write SQL query to solve given problem: List out the country name of lower earning countries. Keep the solution inside sql tag ```sql [SQL-Query] ```
world_development_indicators
SELECT DISTINCT T2.CountryName FROM Country AS T1 INNER JOIN Indicators AS T2 ON T1.CountryCode = T2.CountryCode WHERE T1.IncomeGroup = 'Low income'
Write SQL query to solve given problem: List out the series code and country code of the poor countries that located in Latin American & Carribbean.. Keep the solution inside sql tag ```sql [SQL-Query] ```
world_development_indicators
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'
Write SQL query to solve given problem: Mention the series code of countries using Australian dollar as their currency unit. Which country belongs to middle income group among them.. Keep the solution inside sql tag ```sql [SQL-Query] ```
world_development_indicators
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'
Write SQL query to solve given problem: 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.. Keep the solution inside sql tag ```sql [SQL-Query] ```
world_development_indicators
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 )
Write SQL query to solve given problem: List out the country code and country name of the rich countries using Euro as their currency unit. Keep the solution inside sql tag ```sql [SQL-Query] ```
world_development_indicators
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')
Write SQL query to solve given problem: List out the name and indicator code of high income: nonOECD countries. Keep the solution inside sql tag ```sql [SQL-Query] ```
world_development_indicators
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'
Write SQL query to solve given problem: Mention the series code of countries using pound sterling as their currency unit. Which country belongs to high income group among them.. Keep the solution inside sql tag ```sql [SQL-Query] ```
world_development_indicators
SELECT DISTINCT T1.CountryCode, T1.CurrencyUnit, T1.IncomeGroup FROM Country AS T1 INNER JOIN CountryNotes AS T2 ON T1.CountryCode = T2.Countrycode WHERE T1.CurrencyUnit = 'Pound sterling' AND T1.IncomeGroup LIKE '%high income%'
Write SQL query to solve given problem: List down 10 country codes and it's short names.. Keep the solution inside sql tag ```sql [SQL-Query] ```
world_development_indicators
SELECT CountryCode, ShortName FROM Country LIMIT 10
Write SQL query to solve given problem: How many of the countries name start with alphabet A? List down the Alpha2Code of them.. Keep the solution inside sql tag ```sql [SQL-Query] ```
world_development_indicators
SELECT COUNT(ShortName) FROM Country WHERE ShortName LIKE 'A%' UNION SELECT alpha2code FROM country WHERE shortname LIKE 'A%'
Write SQL query to solve given problem: How many of the countries do not have special notes? List the long name.. Keep the solution inside sql tag ```sql [SQL-Query] ```
world_development_indicators
SELECT COUNT(LongName) FROM Country WHERE SpecialNotes = '' UNION SELECT longname FROM country WHERE specialnotes = ''
Write SQL query to solve given problem: Which high income group countries are from Asia?. Keep the solution inside sql tag ```sql [SQL-Query] ```
world_development_indicators
SELECT CountryCode, Region FROM Country WHERE (IncomeGroup = 'High income: OECD' OR IncomeGroup = 'High income: nonOECD') AND Region LIKE '%Asia%'
Write SQL query to solve given problem: Name the countries' long name with national accounts base year prior to 1980.. Keep the solution inside sql tag ```sql [SQL-Query] ```
world_development_indicators
SELECT LongName FROM Country WHERE NationalAccountsBaseYear < '1980' AND NationalAccountsBaseYear != ''
Write SQL query to solve given problem: Which low income country has a series code of DT.DOD.DECT.CD? Name the country code of it.. Keep the solution inside sql tag ```sql [SQL-Query] ```
world_development_indicators
SELECT T1.CountryCode FROM Country AS T1 INNER JOIN CountryNotes AS T2 ON T1.CountryCode = T2.Countrycode WHERE T1.IncomeGroup = 'Low income' AND T2.Seriescode = 'DT.DOD.DECT.CD'
Write SQL query to solve given problem: State the table name of country with description of "Covers mainland Tanzania only".. Keep the solution inside sql tag ```sql [SQL-Query] ```
world_development_indicators
SELECT DISTINCT T1.TableName FROM Country AS T1 INNER JOIN CountryNotes AS T2 ON T1.CountryCode = T2.Countrycode WHERE T2.Description = 'Covers mainland Tanzania only.'
Write SQL query to solve given problem: What are the years when countries have indicator name of "Air transport, passengers carried"? List the table name of these countries.. Keep the solution inside sql tag ```sql [SQL-Query] ```
world_development_indicators
SELECT DISTINCT T2.Year, T1.TableName FROM Country AS T1 INNER JOIN Indicators AS T2 ON T1.CountryCode = T2.CountryCode WHERE T2.IndicatorName = 'Air transport, passengers carried'
Write SQL query to solve given problem: List the long name of countries with indicator name in 1980.. Keep the solution inside sql tag ```sql [SQL-Query] ```
world_development_indicators
SELECT DISTINCT T1.LongName FROM Country AS T1 INNER JOIN Indicators AS T2 ON T1.CountryCode = T2.CountryCode WHERE T2.Year = 1980 AND T2.IndicatorName IS NOT NULL
Write SQL query to solve given problem: State the currency of Malaysia and what are the indicator code used by this country in 1970?. Keep the solution inside sql tag ```sql [SQL-Query] ```
world_development_indicators
SELECT T1.currencyunit, T2.IndicatorCode FROM Country AS T1 INNER JOIN Indicators AS T2 ON T1.CountryCode = T2.CountryCode WHERE T1.TableName = 'Malaysia' AND T2.Year = 1970
Write SQL query to solve given problem: Name 5 country codes of country with highest value and state the region of these countries.. Keep the solution inside sql tag ```sql [SQL-Query] ```
world_development_indicators
SELECT DISTINCT T1.CountryCode, T1.Region FROM Country AS T1 INNER JOIN Indicators AS T2 ON T1.CountryCode = T2.CountryCode ORDER BY T2.Value DESC LIMIT 5
Write SQL query to solve given problem: How many countries have country note description as "Sources: UN Energy Statistics (2014)"? List the currency of these countries.. Keep the solution inside sql tag ```sql [SQL-Query] ```
world_development_indicators
SELECT COUNT(DISTINCT T1.Countrycode) FROM Country AS T1 INNER JOIN CountryNotes AS T2 ON T1.CountryCode = T2.Countrycode WHERE T2.Description = 'Sources: UN Energy Statistics (2014)' UNION SELECT DISTINCT t1.CurrencyUnit FROM country AS t1 INNER JOIN countrynotes AS t2 ON t1.CountryCode = t2.Countrycode WHERE t2.Description = 'Sources: UN Energy Statistics (2014)'
Write SQL query to solve given problem: List the series code of country with country notes description as "Data sources : Eurostat" and state the Wb2Code of these countries.. Keep the solution inside sql tag ```sql [SQL-Query] ```
world_development_indicators
SELECT T2.seriescode, T1.Wb2Code FROM Country AS T1 INNER JOIN CountryNotes AS T2 ON T1.CountryCode = T2.Countrycode WHERE T2.Description = 'Data sources : Eurostat'
Write SQL query to solve given problem: Among the low income countries, which country has the lowest fertility rate?. Keep the solution inside sql tag ```sql [SQL-Query] ```
world_development_indicators
SELECT T2.CountryName FROM Country AS T1 INNER JOIN Indicators AS T2 ON T1.CountryCode = T2.CountryCode WHERE T1.IncomeGroup = 'Low income' AND T2.IndicatorName = 'Adolescent fertility rate (births per 1,000 women ages 15-19)' ORDER BY T2.Value LIMIT 1
Write SQL query to solve given problem: How much is the total urban population of middle income countries in 1960?. Keep the solution inside sql tag ```sql [SQL-Query] ```
world_development_indicators
SELECT SUM(T2.Value) FROM Country AS T1 INNER JOIN Indicators AS T2 ON T1.CountryCode = T2.CountryCode WHERE T1.IncomeGroup LIKE '%middle income' AND T2.Year = 1960 AND T2.IndicatorName = 'Urban population'
Write SQL query to solve given problem: Name the country with fastest growth in adjusted net national income in 1980 and state the currency used by this country.. Keep the solution inside sql tag ```sql [SQL-Query] ```
world_development_indicators
SELECT T2.countryname, T1.CurrencyUnit FROM Country AS T1 INNER JOIN Indicators AS T2 ON T1.CountryCode = T2.CountryCode WHERE T2.IndicatorName = 'Adjusted net national income (annual % growth)' AND T2.Year = 1980 AND T1.CurrencyUnit != '' ORDER BY T2.Value DESC LIMIT 1
Write SQL query to solve given problem: How many countries using the 1993 System of National Accounts methodology?. Keep the solution inside sql tag ```sql [SQL-Query] ```
world_development_indicators
SELECT COUNT(CountryCode) FROM Country WHERE SystemOfNationalAccounts = 'Country uses the 1993 System of National Accounts methodology.'
Write SQL query to solve given problem: Which country have conducted population census from 2010 until 2012 and have completed vital registration?. Keep the solution inside sql tag ```sql [SQL-Query] ```
world_development_indicators
SELECT ShortName, LongName FROM Country WHERE LatestPopulationCensus >= 2010 AND LatestPopulationCensus < 2013 AND VitalRegistrationComplete = 'Yes'
Write SQL query to solve given problem: Which country have the highest CO2 emissions in 1960?. Keep the solution inside sql tag ```sql [SQL-Query] ```
world_development_indicators
SELECT CountryName FROM Indicators WHERE Year = 1960 AND IndicatorName = 'CO2 emissions (metric tons per capita)' ORDER BY Value DESC LIMIT 1
Write SQL query to solve given problem: 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.. Keep the solution inside sql tag ```sql [SQL-Query] ```
world_development_indicators
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' )
Write SQL query to solve given problem: Which country have data classified as official aid?. Keep the solution inside sql tag ```sql [SQL-Query] ```
world_development_indicators
SELECT DISTINCT T1.CountryCode FROM Country AS T1 INNER JOIN FootNotes AS T2 ON T1.CountryCode = T2.Countrycode WHERE T2.Description = 'Data are classified as official aid.'
Write SQL query to solve given problem: What country have its data estimated based on regression?. Keep the solution inside sql tag ```sql [SQL-Query] ```
world_development_indicators
SELECT DISTINCT T1.ShortName FROM Country AS T1 INNER JOIN CountryNotes AS T2 ON T1.CountryCode = T2.Countrycode WHERE T2.Description = 'Estimates are based on regression.'
Write SQL query to solve given problem: List all the country in East Asia & Pacific region that have more than 2000000 urban population in 1970.. Keep the solution inside sql tag ```sql [SQL-Query] ```
world_development_indicators
SELECT DISTINCT T1.CountryCode FROM Country AS T1 INNER JOIN Indicators AS T2 ON T1.CountryCode = T2.CountryCode WHERE T2.Year = 1970 AND T1.Region = 'East Asia & Pacific' AND T2.Value > 2000000 AND t2.indicatorname = 'Urban population'
Write SQL query to solve given problem: In 1960, what is largest population for country with upper middle income?. Keep the solution inside sql tag ```sql [SQL-Query] ```
world_development_indicators
SELECT MAX(T2.Value) FROM Country AS T1 INNER JOIN Indicators AS T2 ON T1.CountryCode = T2.CountryCode WHERE T1.IncomeGroup = 'Upper middle income' AND T2.Year = 1960 AND T2.IndicatorName = 'Population, total'
Write SQL query to solve given problem: How many countries uses the 1968 System of National Accounts methodology?. Keep the solution inside sql tag ```sql [SQL-Query] ```
world_development_indicators
SELECT COUNT(CountryCode) FROM Country WHERE SystemOfNationalAccounts = 'Country uses the 1968 System of National Accounts methodology.'
Write SQL query to solve given problem: 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.. Keep the solution inside sql tag ```sql [SQL-Query] ```
world_development_indicators
SELECT DISTINCT T1.ShortName FROM Country AS T1 INNER JOIN footnotes AS T2 ON T1.CountryCode = T2.CountryCode INNER JOIN Series AS T3 ON T2.Seriescode = T3.SeriesCode WHERE T1.IncomeGroup = 'Upper middle income' AND T1.Region = 'East Asia & Pacific' AND T3.Topic = 'Social Protection & Labor: Migration'
Write SQL query to solve given problem: Name the country in which the topic is about Poverty: Shared Prosperity. Indicate the long name of the country.. Keep the solution inside sql tag ```sql [SQL-Query] ```
world_development_indicators
SELECT DISTINCT T1.LongName FROM Country AS T1 INNER JOIN footnotes AS T2 ON T1.CountryCode = T2.Countrycode INNER JOIN Series AS T3 ON T2.Seriescode = T3.SeriesCode WHERE T3.Topic = 'Poverty: Shared prosperity'
Write SQL query to solve given problem: What country has the latest trade data with a series code of "SP.DYN.CDRT.IN "? List the table name of the country.. Keep the solution inside sql tag ```sql [SQL-Query] ```
world_development_indicators
SELECT DISTINCT T1.TableName FROM Country AS T1 INNER JOIN Indicators AS T2 ON T1.CountryCode = T2.CountryCode WHERE T1.LatestTradeData = 2013 AND T2.IndicatorCode = 'SP.DYN.CDRT.IN'
Write SQL query to solve given problem: How many countries are using the same type of currency? Please list the short names of any 3 countries.. Keep the solution inside sql tag ```sql [SQL-Query] ```
world_development_indicators
SELECT ShortName FROM country WHERE currencyunit = 'U.S. dollar' LIMIT 3
Write SQL query to solve given problem: What South Asian nations have low incomes? Please include the entire names of the nations in your answer.. Keep the solution inside sql tag ```sql [SQL-Query] ```
world_development_indicators
SELECT LongName FROM Country WHERE IncomeGroup = 'Low income' AND Region = 'South Asia'
Write SQL query to solve given problem: Please provide full name of any two countries using special trade system.. Keep the solution inside sql tag ```sql [SQL-Query] ```
world_development_indicators
SELECT LongName FROM Country WHERE SystemOfTrade = 'Special trade system' LIMIT 2
Write SQL query to solve given problem: Which country has had the highest proportion of CO2 emissions from transport?. Keep the solution inside sql tag ```sql [SQL-Query] ```
world_development_indicators
SELECT CountryName FROM Indicators WHERE IndicatorName LIKE 'CO2 emissions FROM transport%' ORDER BY Value DESC LIMIT 1