db_id stringlengths 4 31 | SQL stringlengths 18 1.45k | input_sequence stringlengths 148 11k | question stringlengths 16 325 |
|---|---|---|---|
world_development_indicators | select countryname from indicators where indicatorname like 'arable land (% of land area)' order by value desc limit 1 | Question: which country has the lowest percentage of arable land? | Tables: Country -> CountryCode, ShortName, TableName, LongName, Alpha2Code, CurrencyUnit, SpecialNotes, Region, IncomeGroup, Wb2Code, NationalAccountsBaseYear, NationalAccountsReferenceYear, SnaPriceValuation, LendingCategory, OtherGroups, SystemOfNati... | which country has the lowest percentage of arable land? |
world_development_indicators | select distinct topic from series where licensetype = 'restricted' | Question: what are the subjects of series that have a restricted type of license? | Tables: Country -> CountryCode, ShortName, TableName, LongName, Alpha2Code, CurrencyUnit, SpecialNotes, Region, IncomeGroup, Wb2Code, NationalAccountsBaseYear, NationalAccountsReferenceYear, SnaPriceValuation, LendingCategory, OtherGrou... | what are the subjects of series that have a restricted type of license? |
world_development_indicators | select countrycode from country where incomegroup = 'upper middle income' and externaldebtreportingstatus = 'preliminary' | Question: which countries in the upper middle income category still have unfinished external debt reporting? please provide the country codes in your answer. | Tables: Country -> CountryCode, ShortName, TableName, LongName, Alpha2Code, CurrencyUnit, SpecialNotes, Region, IncomeGroup, Wb2Code, NationalAccountsBaseYear, ... | which countries in the upper middle income category still have unfinished external debt reporting? please provide the country codes in your answer. |
world_development_indicators | select cast(sum(case when externaldebtreportingstatus = 'actual' then 1 else 0 end) as real) * 100 / count(countrycode) from country where region = 'middle east & north africa' | Question: what is the percentage of countries in the middle east and north africa that have finished reporting on their real external debt? | Tables: Country -> CountryCode, ShortName, TableName, LongName, Alpha2Code, CurrencyUnit, SpecialNotes, Region, IncomeGroup, Wb2Code, NationalAccountsBaseYear, NationalAccountsRe... | what is the percentage of countries in the middle east and north africa that have finished reporting on their real external debt? |
world_development_indicators | select sum(case when governmentaccountingconcept = 'budgetary central government' then 1 else 0 end), sum(case when governmentaccountingconcept = 'consolidated central government' then 1 else 0 end) central_nums from country where externaldebtreportingstatus = 'actual' | Question: which form of government has more countries that have completed the actual external debt reporting between the two types of government accounting concepts, budgetary central government vs. consolidated central government? | Tables: Country -> CountryCode, ShortName, TableName, LongName, Alpha2Code, CurrencyUn... | which form of government has more countries that have completed the actual external debt reporting between the two types of government accounting concepts, budgetary central government vs. consolidated central government? |
world_development_indicators | select count(countrycode) from country where region = 'east asia & pacific' and externaldebtreportingstatus = 'estimate' | Question: how many nations in east asia and the pacific have completed their external debt reporting on time? | Tables: Country -> CountryCode, ShortName, TableName, LongName, Alpha2Code, CurrencyUnit, SpecialNotes, Region, IncomeGroup, Wb2Code, NationalAccountsBaseYear, NationalAccountsReferenceYear, SnaPriceValuation... | how many nations in east asia and the pacific have completed their external debt reporting on time? |
world_development_indicators | select sum(case when incomegroup = 'lower middle income' then 1 else 0 end) * 100.0 / count(countrycode) persentage from country where region = 'sub-saharan africa' | Question: what proportion of sub-saharan africa's countries have lower middle incomes? | Tables: Country -> CountryCode, ShortName, TableName, LongName, Alpha2Code, CurrencyUnit, SpecialNotes, Region, IncomeGroup, Wb2Code, NationalAccountsBaseYear, NationalAccountsReferenceYear, SnaPriceValuation, LendingCategory, Othe... | what proportion of sub-saharan africa's countries have lower middle incomes? |
world_development_indicators | select max(t1.value) from indicators as t1 inner join country as t2 on t1.countrycode = t2.countrycode where t1.year >= 1961 and t1.year < 1981 and t1.indicatorname like 'agricultural land (% of land area)' and t2.longname = 'republic of benin' | Question: from 1961 to 1980, what was the highest percentage of land used for agriculture in the republic of benin? | Tables: Country -> CountryCode, ShortName, TableName, LongName, Alpha2Code, CurrencyUnit, SpecialNotes, Region, IncomeGroup, Wb2Code, NationalAccountsBaseYear, NationalAccountsReferenceYear, SnaPriceVal... | from 1961 to 1980, what was the highest percentage of land used for agriculture in the republic of benin? |
world_development_indicators | select distinct t2.longname from countrynotes as t1 inner join country as t2 on t1.countrycode = t2.countrycode where t1.description = 'sources: un energy statistics (2014)' limit 3 | Question: please list the full names of any three countries that have their series code with a description of un energy statistics (2014). | Tables: Country -> CountryCode, ShortName, TableName, LongName, Alpha2Code, CurrencyUnit, SpecialNotes, Region, IncomeGroup, Wb2Code, NationalAccountsBaseYear, NationalAccountsRef... | please list the full names of any three countries that have their series code with a description of un energy statistics (2014). |
world_development_indicators | select t1.value from indicators as t1 inner join country as t2 on t1.countrycode = t2.countrycode where t2.longname = 'commonwealth of australia' and t1.indicatorname = 'deposit interest rate (%)' and t1.year = 1979 | Question: what was the deposit interest rate in the commonwealth of australia in 1979 in percentage? | Tables: Country -> CountryCode, ShortName, TableName, LongName, Alpha2Code, CurrencyUnit, SpecialNotes, Region, IncomeGroup, Wb2Code, NationalAccountsBaseYear, NationalAccountsReferenceYear, SnaPriceValuation, Lending... | what was the deposit interest rate in the commonwealth of australia in 1979 in percentage? |
world_development_indicators | select t1.seriescode, t1.description from countrynotes as t1 inner join country as t2 on t1.countrycode = t2.countrycode where t2.shortname = 'germany' | Question: what is the series code for germany and what is its description? | Tables: Country -> CountryCode, ShortName, TableName, LongName, Alpha2Code, CurrencyUnit, SpecialNotes, Region, IncomeGroup, Wb2Code, NationalAccountsBaseYear, NationalAccountsReferenceYear, SnaPriceValuation, LendingCategory, OtherGroups, Sys... | what is the series code for germany and what is its description? |
world_development_indicators | select distinct t3.topic from countrynotes as t1 inner join country as t2 on t1.countrycode = t2.countrycode inner join series as t3 on t1.seriescode = t3.seriescode where t2.shortname = 'austria' | Question: please provide the subject of series of austria. | Tables: Country -> CountryCode, ShortName, TableName, LongName, Alpha2Code, CurrencyUnit, SpecialNotes, Region, IncomeGroup, Wb2Code, NationalAccountsBaseYear, NationalAccountsReferenceYear, SnaPriceValuation, LendingCategory, OtherGroups, SystemOfNationalAcc... | please provide the subject of series of austria. |
world_development_indicators | select distinct t1.topic, t2.description from series as t1 inner join seriesnotes as t2 on t1.seriescode = t2.seriescode where t1.seriescode = 'sp.dyn.amrt.ma' | Question: what is the subject of the series sp.dyn.amrt.ma and what does it pertain to? | Tables: Country -> CountryCode, ShortName, TableName, LongName, Alpha2Code, CurrencyUnit, SpecialNotes, Region, IncomeGroup, Wb2Code, NationalAccountsBaseYear, NationalAccountsReferenceYear, SnaPriceValuation, LendingCategory, Oth... | what is the subject of the series sp.dyn.amrt.ma and what does it pertain to? |
world_development_indicators | select count(distinct t1.countrycode) from country as t1 inner join footnotes as t2 on t1.countrycode = t2.countrycode where t2.description = 'unspecified' or t2.description = 'not specified' union select t1.longname from country as t1 inner join footnotes as t2 on t1.countrycode = t2.countrycode where t2.description ... | Question: how many countries are having their country's footnotes described as 'unspecified'? please provide the full names of any three of those countries. | Tables: Country -> CountryCode, ShortName, TableName, LongName, Alpha2Code, CurrencyUnit, SpecialNotes, Region, IncomeGroup, Wb2Code, NationalAccountsBaseYear, N... | how many countries are having their country's footnotes described as 'unspecified'? please provide the full names of any three of those countries. |
world_development_indicators | select t2.countrycode from indicators as t1 inner join country as t2 on t1.countrycode = t2.countrycode where t1.indicatorname like 'land under cereal production%' and t1.value = 3018500 and t1.year = 1980 and t2.externaldebtreportingstatus = 'actual' | Question: which nation completed its external debt reporting in 1980 and had a land under cereal production value of 3018500? | Tables: Country -> CountryCode, ShortName, TableName, LongName, Alpha2Code, CurrencyUnit, SpecialNotes, Region, IncomeGroup, Wb2Code, NationalAccountsBaseYear, NationalAccountsReferenceYear, S... | which nation completed its external debt reporting in 1980 and had a land under cereal production value of 3018500? |
world_development_indicators | select cast(sum(case when t1.value > 50 then 1 else 0 end) as real) * 100 / count(t2.countrycode) from indicators as t1 inner join country as t2 on t1.countrycode = t2.countrycode where t1.year = 1961 and t2.region = 'latin america & caribbean' and indicatorname = 'agricultural land (% of land area)' | Question: what portion of the nations in latin america and the caribbean had more than 50% of their land used for agriculture in 1961? | Tables: Country -> CountryCode, ShortName, TableName, LongName, Alpha2Code, CurrencyUnit, SpecialNotes, Region, IncomeGroup, Wb2Code, NationalAccountsBaseYear, NationalAccountsReferen... | what portion of the nations in latin america and the caribbean had more than 50% of their land used for agriculture in 1961? |
world_development_indicators | select longname from country where incomegroup = 'low income' and region = 'south asia' | Question: what are the full names of the countries in south asia that belongs to the low income group? | Tables: Country -> CountryCode, ShortName, TableName, LongName, Alpha2Code, CurrencyUnit, SpecialNotes, Region, IncomeGroup, Wb2Code, NationalAccountsBaseYear, NationalAccountsReferenceYear, SnaPriceValuation, Lendi... | what are the full names of the countries in south asia that belongs to the low income group? |
world_development_indicators | select distinct indicatorcode from indicators where countryname = 'brazil' and indicatorname = 'mobile cellular subscriptions' | Question: what is the indicator code for mobile cellular subscriptions of brazil? | Tables: Country -> CountryCode, ShortName, TableName, LongName, Alpha2Code, CurrencyUnit, SpecialNotes, Region, IncomeGroup, Wb2Code, NationalAccountsBaseYear, NationalAccountsReferenceYear, SnaPriceValuation, LendingCategory, OtherGrou... | what is the indicator code for mobile cellular subscriptions of brazil? |
world_development_indicators | select count(longname) from country where region = 'europe & central asia' and currencyunit = 'danish krone' union select longname from country where currencyunit = 'danish krone' and region = 'europe & central asia' | Question: how many countries in europe & central asia uses danish krone as its currency? list the full names of those coutnries. | Tables: Country -> CountryCode, ShortName, TableName, LongName, Alpha2Code, CurrencyUnit, SpecialNotes, Region, IncomeGroup, Wb2Code, NationalAccountsBaseYear, NationalAccountsReferenceYear... | how many countries in europe & central asia uses danish krone as its currency? list the full names of those coutnries. |
world_development_indicators | select countryname, max(value) from indicators where indicatorname = 'rural population (% of total population)' | Question: what is the name of the country with the highest percentage of rural population in the overall total population? indicate the rural population percentage of total population. | Tables: Country -> CountryCode, ShortName, TableName, LongName, Alpha2Code, CurrencyUnit, SpecialNotes, Region, IncomeGroup, Wb2Code,... | what is the name of the country with the highest percentage of rural population in the overall total population? indicate the rural population percentage of total population. |
world_development_indicators | select count(longname) from country where latestpopulationcensus = '2011' union all select longname from country where latestpopulationcensus = '2011' | Question: how many countries have a latest population census in 2011? indicate their full names. | Tables: Country -> CountryCode, ShortName, TableName, LongName, Alpha2Code, CurrencyUnit, SpecialNotes, Region, IncomeGroup, Wb2Code, NationalAccountsBaseYear, NationalAccountsReferenceYear, SnaPriceValuation, LendingCate... | how many countries have a latest population census in 2011? indicate their full names. |
world_development_indicators | select value from indicators where indicatorname = 'agricultural land (sq. km)' and year = 1968 and countryname = 'italy' | Question: what is the agricultural land area in sq. km of italy in 1968? | Tables: Country -> CountryCode, ShortName, TableName, LongName, Alpha2Code, CurrencyUnit, SpecialNotes, Region, IncomeGroup, Wb2Code, NationalAccountsBaseYear, NationalAccountsReferenceYear, SnaPriceValuation, LendingCategory, OtherGroups, Syste... | what is the agricultural land area in sq. km of italy in 1968? |
world_development_indicators | select max(t1.value), t1.year from indicators as t1 inner join country as t2 on t1.countrycode = t2.countrycode where t2.region = 'sub-saharan africa' and t1.indicatorname = 'out-of-school children of primary school age, female (number)' | Question: in sub-saharan africa, how many female out-of-school children of primary school age are there in the country with the higest number of female out-of-school children of primary school age? indicate the year of when it was recorded. | Tables: Country -> CountryCode, ShortName, TableName, LongName, Alpha2Code, C... | in sub-saharan africa, how many female out-of-school children of primary school age are there in the country with the higest number of female out-of-school children of primary school age? indicate the year of when it was recorded. |
world_development_indicators | select distinct t3.seriescode 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 t2.indicatorname = 'number of infant deaths' and t1.longname = 'islamic state of afghanistan' and t2.year = 1965 | Question: what is the series code for number of infant deaths in year 1965 for the country whose full name is islamic state of afghanistan? | Tables: Country -> CountryCode, ShortName, TableName, LongName, Alpha2Code, CurrencyUnit, SpecialNotes, Region, IncomeGroup, Wb2Code, NationalAccountsBaseYear, NationalAccountsRe... | what is the series code for number of infant deaths in year 1965 for the country whose full name is islamic state of afghanistan? |
world_development_indicators | select count(distinct t1.countrycode) from indicators as t1 inner join country as t2 on t1.countrycode = t2.countrycode where t2.region = 'middle east & north africa' and t2.systemofnationalaccounts = 'country uses the 1968 system of national accounts methodology.' and t1.indicatorname = 'co2 emissions from solid fuel ... | Question: among the countries who uses the 1968 system of national accounts methodology, how many are in the middle east & north africa? name the country with the highest co2 emissions from solid fuel consumption in kiloton. | Tables: Country -> CountryCode, ShortName, TableName, LongName, Alpha2Code, CurrencyUnit, Spe... | among the countries who uses the 1968 system of national accounts methodology, how many are in the middle east & north africa? name the country with the highest co2 emissions from solid fuel consumption in kiloton. |
world_development_indicators | select distinct t1.indicatorcode from indicators as t1 inner join country as t2 on t1.countrycode = t2.countrycode where t1.year = 1960 and t2.longname = 'republic of albania' | Question: what are the indicator codes for the republic of albania in the year 1960? | Tables: Country -> CountryCode, ShortName, TableName, LongName, Alpha2Code, CurrencyUnit, SpecialNotes, Region, IncomeGroup, Wb2Code, NationalAccountsBaseYear, NationalAccountsReferenceYear, SnaPriceValuation, LendingCategory, OtherG... | what are the indicator codes for the republic of albania in the year 1960? |
world_development_indicators | select t1.lendingcategory from country as t1 inner join indicators as t2 on t1.countrycode = t2.countrycode where t2.indicatorname = 'cereal production (metric tons)' and t2.value = 6140000 and t2.year = 1966 | Question: what is the lending category of the country with a cereal production of 6140000 metric tons for the year 1966? | Tables: Country -> CountryCode, ShortName, TableName, LongName, Alpha2Code, CurrencyUnit, SpecialNotes, Region, IncomeGroup, Wb2Code, NationalAccountsBaseYear, NationalAccountsReferenceYear, SnaPri... | what is the lending category of the country with a cereal production of 6140000 metric tons for the year 1966? |
world_development_indicators | select t2.countrycode, t2.region from indicators as t1 inner join country as t2 on t1.countrycode = t2.countrycode where t1.indicatorname = 'population in largest city' and t1.year >= 1960 and t1.year < 1980 order by t2.region desc limit 1 | Question: which country has the highest population in largest city for 19 consecutive years starting from 1960? indicate the region to which the country is located. | Tables: Country -> CountryCode, ShortName, TableName, LongName, Alpha2Code, CurrencyUnit, SpecialNotes, Region, IncomeGroup, Wb2Code, NationalAccountsBas... | which country has the highest population in largest city for 19 consecutive years starting from 1960? indicate the region to which the country is located. |
world_development_indicators | select sum(t1.value), t1.year from indicators as t1 inner join country as t2 on t1.countrycode = t2.countrycode where t1.indicatorname = 'co2 emissions (kt)' and t1.year >= 1975 and t1.year < 1981 and t1.countrycode = 'wld' and t2.specialnotes = 'world aggregate.' | Question: from 1975 to 1980, how much is the total amount co2 emmission in kiloton of the the world? indicate which year the world recorded its highest co2 emmissions. | Tables: Country -> CountryCode, ShortName, TableName, LongName, Alpha2Code, CurrencyUnit, SpecialNotes, Region, IncomeGroup, Wb2Code, NationalAccounts... | from 1975 to 1980, how much is the total amount co2 emmission in kiloton of the the world? indicate which year the world recorded its highest co2 emmissions. |
world_development_indicators | select t1.countryname, sum(t1.value) area, t2.incomegroup from indicators as t1 inner join country as t2 on t1.countrycode = t2.countrycode where t1.indicatorname = 'land area (sq. km)' and t1.year >= 1961 and t1.year < 1980 group by t1.countrycode order by sum(t1.value) asc limit 1 | Question: which country has the smallest land area in square kilometers for 19 consecutive years starting from year 1961? indicate how much is its land area in square kilometers in those years and the income group of the country. | Tables: Country -> CountryCode, ShortName, TableName, LongName, Alpha2Code, CurrencyUnit... | which country has the smallest land area in square kilometers for 19 consecutive years starting from year 1961? indicate how much is its land area in square kilometers in those years and the income group of the country. |
world_development_indicators | select avg(t1.value), t2.systemoftrade from indicators as t1 inner join country as t2 on t1.countrycode = t2.countrycode where t1.indicatorname = 'air transport, passengers carried' and t1.year >= 1970 and t1.year < 1981 and t1.countryname = 'bulgaria' | Question: what is the average number of passengers carried via air transport per year by bulgaria between 1970 to 1980? indicate the country's system of trade. | Tables: Country -> CountryCode, ShortName, TableName, LongName, Alpha2Code, CurrencyUnit, SpecialNotes, Region, IncomeGroup, Wb2Code, NationalAccountsBaseYear... | what is the average number of passengers carried via air transport per year by bulgaria between 1970 to 1980? indicate the country's system of trade. |
world_development_indicators | select latesthouseholdsurvey, pppsurveyyear from country where shortname = 'angola' | Question: what's the lastest household survey in angola and when did it take place? | Tables: Country -> CountryCode, ShortName, TableName, LongName, Alpha2Code, CurrencyUnit, SpecialNotes, Region, IncomeGroup, Wb2Code, NationalAccountsBaseYear, NationalAccountsReferenceYear, SnaPriceValuation, LendingCategory, OtherGr... | what's the lastest household survey in angola and when did it take place? |
world_development_indicators | select count(countrycode) from country where vitalregistrationcomplete = 'yes' and region = 'north america' | Question: how many countries in the north america region has completed the vital registration? | Tables: Country -> CountryCode, ShortName, TableName, LongName, Alpha2Code, CurrencyUnit, SpecialNotes, Region, IncomeGroup, Wb2Code, NationalAccountsBaseYear, NationalAccountsReferenceYear, SnaPriceValuation, LendingCatego... | how many countries in the north america region has completed the vital registration? |
world_development_indicators | select t2.year from country as t1 inner join indicators as t2 on t1.countrycode = t2.countrycode where t1.alpha2code = '1a' and t2.indicatorname = 'adolescent fertility rate (births per 1,000 women ages 15-19)' | Question: in which years does the country whose alpha2code is 1a have a result of the indicator adolescent fertility rate? | Tables: Country -> CountryCode, ShortName, TableName, LongName, Alpha2Code, CurrencyUnit, SpecialNotes, Region, IncomeGroup, Wb2Code, NationalAccountsBaseYear, NationalAccountsReferenceYear, SnaP... | in which years does the country whose alpha2code is 1a have a result of the indicator adolescent fertility rate? |
world_development_indicators | select t1.longname from country as t1 inner join indicators as t2 on t1.countrycode = t2.countrycode where t2.indicatorname = 'arms exports (sipri trend indicator values)' and t2.year = 1960 and t2.value = 3000000 | Question: what's the long name of the country that got 3000000 on the indicator arms exports in 1960? | Tables: Country -> CountryCode, ShortName, TableName, LongName, Alpha2Code, CurrencyUnit, SpecialNotes, Region, IncomeGroup, Wb2Code, NationalAccountsBaseYear, NationalAccountsReferenceYear, SnaPriceValuation, Lendin... | what's the long name of the country that got 3000000 on the indicator arms exports in 1960? |
world_development_indicators | select t1.alpha2code from country as t1 inner join indicators as t2 on t1.countrycode = t2.countrycode where t2.indicatorname = 'rural population' and t2.year = 1960 | Question: please list the alpha2codes of all the countries that have an indicator on rural population in 1960. | Tables: Country -> CountryCode, ShortName, TableName, LongName, Alpha2Code, CurrencyUnit, SpecialNotes, Region, IncomeGroup, Wb2Code, NationalAccountsBaseYear, NationalAccountsReferenceYear, SnaPriceValuatio... | please list the alpha2codes of all the countries that have an indicator on rural population in 1960. |
world_development_indicators | select distinct t1.countrycode, 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 = 'adolescent fertility rate (births per 1,000 women ages 15-19)' and year = 1960 order by value desc limit 1 ) | Question: which country's indicator for adolescent fertility rate is the highest in 1960, please give its special notes. | Tables: Country -> CountryCode, ShortName, TableName, LongName, Alpha2Code, CurrencyUnit, SpecialNotes, Region, IncomeGroup, Wb2Code, NationalAccountsBaseYear, NationalAccountsReferenceYear, SnaPri... | which country's indicator for adolescent fertility rate is the highest in 1960, please give its special notes. |
world_development_indicators | select ( select t2.value from country as t1 inner join indicators as t2 on t1.countrycode = t2.countrycode where t1.alpha2code = '1a' and t2.indicatorname = 'adolescent fertility rate (births per 1,000 women ages 15-19)' and t2.year = 1961 ) - ( select t2.value from country as t1 inner join indicators as t2 on t1.count... | Question: by how much did the indicator on adolescent fertility rate increase from 1960 to 1961 in the country whose alpha2code is 1a? | Tables: Country -> CountryCode, ShortName, TableName, LongName, Alpha2Code, CurrencyUnit, SpecialNotes, Region, IncomeGroup, Wb2Code, NationalAccountsBaseYear, NationalAccountsReferen... | by how much did the indicator on adolescent fertility rate increase from 1960 to 1961 in the country whose alpha2code is 1a? |
world_development_indicators | select t2.description from country as t1 inner join countrynotes as t2 on t1.countrycode = t2.countrycode where t2.seriescode = 'sp.ado.tfrt' and t1.shortname = 'australia' | Question: what is the note for australia on the indicator sp.ado.tfrt? | Tables: Country -> CountryCode, ShortName, TableName, LongName, Alpha2Code, CurrencyUnit, SpecialNotes, Region, IncomeGroup, Wb2Code, NationalAccountsBaseYear, NationalAccountsReferenceYear, SnaPriceValuation, LendingCategory, OtherGroups, SystemO... | what is the note for australia on the indicator sp.ado.tfrt? |
world_development_indicators | select t2.description from country as t1 inner join countrynotes as t2 on t1.countrycode = t2.countrycode inner join series as t3 on t2.seriescode = t3.seriescode where t1.shortname = 'aruba' and t3.topic = 'environment: energy production & use' | Question: please list the notes for aruba on the indicators under the topic of environment: energy production & use. | Tables: Country -> CountryCode, ShortName, TableName, LongName, Alpha2Code, CurrencyUnit, SpecialNotes, Region, IncomeGroup, Wb2Code, NationalAccountsBaseYear, NationalAccountsReferenceYear, SnaPriceVa... | please list the notes for aruba on the indicators under the topic of environment: energy production & use. |
world_development_indicators | select t1.shortname from country as t1 inner join countrynotes as t2 on t1.countrycode = t2.countrycode inner join series as t3 on t2.seriescode = t3.seriescode where t3.seriescode = 'bx.klt.dinv.cd.wd' | Question: which countries have notes on the indicator bx.klt.dinv.cd.wd? | Tables: Country -> CountryCode, ShortName, TableName, LongName, Alpha2Code, CurrencyUnit, SpecialNotes, Region, IncomeGroup, Wb2Code, NationalAccountsBaseYear, NationalAccountsReferenceYear, SnaPriceValuation, LendingCategory, OtherGroups, Syste... | which countries have notes on the indicator bx.klt.dinv.cd.wd? |
world_development_indicators | select t1.region from country as t1 inner join countrynotes as t2 on t1.countrycode = t2.countrycode inner join series as t3 on t2.seriescode = t3.seriescode where t3.indicatorname = 'inflation, consumer prices (annual %)' | Question: for the country that has notes on the indicator inflation, consumer prices, in which region is it in? | Tables: Country -> CountryCode, ShortName, TableName, LongName, Alpha2Code, CurrencyUnit, SpecialNotes, Region, IncomeGroup, Wb2Code, NationalAccountsBaseYear, NationalAccountsReferenceYear, SnaPriceValuati... | for the country that has notes on the indicator inflation, consumer prices, in which region is it in? |
world_development_indicators | select count(t1.countrycode) from countrynotes as t1 inner join series as t2 on t1.seriescode = t2.seriescode where t2.indicatorname = 'stocks traded, turnover ratio of domestic shares (%)' | Question: how many countries have notes on the indicator stocks traded, turnover ratio of domestic shares? | Tables: Country -> CountryCode, ShortName, TableName, LongName, Alpha2Code, CurrencyUnit, SpecialNotes, Region, IncomeGroup, Wb2Code, NationalAccountsBaseYear, NationalAccountsReferenceYear, SnaPriceValuation, L... | how many countries have notes on the indicator stocks traded, turnover ratio of domestic shares? |
world_development_indicators | select t2.aggregationmethod from indicators as t1 inner join series as t2 on t1.indicatorname = t2.indicatorname inner join country as t3 on t1.countrycode = t3.countrycode where t3.shortname = 'arab world' and t1.value = 133 and t1.year = 1960 | Question: what's the agregation method for the indicator whose value is 133 in 1960 for the arab world? | Tables: Country -> CountryCode, ShortName, TableName, LongName, Alpha2Code, CurrencyUnit, SpecialNotes, Region, IncomeGroup, Wb2Code, NationalAccountsBaseYear, NationalAccountsReferenceYear, SnaPriceValuation, Lend... | what's the agregation method for the indicator whose value is 133 in 1960 for the arab world? |
world_development_indicators | select t1.value from indicators as t1 inner join series as t2 on t1.indicatorname = t2.indicatorname inner join country as t3 on t1.countrycode = t3.countrycode where t2.longdefinition = 'adolescent fertility rate is the number of births per 1,000 women ages 15-19.' and t3.shortname = 'arab world' and t1.year = 1960 | Question: what's the value of the indicator whose long definition is 'adolescent fertility rate is the number of births per 1,000 women ages 15-19.' for the arab world in 1960? | Tables: Country -> CountryCode, ShortName, TableName, LongName, Alpha2Code, CurrencyUnit, SpecialNotes, Region, IncomeGroup, Wb2Code, Nationa... | what's the value of the indicator whose long definition is 'adolescent fertility rate is the number of births per 1,000 women ages 15-19.' for the arab world in 1960? |
world_development_indicators | select (( select t2.value from country as t1 inner join indicators as t2 on t1.countrycode = t2.countrycode where t1.alpha2code = '1a' and t2.indicatorname = 'adolescent fertility rate (births per 1,000 women ages 15-19)' and t2.year = 1961 ) - ( select t2.value from country as t1 inner join indicators as t2 on t1.coun... | Question: what is the percentage of increase of the indicator on adolescent fertility rate from 1960 to 1961 in the country whose alpha2code is 1a? | Tables: Country -> CountryCode, ShortName, TableName, LongName, Alpha2Code, CurrencyUnit, SpecialNotes, Region, IncomeGroup, Wb2Code, NationalAccountsBaseYear, NationalAc... | what is the percentage of increase of the indicator on adolescent fertility rate from 1960 to 1961 in the country whose alpha2code is 1a? |
world_development_indicators | select cast(sum(t2.value) as real) * 100 / count(t2.year) from country as t1 inner join indicators as t2 on t1.countrycode = t2.countrycode where t1.alpha2code = '1a' and t2.indicatorname = 'adolescent fertility rate (births per 1,000 women ages 15-19)' | Question: what is the average value of adolescent fertility rate in the country whose alpha2code is 1a? | Tables: Country -> CountryCode, ShortName, TableName, LongName, Alpha2Code, CurrencyUnit, SpecialNotes, Region, IncomeGroup, Wb2Code, NationalAccountsBaseYear, NationalAccountsReferenceYear, SnaPriceValuation, Lend... | what is the average value of adolescent fertility rate in the country whose alpha2code is 1a? |
movielens | select distinct t2.directorid from u2base as t1 inner join movies2directors as t2 on t1.movieid = t2.movieid where t1.rating > 4 | Question: list the different director ids of the movies whose user rating is more than 4. | Tables: users -> userid, age, u_gender, occupation. directors -> directorid, d_quality, avg_revenue. actors -> actorid, a_gender, a_quality. movies -> movieid, year, isEnglish, country, runningtime. movies2actors -> movieid, act... | list the different director ids of the movies whose user rating is more than 4. |
movielens | select count(t1.userid) from u2base as t1 inner join users as t2 on t1.userid = t2.userid where t1.rating = 5 and t2.u_gender = 'm' | Question: among the users who gave a rating of 5, how many of them are male? | Tables: users -> userid, age, u_gender, occupation. directors -> directorid, d_quality, avg_revenue. actors -> actorid, a_gender, a_quality. movies -> movieid, year, isEnglish, country, runningtime. movies2actors -> movieid, actorid, cast_nu... | among the users who gave a rating of 5, how many of them are male? |
movielens | select t2.genre from movies2actors as t1 inner join movies2directors as t2 on t1.movieid = t2.movieid inner join actors as t3 on t1.actorid = t3.actorid where t3.actorid = 851 | Question: list the genres of the movies which actor id 851 is the star. | Tables: users -> userid, age, u_gender, occupation. directors -> directorid, d_quality, avg_revenue. actors -> actorid, a_gender, a_quality. movies -> movieid, year, isEnglish, country, runningtime. movies2actors -> movieid, actorid, cast_num. mo... | list the genres of the movies which actor id 851 is the star. |
movielens | select count(t1.movieid) from u2base as t1 inner join movies as t2 on t1.movieid = t2.movieid where t2.country = 'usa' and t1.rating < 3 | Question: how many movies from the usa which user rating is less than 3? | Tables: users -> userid, age, u_gender, occupation. directors -> directorid, d_quality, avg_revenue. actors -> actorid, a_gender, a_quality. movies -> movieid, year, isEnglish, country, runningtime. movies2actors -> movieid, actorid, cast_num. m... | how many movies from the usa which user rating is less than 3? |
movielens | select count(t1.movieid) from movies2directors as t1 inner join movies as t2 on t1.movieid = t2.movieid where t2.country = 'france' and t1.genre = 'drama' | Question: among the movies from france, how many of them are drama? | Tables: users -> userid, age, u_gender, occupation. directors -> directorid, d_quality, avg_revenue. actors -> actorid, a_gender, a_quality. movies -> movieid, year, isEnglish, country, runningtime. movies2actors -> movieid, actorid, cast_num. movies... | among the movies from france, how many of them are drama? |
movielens | select avg(t2.occupation) from u2base as t1 inner join users as t2 on t1.userid = t2.userid where t1.rating < 2 | Question: what is the average occupation of users whose ratings are not more than 2 ? | Tables: users -> userid, age, u_gender, occupation. directors -> directorid, d_quality, avg_revenue. actors -> actorid, a_gender, a_quality. movies -> movieid, year, isEnglish, country, runningtime. movies2actors -> movieid, actorid... | what is the average occupation of users whose ratings are not more than 2 ? |
movielens | select t1.movieid from u2base as t1 inner join movies as t2 on t1.movieid = t2.movieid where t2.country = 'usa' group by t1.movieid order by avg(t1.rating) desc limit 10 | Question: list the top 10 usa movies, by descending order, from the highest to the lowest, the user rating. | Tables: users -> userid, age, u_gender, occupation. directors -> directorid, d_quality, avg_revenue. actors -> actorid, a_gender, a_quality. movies -> movieid, year, isEnglish, country, runningtime. movies2acto... | list the top 10 usa movies, by descending order, from the highest to the lowest, the user rating. |
movielens | select avg(t2.cast_num) from movies as t1 inner join movies2actors as t2 on t1.movieid = t2.movieid where t1.country = 'usa' | Question: what is the average number of casts of movies that are from the usa? | Tables: users -> userid, age, u_gender, occupation. directors -> directorid, d_quality, avg_revenue. actors -> actorid, a_gender, a_quality. movies -> movieid, year, isEnglish, country, runningtime. movies2actors -> movieid, actorid, cast_... | what is the average number of casts of movies that are from the usa? |
movielens | select distinct t1.movieid from u2base as t1 inner join movies as t2 on t1.movieid = t2.movieid where t2.country = 'other' and t2.isenglish = 'f' limit 5 | Question: list the top 5 movies from other countries which to language is not in english. | Tables: users -> userid, age, u_gender, occupation. directors -> directorid, d_quality, avg_revenue. actors -> actorid, a_gender, a_quality. movies -> movieid, year, isEnglish, country, runningtime. movies2actors -> movieid, act... | list the top 5 movies from other countries which to language is not in english. |
movielens | select count(t1.actorid) from actors as t1 inner join movies2actors as t2 on t1.actorid = t2.actorid inner join u2base as t3 on t2.movieid = t3.movieid where t1.a_quality = 5 and t3.rating = 5 | Question: among the best actors, how many of them got a rating of 5 to the movies they starred? | Tables: users -> userid, age, u_gender, occupation. directors -> directorid, d_quality, avg_revenue. actors -> actorid, a_gender, a_quality. movies -> movieid, year, isEnglish, country, runningtime. movies2actors -> moviei... | among the best actors, how many of them got a rating of 5 to the movies they starred? |
movielens | select avg(t1.rating) from u2base as t1 inner join movies as t2 on t1.movieid = t2.movieid where t2.country = 'france' and t2.year = 4 | Question: what is the average rating of the newest movies from france? | Tables: users -> userid, age, u_gender, occupation. directors -> directorid, d_quality, avg_revenue. actors -> actorid, a_gender, a_quality. movies -> movieid, year, isEnglish, country, runningtime. movies2actors -> movieid, actorid, cast_num. mov... | what is the average rating of the newest movies from france? |
movielens | select count(t1.movieid) from u2base as t1 inner join movies as t2 on t1.movieid = t2.movieid where t2.country = 'uk' and t2.runningtime < 2 and t1.rating = 5 | Question: among the most rated uk movies, how many of them has running time of less than 2? | Tables: users -> userid, age, u_gender, occupation. directors -> directorid, d_quality, avg_revenue. actors -> actorid, a_gender, a_quality. movies -> movieid, year, isEnglish, country, runningtime. movies2actors -> movieid, a... | among the most rated uk movies, how many of them has running time of less than 2? |
movielens | select t1.userid from u2base as t1 inner join movies as t2 on t1.movieid = t2.movieid inner join users as t3 on t1.userid = t3.userid where t2.country = 'france' and t2.runningtime = 2 and t1.rating < 3 and t3.u_gender = 'm' | Question: list the id of male users who gave ratings of less than 3 to french movies with running time of 2. | Tables: users -> userid, age, u_gender, occupation. directors -> directorid, d_quality, avg_revenue. actors -> actorid, a_gender, a_quality. movies -> movieid, year, isEnglish, country, runningtime. movies2act... | list the id of male users who gave ratings of less than 3 to french movies with running time of 2. |
movielens | select count(t1.userid) from u2base as t1 inner join movies2actors as t2 on t1.movieid = t2.movieid inner join actors as t3 on t2.actorid = t3.actorid inner join users as t4 on t1.userid = t4.userid where t3.a_quality = 0 and t1.rating > 3 and t4.u_gender = 'f' | Question: among the worst actresses, how many of them got a rating of more than 3 to the movies they starred? | Tables: users -> userid, age, u_gender, occupation. directors -> directorid, d_quality, avg_revenue. actors -> actorid, a_gender, a_quality. movies -> movieid, year, isEnglish, country, runningtime. movies2ac... | among the worst actresses, how many of them got a rating of more than 3 to the movies they starred? |
movielens | select userid from u2base where rating = 5 group by userid order by count(movieid) desc limit 1 | Question: what is the id of audiences that gave the most rating of 5? | Tables: users -> userid, age, u_gender, occupation. directors -> directorid, d_quality, avg_revenue. actors -> actorid, a_gender, a_quality. movies -> movieid, year, isEnglish, country, runningtime. movies2actors -> movieid, actorid, cast_num. movi... | what is the id of audiences that gave the most rating of 5? |
movielens | select t2.actorid, t4.genre from movies as t1 inner join movies2actors as t2 on t1.movieid = t2.movieid inner join actors as t3 on t2.actorid = t3.actorid inner join movies2directors as t4 on t1.movieid = t4.movieid where t4.directorid = 22397 | Question: what are the id of actors that had worked together with director 22397? what was the genre of that movie? | Tables: users -> userid, age, u_gender, occupation. directors -> directorid, d_quality, avg_revenue. actors -> actorid, a_gender, a_quality. movies -> movieid, year, isEnglish, country, runningtime. mov... | what are the id of actors that had worked together with director 22397? what was the genre of that movie? |
movielens | select t2.actorid, t1.directorid from movies2directors as t1 inner join movies2actors as t2 on t1.movieid = t2.movieid where t1.genre = 'action' | Question: please list down the id of actors and directors in action movies. | Tables: users -> userid, age, u_gender, occupation. directors -> directorid, d_quality, avg_revenue. actors -> actorid, a_gender, a_quality. movies -> movieid, year, isEnglish, country, runningtime. movies2actors -> movieid, actorid, cast_num... | please list down the id of actors and directors in action movies. |
movielens | select count(t2.actorid) from movies as t1 inner join movies2actors as t2 on t1.movieid = t2.movieid inner join actors as t3 on t2.actorid = t3.actorid where t3.a_gender = 'f' and t1.year = 4 | Question: how many female actors acted in the movies of year 4? | Tables: users -> userid, age, u_gender, occupation. directors -> directorid, d_quality, avg_revenue. actors -> actorid, a_gender, a_quality. movies -> movieid, year, isEnglish, country, runningtime. movies2actors -> movieid, actorid, cast_num. movies2dir... | how many female actors acted in the movies of year 4? |
movielens | select t2.actorid from movies as t1 inner join movies2actors as t2 on t1.movieid = t2.movieid inner join actors as t3 on t2.actorid = t3.actorid where t3.a_quality = 3 and t1.country = 'usa' and t1.isenglish = 't' | Question: what are the id of actors with quality rating of 3 acted in english usa movies? | Tables: users -> userid, age, u_gender, occupation. directors -> directorid, d_quality, avg_revenue. actors -> actorid, a_gender, a_quality. movies -> movieid, year, isEnglish, country, runningtime. movies2actors -> movieid, act... | what are the id of actors with quality rating of 3 acted in english usa movies? |
movielens | select t1.movieid from movies as t1 inner join movies2directors as t2 on t1.movieid = t2.movieid inner join directors as t3 on t2.directorid = t3.directorid where t1.runningtime = 3 and t3.avg_revenue = 1 | Question: list down the id of movies with running time of 3 and average revenue of 1? | Tables: users -> userid, age, u_gender, occupation. directors -> directorid, d_quality, avg_revenue. actors -> actorid, a_gender, a_quality. movies -> movieid, year, isEnglish, country, runningtime. movies2actors -> movieid, actorid... | list down the id of movies with running time of 3 and average revenue of 1? |
movielens | select t2.genre from movies as t1 inner join movies2directors as t2 on t1.movieid = t2.movieid where t1.country = 'uk' | Question: uk produced what genre of movies? | Tables: users -> userid, age, u_gender, occupation. directors -> directorid, d_quality, avg_revenue. actors -> actorid, a_gender, a_quality. movies -> movieid, year, isEnglish, country, runningtime. movies2actors -> movieid, actorid, cast_num. movies2directors -> movieid, d... | uk produced what genre of movies? |
movielens | select t1.genre from movies2directors as t1 inner join u2base as t2 on t1.movieid = t2.movieid inner join users as t3 on t2.userid = t3.userid where t3.age = 18 group by t1.genre order by count(t1.movieid) desc limit 1 | Question: what is the favourite movie genre for audiences of age 18? | Tables: users -> userid, age, u_gender, occupation. directors -> directorid, d_quality, avg_revenue. actors -> actorid, a_gender, a_quality. movies -> movieid, year, isEnglish, country, runningtime. movies2actors -> movieid, actorid, cast_num. movie... | what is the favourite movie genre for audiences of age 18? |
movielens | select t3.actorid from users as t1 inner join u2base as t2 on t1.userid = t2.userid inner join movies2actors as t3 on t2.movieid = t3.movieid where t1.occupation = 5 group by t2.movieid order by count(t1.userid) desc limit 1 | Question: what is the id of actors that acted in the movies most viewed by audience with occupation 5? | Tables: users -> userid, age, u_gender, occupation. directors -> directorid, d_quality, avg_revenue. actors -> actorid, a_gender, a_quality. movies -> movieid, year, isEnglish, country, runningtime. movies2actors ->... | what is the id of actors that acted in the movies most viewed by audience with occupation 5? |
movielens | select distinct t2.age from u2base as t1 inner join users as t2 on t1.userid = t2.userid where t1.rating = 3 | Question: movies with rating 3 are viewed by audiences in which distinct age group? | Tables: users -> userid, age, u_gender, occupation. directors -> directorid, d_quality, avg_revenue. actors -> actorid, a_gender, a_quality. movies -> movieid, year, isEnglish, country, runningtime. movies2actors -> movieid, actorid, ... | movies with rating 3 are viewed by audiences in which distinct age group? |
movielens | select t3.country from movies2directors as t1 inner join directors as t2 on t1.directorid = t2.directorid inner join movies as t3 on t1.movieid = t3.movieid where t1.genre = 'action' group by t3.country order by count(t3.country) desc limit 1 | Question: action movies are mostly directed by directors of which country? | Tables: users -> userid, age, u_gender, occupation. directors -> directorid, d_quality, avg_revenue. actors -> actorid, a_gender, a_quality. movies -> movieid, year, isEnglish, country, runningtime. movies2actors -> movieid, actorid, cast_num.... | action movies are mostly directed by directors of which country? |
movielens | select t2.movieid from actors as t1 inner join movies2actors as t2 on t1.actorid = t2.actorid group by t2.actorid order by avg(t1.a_quality) desc limit 5 | Question: please list down id of movies acted by top 5 actors based on actor rating. | Tables: users -> userid, age, u_gender, occupation. directors -> directorid, d_quality, avg_revenue. actors -> actorid, a_gender, a_quality. movies -> movieid, year, isEnglish, country, runningtime. movies2actors -> movieid, actorid,... | please list down id of movies acted by top 5 actors based on actor rating. |
movielens | select t1.movieid from movies2directors as t1 inner join movies as t2 on t1.movieid = t2.movieid where t2.country = 'uk' and t1.genre = 'adventure' and t2.isenglish = 'f' limit 5 | Question: list down 5 non english adventure movies from uk? | Tables: users -> userid, age, u_gender, occupation. directors -> directorid, d_quality, avg_revenue. actors -> actorid, a_gender, a_quality. movies -> movieid, year, isEnglish, country, runningtime. movies2actors -> movieid, actorid, cast_num. movies2directo... | list down 5 non english adventure movies from uk? |
movielens | select cast(sum(iif(t2.u_gender = 'f', 1, 0)) as real) * 100 / count(t2.userid) from u2base as t1 inner join users as t2 on t1.userid = t2.userid where t1.rating = 2 | Question: what is the percentage of female audiences who viewed movies with rating 2? | Tables: users -> userid, age, u_gender, occupation. directors -> directorid, d_quality, avg_revenue. actors -> actorid, a_gender, a_quality. movies -> movieid, year, isEnglish, country, runningtime. movies2actors -> movieid, actorid... | what is the percentage of female audiences who viewed movies with rating 2? |
movielens | select sum(iif(t2.u_gender = 'f', 1, 0)) - sum(iif(t2.u_gender = 'm', 1, 0)) from u2base as t1 inner join users as t2 on t1.userid = t2.userid inner join movies2directors as t3 on t3.movieid = t1.movieid where t3.genre = 'horror' | Question: what is the difference of female and male audiences in number who viewed horror movies? | Tables: users -> userid, age, u_gender, occupation. directors -> directorid, d_quality, avg_revenue. actors -> actorid, a_gender, a_quality. movies -> movieid, year, isEnglish, country, runningtime. movies2actors -> movi... | what is the difference of female and male audiences in number who viewed horror movies? |
movielens | select t2.genre from movies as t1 inner join movies2directors as t2 on t1.movieid = t2.movieid where t1.year = 4 and t1.isenglish = 't' | Question: please list the genre of the movies that are the newest and is in english. | Tables: users -> userid, age, u_gender, occupation. directors -> directorid, d_quality, avg_revenue. actors -> actorid, a_gender, a_quality. movies -> movieid, year, isEnglish, country, runningtime. movies2actors -> movieid, actorid,... | please list the genre of the movies that are the newest and is in english. |
movielens | select count(t1.movieid) from movies as t1 inner join movies2directors as t2 on t1.movieid = t2.movieid where t1.country = 'usa' and t1.isenglish = 'f' and t2.genre = 'action' | Question: among the action movies from the usa, how many of them are not in english? | Tables: users -> userid, age, u_gender, occupation. directors -> directorid, d_quality, avg_revenue. actors -> actorid, a_gender, a_quality. movies -> movieid, year, isEnglish, country, runningtime. movies2actors -> movieid, actorid,... | among the action movies from the usa, how many of them are not in english? |
movielens | select count(t1.movieid) from u2base as t1 inner join users as t2 on t1.userid = t2.userid where t1.rating = 5 and t2.age < 18 and t2.u_gender = 'm' | Question: for the male users no older than 18, how many times have they given the highest rating? | Tables: users -> userid, age, u_gender, occupation. directors -> directorid, d_quality, avg_revenue. actors -> actorid, a_gender, a_quality. movies -> movieid, year, isEnglish, country, runningtime. movies2actors -> movi... | for the male users no older than 18, how many times have they given the highest rating? |
movielens | select t1.movieid from u2base as t1 inner join users as t2 on t1.userid = t2.userid where t2.u_gender = 'f' group by t1.movieid order by count(t2.userid) desc limit 1 | Question: please list the id of the movie that has been mostly rated by female users. | Tables: users -> userid, age, u_gender, occupation. directors -> directorid, d_quality, avg_revenue. actors -> actorid, a_gender, a_quality. movies -> movieid, year, isEnglish, country, runningtime. movies2actors -> movieid, actorid... | please list the id of the movie that has been mostly rated by female users. |
movielens | select count(distinct t1.movieid) from u2base as t1 inner join movies as t2 on t1.movieid = t2.movieid where t2.country = 'uk' and t1.rating = 5 | Question: among divergent movies that got the highest rating, how many of them are from the uk? | Tables: users -> userid, age, u_gender, occupation. directors -> directorid, d_quality, avg_revenue. actors -> actorid, a_gender, a_quality. movies -> movieid, year, isEnglish, country, runningtime. movies2actors -> moviei... | among divergent movies that got the highest rating, how many of them are from the uk? |
movielens | select distinct t1.movieid from u2base as t1 inner join movies as t2 on t1.movieid = t2.movieid where t2.year = 4 and t1.rating = 1 | Question: please list different ids of movies that are the newest and have gotten the lowest rating. | Tables: users -> userid, age, u_gender, occupation. directors -> directorid, d_quality, avg_revenue. actors -> actorid, a_gender, a_quality. movies -> movieid, year, isEnglish, country, runningtime. movies2actors -> m... | please list different ids of movies that are the newest and have gotten the lowest rating. |
movielens | select count(distinct t1.movieid) from movies as t1 inner join u2base as t2 on t1.movieid = t2.movieid where t1.year = 1 and t2.rating = 1 and t1.isenglish = 't' | Question: for the movies in english that are the oldest, how many of them have the lowest rating? | Tables: users -> userid, age, u_gender, occupation. directors -> directorid, d_quality, avg_revenue. actors -> actorid, a_gender, a_quality. movies -> movieid, year, isEnglish, country, runningtime. movies2actors -> movi... | for the movies in english that are the oldest, how many of them have the lowest rating? |
movielens | select count(distinct t2.userid) from users as t1 inner join u2base as t2 on t1.userid = t2.userid inner join movies as t3 on t2.movieid = t3.movieid where t1.u_gender = 'f' and t3.country = 'france' | Question: how many different female users have rated movies from france? | Tables: users -> userid, age, u_gender, occupation. directors -> directorid, d_quality, avg_revenue. actors -> actorid, a_gender, a_quality. movies -> movieid, year, isEnglish, country, runningtime. movies2actors -> movieid, actorid, cast_num. m... | how many different female users have rated movies from france? |
movielens | select count(distinct t2.directorid) from movies2directors as t2 inner join directors as t3 on t2.directorid = t3.directorid where t2.genre = 'action' and t3.d_quality = 4 | Question: for different directors who direct well, how many of them have directed an action film? | Tables: users -> userid, age, u_gender, occupation. directors -> directorid, d_quality, avg_revenue. actors -> actorid, a_gender, a_quality. movies -> movieid, year, isEnglish, country, runningtime. movies2actors -> movi... | for different directors who direct well, how many of them have directed an action film? |
movielens | select t2.genre from directors as t1 inner join movies2directors as t2 on t1.directorid = t2.directorid where t1.avg_revenue = 4 | Question: please list the genre of the movies that are directed by the directors with the highest level of average revenue. | Tables: users -> userid, age, u_gender, occupation. directors -> directorid, d_quality, avg_revenue. actors -> actorid, a_gender, a_quality. movies -> movieid, year, isEnglish, country, runningt... | please list the genre of the movies that are directed by the directors with the highest level of average revenue. |
movielens | select count(distinct t1.actorid) from actors as t1 inner join movies2actors as t2 on t1.actorid = t2.actorid inner join movies as t3 on t2.movieid = t3.movieid where t3.isenglish = 't' and t1.a_gender = 'm' and t1.a_quality = 5 | Question: how many distinct movies in english stars a male actor who acts the best? | Tables: users -> userid, age, u_gender, occupation. directors -> directorid, d_quality, avg_revenue. actors -> actorid, a_gender, a_quality. movies -> movieid, year, isEnglish, country, runningtime. movies2actors -> movieid, actorid, ... | how many distinct movies in english stars a male actor who acts the best? |
movielens | select t3.country from actors as t1 inner join movies2actors as t2 on t1.actorid = t2.actorid inner join movies as t3 on t2.movieid = t3.movieid where t1.a_gender = 'f' and t1.a_quality = 0 | Question: please list the country of the movie that stars an actress who acts the worse. | Tables: users -> userid, age, u_gender, occupation. directors -> directorid, d_quality, avg_revenue. actors -> actorid, a_gender, a_quality. movies -> movieid, year, isEnglish, country, runningtime. movies2actors -> movieid, acto... | please list the country of the movie that stars an actress who acts the worse. |
movielens | select avg(t2.rating) from movies as t1 inner join u2base as t2 on t1.movieid = t2.movieid inner join movies2directors as t3 on t1.movieid = t3.movieid where t1.country = 'usa' and t3.genre = 'action' group by t1.movieid order by avg(t2.rating) desc limit 1 | Question: what is the highest average rating for action movies made in the usa? | Tables: users -> userid, age, u_gender, occupation. directors -> directorid, d_quality, avg_revenue. actors -> actorid, a_gender, a_quality. movies -> movieid, year, isEnglish, country, runningtime. movies2actors -> movieid, actorid, cast... | what is the highest average rating for action movies made in the usa? |
movielens | select count(*) from ( select distinct t2.movieid from directors as t1 inner join movies2directors as t2 on t1.directorid = t2.directorid inner join u2base as t3 on t2.movieid = t3.movieid where t1.d_quality = 5 group by t2.movieid having avg(t3.rating) > 3.5 ) as t1 | Question: among the films directed by directors who direct the best, how many of them have an average rating of over 3.5? | Tables: users -> userid, age, u_gender, occupation. directors -> directorid, d_quality, avg_revenue. actors -> actorid, a_gender, a_quality. movies -> movieid, year, isEnglish, country, runningtim... | among the films directed by directors who direct the best, how many of them have an average rating of over 3.5? |
movielens | select t1.movieid from movies2directors as t1 inner join u2base as t2 on t1.movieid = t2.movieid where t1.genre = 'adventure' group by t1.movieid order by avg(t2.rating) desc limit 1 | Question: which adventure movie has the highest average rating? | Tables: users -> userid, age, u_gender, occupation. directors -> directorid, d_quality, avg_revenue. actors -> actorid, a_gender, a_quality. movies -> movieid, year, isEnglish, country, runningtime. movies2actors -> movieid, actorid, cast_num. movies2dir... | which adventure movie has the highest average rating? |
movielens | select count(t1.userid) from users as t1 inner join u2base as t2 on t1.userid = t2.userid where t2.userid = 2462959 and t1.u_gender = 'f' | Question: how many of the users who rate the movie with the id '2462959' are female? | Tables: users -> userid, age, u_gender, occupation. directors -> directorid, d_quality, avg_revenue. actors -> actorid, a_gender, a_quality. movies -> movieid, year, isEnglish, country, runningtime. movies2actors -> movieid, actorid,... | how many of the users who rate the movie with the id '2462959' are female? |
movielens | select distinct t1.movieid from movies as t1 inner join u2base as t2 on t1.movieid = t2.movieid where t1.runningtime = 0 and t2.rating = ( select max(rating) from u2base ) | Question: what is the most distinct rated movie with a running time of 0? | Tables: users -> userid, age, u_gender, occupation. directors -> directorid, d_quality, avg_revenue. actors -> actorid, a_gender, a_quality. movies -> movieid, year, isEnglish, country, runningtime. movies2actors -> movieid, actorid, cast_num. ... | what is the most distinct rated movie with a running time of 0? |
movielens | select t1.actorid, t1.a_quality from actors as t1 inner join movies2actors as t2 on t1.actorid = t2.actorid where t2.movieid = 1722327 | Question: list the ids and ratings of each actors played in the movie with the id 1722327? | Tables: users -> userid, age, u_gender, occupation. directors -> directorid, d_quality, avg_revenue. actors -> actorid, a_gender, a_quality. movies -> movieid, year, isEnglish, country, runningtime. movies2actors -> movieid, ac... | list the ids and ratings of each actors played in the movie with the id 1722327? |
movielens | select t1.directorid from directors as t1 inner join movies2directors as t2 on t1.directorid = t2.directorid where t1.d_quality = 5 group by t1.directorid order by count(t2.movieid) desc limit 1 | Question: which directors with the best quality directed the most films? | Tables: users -> userid, age, u_gender, occupation. directors -> directorid, d_quality, avg_revenue. actors -> actorid, a_gender, a_quality. movies -> movieid, year, isEnglish, country, runningtime. movies2actors -> movieid, actorid, cast_num. m... | which directors with the best quality directed the most films? |
movielens | select count(distinct t2.movieid) from u2base as t1 inner join movies2directors as t2 on t1.movieid = t2.movieid where t2.genre = 'drama' and t1.rating = 3 | Question: how many drama movie with the rating of 3? | Tables: users -> userid, age, u_gender, occupation. directors -> directorid, d_quality, avg_revenue. actors -> actorid, a_gender, a_quality. movies -> movieid, year, isEnglish, country, runningtime. movies2actors -> movieid, actorid, cast_num. movies2directors -> m... | how many drama movie with the rating of 3? |
movielens | select count(t1.movieid) from u2base as t1 inner join users as t2 on t1.userid = t2.userid where t1.rating = 5 and t2.age between 25 and 35 | Question: how many of the movies rated 5 are rated by a user between the ages of 25 and 35? | Tables: users -> userid, age, u_gender, occupation. directors -> directorid, d_quality, avg_revenue. actors -> actorid, a_gender, a_quality. movies -> movieid, year, isEnglish, country, runningtime. movies2actors -> movieid, a... | how many of the movies rated 5 are rated by a user between the ages of 25 and 35? |
movielens | select t1.movieid from u2base as t1 inner join movies2directors as t2 on t1.movieid = t2.movieid where t1.rating = 1 and t2.genre = 'horror' | Question: please list all horror films that have a rating of 1. | Tables: users -> userid, age, u_gender, occupation. directors -> directorid, d_quality, avg_revenue. actors -> actorid, a_gender, a_quality. movies -> movieid, year, isEnglish, country, runningtime. movies2actors -> movieid, actorid, cast_num. movies2dir... | please list all horror films that have a rating of 1. |
movielens | select t2.directorid from movies as t1 inner join movies2directors as t2 on t1.movieid = t2.movieid where t1.country = 'france' | Question: list the ids of all the directors who worked on french films. | Tables: users -> userid, age, u_gender, occupation. directors -> directorid, d_quality, avg_revenue. actors -> actorid, a_gender, a_quality. movies -> movieid, year, isEnglish, country, runningtime. movies2actors -> movieid, actorid, cast_num. mo... | list the ids of all the directors who worked on french films. |
movielens | select t2.userid, t2.age from u2base as t1 inner join users as t2 on t1.userid = t2.userid where t1.movieid = 1695219 | Question: list all of the user ids and ages who rated movies with the id 1695219? | Tables: users -> userid, age, u_gender, occupation. directors -> directorid, d_quality, avg_revenue. actors -> actorid, a_gender, a_quality. movies -> movieid, year, isEnglish, country, runningtime. movies2actors -> movieid, actorid, ca... | list all of the user ids and ages who rated movies with the id 1695219? |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.