db_id stringlengths 4 31 | SQL stringlengths 18 1.45k | input_sequence stringlengths 148 11k | question stringlengths 16 325 |
|---|---|---|---|
sales_in_weather | select min(dewpoint) from weather | Question: what is the minimum dew point? | Tables: sales_in_weather -> date, store_nbr, item_nbr, units. weather -> station_nbr, date, tmax, tmin, tavg, depart, dewpoint, wetbulb, heat, cool, sunrise, sunset, codesum, snowfall, preciptotal, stnpressure, sealevel, resultspeed, resultdir, avgspeed. relation -> store_nbr,... | what is the minimum dew point? |
sales_in_weather | select tmax, tmin from weather where station_nbr = 1 and `date` = '2012-01-15' | Question: what is the maximum and minimum temperature for station number 1 on 15 january 2012? | Tables: sales_in_weather -> date, store_nbr, item_nbr, units. weather -> station_nbr, date, tmax, tmin, tavg, depart, dewpoint, wetbulb, heat, cool, sunrise, sunset, codesum, snowfall, preciptotal, stnpressure, sealevel, re... | what is the maximum and minimum temperature for station number 1 on 15 january 2012? |
sales_in_weather | select count(distinct t2.station_nbr) as number from sales_in_weather as t1 inner join relation as t2 on t1.store_nbr = t2.store_nbr where substr(`date`, 1, 7) = '2014-01' and item_nbr = 5 | Question: how many stations were able to sell item 5 on january 2014? | Tables: sales_in_weather -> date, store_nbr, item_nbr, units. weather -> station_nbr, date, tmax, tmin, tavg, depart, dewpoint, wetbulb, heat, cool, sunrise, sunset, codesum, snowfall, preciptotal, stnpressure, sealevel, resultspeed, resultdir, avg... | how many stations were able to sell item 5 on january 2014? |
sales_in_weather | select min(tmin) from weather as t1 inner join relation as t2 on t1.station_nbr = t2.station_nbr where t2.store_nbr = 16 and t1.`date` like '%2012-01%' | Question: what is the lowest minimum temperature recorded in store 16 on january 2012? | Tables: sales_in_weather -> date, store_nbr, item_nbr, units. weather -> station_nbr, date, tmax, tmin, tavg, depart, dewpoint, wetbulb, heat, cool, sunrise, sunset, codesum, snowfall, preciptotal, stnpressure, sealevel, resultspee... | what is the lowest minimum temperature recorded in store 16 on january 2012? |
sales_in_weather | select sum(units) from weather as t1 inner join relation as t2 on t1.station_nbr = t2.station_nbr inner join sales_in_weather as t3 on t2.store_nbr = t3.store_nbr where t2.store_nbr = 7 and t3.item_nbr = 7 and t1.snowfall < 5 | Question: how many units of item 7 have been sold by store 7 when the snow is less than 5 inches? | Tables: sales_in_weather -> date, store_nbr, item_nbr, units. weather -> station_nbr, date, tmax, tmin, tavg, depart, dewpoint, wetbulb, heat, cool, sunrise, sunset, codesum, snowfall, preciptotal, stnpressure, sealevel,... | how many units of item 7 have been sold by store 7 when the snow is less than 5 inches? |
sales_in_weather | select count(distinct item_nbr) from weather as t1 inner join relation as t2 on t1.station_nbr = t2.station_nbr inner join sales_in_weather as t3 on t2.store_nbr = t3.store_nbr where t3.store_nbr = 9 and t1.snowfall <> 0 and t1.snowfall is not null | Question: how many items were sold by store 9 during a snowy day? | Tables: sales_in_weather -> date, store_nbr, item_nbr, units. weather -> station_nbr, date, tmax, tmin, tavg, depart, dewpoint, wetbulb, heat, cool, sunrise, sunset, codesum, snowfall, preciptotal, stnpressure, sealevel, resultspeed, resultdir, avgspee... | how many items were sold by store 9 during a snowy day? |
sales_in_weather | select t1.station_nbr, t2.item_nbr from relation as t1 inner join sales_in_weather as t2 on t1.store_nbr = t2.store_nbr where t1.store_nbr = 17 group by t1.station_nbr, t2.item_nbr | Question: list out stations number and items sold by store 17. | Tables: sales_in_weather -> date, store_nbr, item_nbr, units. weather -> station_nbr, date, tmax, tmin, tavg, depart, dewpoint, wetbulb, heat, cool, sunrise, sunset, codesum, snowfall, preciptotal, stnpressure, sealevel, resultspeed, resultdir, avgspeed. ... | list out stations number and items sold by store 17. |
sales_in_weather | select t1.`date` from weather as t1 inner join relation as t2 on t1.station_nbr = t2.station_nbr where t2.store_nbr = 35 and t1.codesum like '%' or 'hz' or '%' | Question: list out dates when haze is recorded in store 35. | Tables: sales_in_weather -> date, store_nbr, item_nbr, units. weather -> station_nbr, date, tmax, tmin, tavg, depart, dewpoint, wetbulb, heat, cool, sunrise, sunset, codesum, snowfall, preciptotal, stnpressure, sealevel, resultspeed, resultdir, avgspeed. rel... | list out dates when haze is recorded in store 35. |
sales_in_weather | select t1.sealevel, t1.avgspeed from weather as t1 inner join relation as t2 on t1.station_nbr = t2.station_nbr where t2.store_nbr = 3 or t2.store_nbr = 4 | Question: what is the sea level and average speed for store number 3 and store number 4? | Tables: sales_in_weather -> date, store_nbr, item_nbr, units. weather -> station_nbr, date, tmax, tmin, tavg, depart, dewpoint, wetbulb, heat, cool, sunrise, sunset, codesum, snowfall, preciptotal, stnpressure, sealevel, resultsp... | what is the sea level and average speed for store number 3 and store number 4? |
sales_in_weather | select t2.item_nbr from weather as t1 inner join sales_in_weather as t2 on t1.`date` = t2.`date` inner join relation as t3 on t2.store_nbr = t3.store_nbr and t1.station_nbr = t3.station_nbr where t2.store_nbr = 1 and t1.codesum like '%' or 'ra' or '%' group by t2.item_nbr order by t2.units desc limit 1 | Question: which items from store 1 have the highest units sold during rainy day? | Tables: sales_in_weather -> date, store_nbr, item_nbr, units. weather -> station_nbr, date, tmax, tmin, tavg, depart, dewpoint, wetbulb, heat, cool, sunrise, sunset, codesum, snowfall, preciptotal, stnpressure, sealevel, resultspeed, res... | which items from store 1 have the highest units sold during rainy day? |
sales_in_weather | select cast((max(t1.tmax) - min(t1.tmin)) as real) / min(t1.tmin) from weather as t1 inner join relation as t2 on t1.station_nbr = t2.station_nbr where t2.store_nbr = 11 | Question: what is the ratio of the highest and lowest temperature in store 11? | Tables: sales_in_weather -> date, store_nbr, item_nbr, units. weather -> station_nbr, date, tmax, tmin, tavg, depart, dewpoint, wetbulb, heat, cool, sunrise, sunset, codesum, snowfall, preciptotal, stnpressure, sealevel, resultspeed, resul... | what is the ratio of the highest and lowest temperature in store 11? |
sales_in_weather | select sum(case when t1.station_nbr = 1 then units else 0 end) - sum(case when t1.station_nbr = 2 then units else 0 end) from relation as t1 inner join sales_in_weather as t2 on t1.store_nbr = t2.store_nbr where t2.`date` like '%2012%' | Question: what was the difference of number of units sold in station number 1 and number 2 on year 2012? | Tables: sales_in_weather -> date, store_nbr, item_nbr, units. weather -> station_nbr, date, tmax, tmin, tavg, depart, dewpoint, wetbulb, heat, cool, sunrise, sunset, codesum, snowfall, preciptotal, stnpressure, se... | what was the difference of number of units sold in station number 1 and number 2 on year 2012? |
sales_in_weather | select sum(case when t1.store_nbr = 18 then t2.tavg else 0 end) - sum(case when t1.store_nbr = 19 then t2.tavg else 0 end) from relation as t1 inner join weather as t2 on t1.station_nbr = t2.station_nbr where t2.`date` = '2012-09-16' | Question: what was the average temperature difference between store number 18 and 19 on 16 september 2022? | Tables: sales_in_weather -> date, store_nbr, item_nbr, units. weather -> station_nbr, date, tmax, tmin, tavg, depart, dewpoint, wetbulb, heat, cool, sunrise, sunset, codesum, snowfall, preciptotal, stnpressure, ... | what was the average temperature difference between store number 18 and 19 on 16 september 2022? |
sales_in_weather | select sum(units) from weather as t1 inner join sales_in_weather as t2 on t1.`date` = t2.`date` inner join relation as t3 on t2.store_nbr = t3.store_nbr where t2.item_nbr = 1 and t1.tavg = 83 | Question: how many units are being sold for item 1 when the average temperature is 83? | Tables: sales_in_weather -> date, store_nbr, item_nbr, units. weather -> station_nbr, date, tmax, tmin, tavg, depart, dewpoint, wetbulb, heat, cool, sunrise, sunset, codesum, snowfall, preciptotal, stnpressure, sealevel, resultspee... | how many units are being sold for item 1 when the average temperature is 83? |
sales_in_weather | select ( select sum(t2.units) as sumunit from weather as t1 inner join sales_in_weather as t2 on t1.`date` = t2.`date` inner join relation as t3 on t2.store_nbr = t3.store_nbr where t2.item_nbr = 5 and sunset is not null group by t1.sunset order by t1.sunset limit 1 ) - ( select sum(t2.units) as sumunit from weather as... | Question: what is the difference between the units sold for item 1 when the sunset was the earliest and the latest? | Tables: sales_in_weather -> date, store_nbr, item_nbr, units. weather -> station_nbr, date, tmax, tmin, tavg, depart, dewpoint, wetbulb, heat, cool, sunrise, sunset, codesum, snowfall, preciptotal, stnp... | what is the difference between the units sold for item 1 when the sunset was the earliest and the latest? |
sales_in_weather | select sum(t5.units) from weather as t4 inner join sales_in_weather as t5 on t4.`date` = t5.`date` inner join relation as t6 on t5.store_nbr = t6.store_nbr where t5.item_nbr = 10 and t4.tavg < ( select avg(t1.tavg) from weather as t1 inner join sales_in_weather as t2 on t1.`date` = t2.`date` inner join relation as t3 o... | Question: what was the total unit sold for item 10 when the average temperature was below the median temperature? | Tables: sales_in_weather -> date, store_nbr, item_nbr, units. weather -> station_nbr, date, tmax, tmin, tavg, depart, dewpoint, wetbulb, heat, cool, sunrise, sunset, codesum, snowfall, preciptotal, stnpre... | what was the total unit sold for item 10 when the average temperature was below the median temperature? |
sales_in_weather | select ( select cast(sum(tavg) as real) / count(`date`) from weather as t1 inner join relation as t2 on t1.station_nbr = t2.station_nbr and t1.`date` like '%2012-05%' and t2.store_nbr = 6 ) - ( select cast(sum(tavg) as real) / count(`date`) from weather as t1 inner join relation as t2 on t1.station_nbr = t2.station_nbr... | Question: what was the average temperature differences during may 2012 for store number 6 and 7? | Tables: sales_in_weather -> date, store_nbr, item_nbr, units. weather -> station_nbr, date, tmax, tmin, tavg, depart, dewpoint, wetbulb, heat, cool, sunrise, sunset, codesum, snowfall, preciptotal, stnpressure, sealevel, ... | what was the average temperature differences during may 2012 for store number 6 and 7? |
mondial_geo | select t2.name from ethnicgroup as t1 inner join country as t2 on t1.country = t2.code where t1.name = 'polish' group by t2.name, t1.percentage order by t1.percentage asc limit 1 | Question: in which country does polish found least in? | Tables: borders -> Country1, Country2, Length. city -> Name, Country, Province, Population, Longitude, Latitude. continent -> Name, Area. country -> Name, Code, Capital, Province, Area, Population. desert -> Name, Area, Longitude, Latitude. economy -> Country, GD... | in which country does polish found least in? |
mondial_geo | select t2.name from ethnicgroup as t1 inner join country as t2 on t1.country = t2.code where t1.name = 'african' and t1.percentage > 90 | Question: which countries have more than 90% of african? list the name of the country in full. | Tables: borders -> Country1, Country2, Length. city -> Name, Country, Province, Population, Longitude, Latitude. continent -> Name, Area. country -> Name, Code, Capital, Province, Area, Population. desert -> Name, Area, Lon... | which countries have more than 90% of african? list the name of the country in full. |
mondial_geo | select t1.name, t1.percentage from ethnicgroup as t1 inner join country as t2 on t1.country = t2.code where t2.name = 'singapore' group by t1.name, t1.percentage | Question: state the different ethnic group and percentage of the language in singapore. | Tables: borders -> Country1, Country2, Length. city -> Name, Country, Province, Population, Longitude, Latitude. continent -> Name, Area. country -> Name, Code, Capital, Province, Area, Population. desert -> Name, Area, Longitude,... | state the different ethnic group and percentage of the language in singapore. |
mondial_geo | select cast(sum(case when government = 'republic' then 1 else 0 end) as real) * 100 / count(country) from politics where strftime('%y', independence) > '1970' | Question: calculate the percentage of country which gained independence as republic after 1970. | Tables: borders -> Country1, Country2, Length. city -> Name, Country, Province, Population, Longitude, Latitude. continent -> Name, Area. country -> Name, Code, Capital, Province, Area, Population. desert -> Name, Area, Lo... | calculate the percentage of country which gained independence as republic after 1970. |
mondial_geo | select t1.gdp, t2.government from economy as t1 inner join politics as t2 on t1.country = t2.country inner join country as t3 on t3.code = t2.country where t3.name = 'bosnia and herzegovina' | Question: find the gpd for bosnia and herzegovina and the type of government it belongs to. | Tables: borders -> Country1, Country2, Length. city -> Name, Country, Province, Population, Longitude, Latitude. continent -> Name, Area. country -> Name, Code, Capital, Province, Area, Population. desert -> Name, Area, Longit... | find the gpd for bosnia and herzegovina and the type of government it belongs to. |
mondial_geo | select t1.name, t1.population from country as t1 inner join population as t2 on t1.code = t2.country where t2.population_growth > 2 and t2.infant_mortality < 5 | Question: state the country and its population with population growth greater than 2% but infant mortality rate less than 5%. | Tables: borders -> Country1, Country2, Length. city -> Name, Country, Province, Population, Longitude, Latitude. continent -> Name, Area. country -> Name, Code, Capital, Province, Area, Popula... | state the country and its population with population growth greater than 2% but infant mortality rate less than 5%. |
mondial_geo | select t2.name from country as t1 inner join ethnicgroup as t2 on t1.code = t2.country where t1.population > 10000000 group by t2.name, t2.percentage order by t2.percentage desc limit 2 | Question: which is the majority of the ethnic group in country with great than 10,000,000 population | Tables: borders -> Country1, Country2, Length. city -> Name, Country, Province, Population, Longitude, Latitude. continent -> Name, Area. country -> Name, Code, Capital, Province, Area, Population. desert -> Name, Are... | which is the majority of the ethnic group in country with great than 10,000,000 population |
mondial_geo | select t1.name, t2.name, t2.percentage from country as t1 inner join ethnicgroup as t2 on t1.code = t2.country where t1.name = ( select t1.name from country as t1 inner join ethnicgroup as t2 on t1.code = t2.country group by t1.name order by count(t2.name) desc limit 1 ) group by t1.name, t2.name, t2.percentage | Question: provide the country with its full name which has the most ethnic group? list them all ethnic group together with its percentage. | Tables: borders -> Country1, Country2, Length. city -> Name, Country, Province, Population, Longitude, Latitude. continent -> Name, Area. country -> Name, Code, Capital, Province,... | provide the country with its full name which has the most ethnic group? list them all ethnic group together with its percentage. |
mondial_geo | select t1.name from ethnicgroup as t1 inner join country as t2 on t1.country = t2.code where t1.percentage = 100 and t1.name = 'african' | Question: what is the full name of the country with 100% africans? | Tables: borders -> Country1, Country2, Length. city -> Name, Country, Province, Population, Longitude, Latitude. continent -> Name, Area. country -> Name, Code, Capital, Province, Area, Population. desert -> Name, Area, Longitude, Latitude. economy ->... | what is the full name of the country with 100% africans? |
mondial_geo | select t1.infant_mortality from population as t1 inner join ethnicgroup as t2 on t1.country = t2.country where t2.name = 'amerindian' order by t2.percentage asc limit 1 | Question: list the infant mortality of country with the least amerindian. | Tables: borders -> Country1, Country2, Length. city -> Name, Country, Province, Population, Longitude, Latitude. continent -> Name, Area. country -> Name, Code, Capital, Province, Area, Population. desert -> Name, Area, Longitude, Latitude. eco... | list the infant mortality of country with the least amerindian. |
mondial_geo | select t2.agriculture from country as t1 inner join economy as t2 on t1.code = t2.country where t1.area > 600000 and t2.agriculture is not null | Question: for country with area greater than 600000, what is agriculture percentage of gdp the country contributes? | Tables: borders -> Country1, Country2, Length. city -> Name, Country, Province, Population, Longitude, Latitude. continent -> Name, Area. country -> Name, Code, Capital, Province, Area, Population. dese... | for country with area greater than 600000, what is agriculture percentage of gdp the country contributes? |
mondial_geo | select t2.country from population as t1 inner join politics as t2 on t1.country = t2.country where t2.government = 'republic' order by t1.population_growth desc limit 1 | Question: provide the country with republic government which has the highest population growth? | Tables: borders -> Country1, Country2, Length. city -> Name, Country, Province, Population, Longitude, Latitude. continent -> Name, Area. country -> Name, Code, Capital, Province, Area, Population. desert -> Name, Area, Lo... | provide the country with republic government which has the highest population growth? |
mondial_geo | select t2.independence from country as t1 inner join politics as t2 on t1.code = t2.country where t1.name = 'bulgaria' | Question: when did 'bulgaria' gain independence? | Tables: borders -> Country1, Country2, Length. city -> Name, Country, Province, Population, Longitude, Latitude. continent -> Name, Area. country -> Name, Code, Capital, Province, Area, Population. desert -> Name, Area, Longitude, Latitude. economy -> Country, GDP, Agr... | when did 'bulgaria' gain independence? |
mondial_geo | select t2.percentage * t1.population from country as t1 inner join ethnicgroup as t2 on t1.code = t2.country where t2.name = 'arab' | Question: calculate the population of arab in each country? | Tables: borders -> Country1, Country2, Length. city -> Name, Country, Province, Population, Longitude, Latitude. continent -> Name, Area. country -> Name, Code, Capital, Province, Area, Population. desert -> Name, Area, Longitude, Latitude. economy -> Countr... | calculate the population of arab in each country? |
mondial_geo | select t2.percentage * t1.population from country as t1 inner join ethnicgroup as t2 on t1.code = t2.country where t2.name = 'african' and t1.name = 'turks and caicos islands' | Question: what is the population of african in 'turks and caicos islands'? | Tables: borders -> Country1, Country2, Length. city -> Name, Country, Province, Population, Longitude, Latitude. continent -> Name, Area. country -> Name, Code, Capital, Province, Area, Population. desert -> Name, Area, Longitude, Latitude. ec... | what is the population of african in 'turks and caicos islands'? |
mondial_geo | select t2.population_growth * t1.population from country as t1 inner join population as t2 on t1.code = t2.country where t2.infant_mortality is not null order by t2.infant_mortality asc limit 1 | Question: what is the number of growth population for country with the lowest infant mortality? | Tables: borders -> Country1, Country2, Length. city -> Name, Country, Province, Population, Longitude, Latitude. continent -> Name, Area. country -> Name, Code, Capital, Province, Area, Population. desert -> Name, Area, Lo... | what is the number of growth population for country with the lowest infant mortality? |
mondial_geo | select t1.capital, t1.population from country as t1 inner join economy as t2 on t1.code = t2.country where t2.gdp > 400000 | Question: among countries with more than 400,000 gdp, state its capital and population. | Tables: borders -> Country1, Country2, Length. city -> Name, Country, Province, Population, Longitude, Latitude. continent -> Name, Area. country -> Name, Code, Capital, Province, Area, Population. desert -> Name, Area, Longitude,... | among countries with more than 400,000 gdp, state its capital and population. |
mondial_geo | select t2.service * t2.gdp from country as t1 inner join economy as t2 on t1.code = t2.country where t1.name = 'brazil' | Question: calculate the service of gdp for brazil. | Tables: borders -> Country1, Country2, Length. city -> Name, Country, Province, Population, Longitude, Latitude. continent -> Name, Area. country -> Name, Code, Capital, Province, Area, Population. desert -> Name, Area, Longitude, Latitude. economy -> Country, GDP, A... | calculate the service of gdp for brazil. |
mondial_geo | select t1.name, t2.population_growth from country as t1 inner join population as t2 on t1.code = t2.country order by t2.infant_mortality desc limit 1 | Question: which country has the highest infant mortality? also state its population growth. | Tables: borders -> Country1, Country2, Length. city -> Name, Country, Province, Population, Longitude, Latitude. continent -> Name, Area. country -> Name, Code, Capital, Province, Area, Population. desert -> Name, Area, Longit... | which country has the highest infant mortality? also state its population growth. |
mondial_geo | select t1.name, t1.population, t2.population_growth from country as t1 inner join population as t2 on t1.code = t2.country where t2.population_growth < 0 | Question: list all countries with negative growth in population. state the country, population and growth. | Tables: borders -> Country1, Country2, Length. city -> Name, Country, Province, Population, Longitude, Latitude. continent -> Name, Area. country -> Name, Code, Capital, Province, Area, Population. desert -> Nam... | list all countries with negative growth in population. state the country, population and growth. |
mondial_geo | select t1.name, t2.infant_mortality from country as t1 inner join population as t2 on t1.code = t2.country where t1.area between 500000 and 1000000 | Question: for countries with area between 500000 to 1000000, state the country and infant mortality rate. | Tables: borders -> Country1, Country2, Length. city -> Name, Country, Province, Population, Longitude, Latitude. continent -> Name, Area. country -> Name, Code, Capital, Province, Area, Population. desert -> Name... | for countries with area between 500000 to 1000000, state the country and infant mortality rate. |
mondial_geo | select t1.name, t3.gdp from country as t1 inner join population as t2 on t1.code = t2.country inner join economy as t3 on t3.country = t2.country where t2.population_growth > 3 | Question: among the countries with more than 3% population growth rate, state the country name in full along with its gdp. | Tables: borders -> Country1, Country2, Length. city -> Name, Country, Province, Population, Longitude, Latitude. continent -> Name, Area. country -> Name, Code, Capital, Province, Area, Populatio... | among the countries with more than 3% population growth rate, state the country name in full along with its gdp. |
mondial_geo | select t2.infant_mortality from country as t1 inner join population as t2 on t1.code = t2.country where t1.name = 'ethiopia' | Question: what is the infant mortality rate for ethiopia? | Tables: borders -> Country1, Country2, Length. city -> Name, Country, Province, Population, Longitude, Latitude. continent -> Name, Area. country -> Name, Code, Capital, Province, Area, Population. desert -> Name, Area, Longitude, Latitude. economy -> Country,... | what is the infant mortality rate for ethiopia? |
mondial_geo | select t2.gdp * t2.industry from country as t1 inner join economy as t2 on t1.code = t2.country where t1.name = 'singapore' | Question: how much does the gross domestic products goes to the industry sector for singapore? | Tables: borders -> Country1, Country2, Length. city -> Name, Country, Province, Population, Longitude, Latitude. continent -> Name, Area. country -> Name, Code, Capital, Province, Area, Population. desert -> Name, Area, Lon... | how much does the gross domestic products goes to the industry sector for singapore? |
mondial_geo | select t2.gdp * t2.agriculture from country as t1 inner join economy as t2 on t1.code = t2.country order by t1.area asc limit 1 | Question: how much is her gdp in agriculture for the country with the least area? | Tables: borders -> Country1, Country2, Length. city -> Name, Country, Province, Population, Longitude, Latitude. continent -> Name, Area. country -> Name, Code, Capital, Province, Area, Population. desert -> Name, Area, Longitude, Latit... | how much is her gdp in agriculture for the country with the least area? |
mondial_geo | select t1.name from country as t1 inner join ethnicgroup as t2 on t1.code = t2.country where t2.name = 'albanian' order by t2.percentage desc limit 1 | Question: which country has the biggest percentage of the albanian ethnic group? | Tables: borders -> Country1, Country2, Length. city -> Name, Country, Province, Population, Longitude, Latitude. continent -> Name, Area. country -> Name, Code, Capital, Province, Area, Population. desert -> Name, Area, Longitude, Latitu... | which country has the biggest percentage of the albanian ethnic group? |
mondial_geo | select count(t1.name) from country as t1 inner join ethnicgroup as t2 on t1.code = t2.country where t2.name = 'african' and t1.area > 10000000 | Question: among the countries with the african ethnic group, how many of them has a population of over 10000000? | Tables: borders -> Country1, Country2, Length. city -> Name, Country, Province, Population, Longitude, Latitude. continent -> Name, Area. country -> Name, Code, Capital, Province, Area, Population. desert ... | among the countries with the african ethnic group, how many of them has a population of over 10000000? |
mondial_geo | select t1.name from country as t1 inner join ethnicgroup as t2 on t1.code = t2.country group by t1.name having count(t1.name) > 5 | Question: please list the name of the countries with over 5 ethnic groups. | Tables: borders -> Country1, Country2, Length. city -> Name, Country, Province, Population, Longitude, Latitude. continent -> Name, Area. country -> Name, Code, Capital, Province, Area, Population. desert -> Name, Area, Longitude, Latitude. ec... | please list the name of the countries with over 5 ethnic groups. |
mondial_geo | select t1.name from country as t1 inner join economy as t2 on t1.code = t2.country order by t2.gdp desc limit 1 | Question: which country has the highest gdp? | Tables: borders -> Country1, Country2, Length. city -> Name, Country, Province, Population, Longitude, Latitude. continent -> Name, Area. country -> Name, Code, Capital, Province, Area, Population. desert -> Name, Area, Longitude, Latitude. economy -> Country, GDP, Agricul... | which country has the highest gdp? |
mondial_geo | select count(t1.name) from country as t1 inner join economy as t2 on t1.code = t2.country where t2.gdp > 500000 and t1.population > 10000000 | Question: among the countries with a population of over 10000000, how many of them have a gdp of over 500000? | Tables: borders -> Country1, Country2, Length. city -> Name, Country, Province, Population, Longitude, Latitude. continent -> Name, Area. country -> Name, Code, Capital, Province, Area, Population. desert -> ... | among the countries with a population of over 10000000, how many of them have a gdp of over 500000? |
mondial_geo | select t1.capital from country as t1 inner join economy as t2 on t1.code = t2.country where t2.inflation < 2 | Question: please list the capital cities of the countries with an inflation rate under 2. | Tables: borders -> Country1, Country2, Length. city -> Name, Country, Province, Population, Longitude, Latitude. continent -> Name, Area. country -> Name, Code, Capital, Province, Area, Population. desert -> Name, Area, Longitud... | please list the capital cities of the countries with an inflation rate under 2. |
mondial_geo | select t1.name from country as t1 inner join economy as t2 on t1.code = t2.country where t2.inflation is not null order by t2.inflation asc limit 1 | Question: which country has the lowest inflation rate? | Tables: borders -> Country1, Country2, Length. city -> Name, Country, Province, Population, Longitude, Latitude. continent -> Name, Area. country -> Name, Code, Capital, Province, Area, Population. desert -> Name, Area, Longitude, Latitude. economy -> Country, GD... | which country has the lowest inflation rate? |
mondial_geo | select count(t1.name) from country as t1 inner join economy as t2 on t1.code = t2.country where t2.agriculture < 50 and t1.area > 8000000 | Question: among the countries whose agriculture percentage of the gdp is under 50%, how many of them have an area of over 8000000? | Tables: borders -> Country1, Country2, Length. city -> Name, Country, Province, Population, Longitude, Latitude. continent -> Name, Area. country -> Name, Code, Capital, Province, Area, P... | among the countries whose agriculture percentage of the gdp is under 50%, how many of them have an area of over 8000000? |
mondial_geo | select count(t1.city) from located as t1 inner join lake as t2 on t1.lake = t2.name where t2.type = 'salt' | Question: how many cities have a salt lake located in it? | Tables: borders -> Country1, Country2, Length. city -> Name, Country, Province, Population, Longitude, Latitude. continent -> Name, Area. country -> Name, Code, Capital, Province, Area, Population. desert -> Name, Area, Longitude, Latitude. economy -> Country,... | how many cities have a salt lake located in it? |
mondial_geo | select t2.depth from located as t1 inner join lake as t2 on t1.lake = t2.name where t1.province = 'albania' | Question: please list the depth of the lakes that are located in the province of albania. | Tables: borders -> Country1, Country2, Length. city -> Name, Country, Province, Population, Longitude, Latitude. continent -> Name, Area. country -> Name, Code, Capital, Province, Area, Population. desert -> Name, Area, Longitud... | please list the depth of the lakes that are located in the province of albania. |
mondial_geo | select t2.city from lake as t1 left join located as t2 on t2.lake = t1.name order by t1.altitude desc limit 1 | Question: the lake with the highest altitude is located in which city? | Tables: borders -> Country1, Country2, Length. city -> Name, Country, Province, Population, Longitude, Latitude. continent -> Name, Area. country -> Name, Code, Capital, Province, Area, Population. desert -> Name, Area, Longitude, Latitude. econom... | the lake with the highest altitude is located in which city? |
mondial_geo | select count(t2.name) from located as t1 inner join lake as t2 on t1.lake = t2.name where t1.province = 'canary islands' and t2.area > 1000000 | Question: how many lakes in the canary islands cover an area of over 1000000? | Tables: borders -> Country1, Country2, Length. city -> Name, Country, Province, Population, Longitude, Latitude. continent -> Name, Area. country -> Name, Code, Capital, Province, Area, Population. desert -> Name, Area, Longitude, Latitude.... | how many lakes in the canary islands cover an area of over 1000000? |
mondial_geo | select t1.name from country as t1 inner join language as t2 on t1.code = t2.country group by t1.name order by count(t2.name) desc limit 1 | Question: which country has the most languages spoken? | Tables: borders -> Country1, Country2, Length. city -> Name, Country, Province, Population, Longitude, Latitude. continent -> Name, Area. country -> Name, Code, Capital, Province, Area, Population. desert -> Name, Area, Longitude, Latitude. economy -> Country, GD... | which country has the most languages spoken? |
mondial_geo | select t1.capital from country as t1 inner join language as t2 on t1.code = t2.country where t2.name = 'armenian' and t2.percentage > 90 | Question: what is the capital city of the country that has the percentage of armenian speakers over 90%? | Tables: borders -> Country1, Country2, Length. city -> Name, Country, Province, Population, Longitude, Latitude. continent -> Name, Area. country -> Name, Code, Capital, Province, Area, Population. desert -> Name,... | what is the capital city of the country that has the percentage of armenian speakers over 90%? |
mondial_geo | select t2.country from country as t1 inner join language as t2 on t1.code = t2.country where t1.population < 1000000 group by t2.country having count(t1.name) > 2 | Question: among the countries with a population of under 1000000, how many of them have over 2 languages? | Tables: borders -> Country1, Country2, Length. city -> Name, Country, Province, Population, Longitude, Latitude. continent -> Name, Area. country -> Name, Code, Capital, Province, Area, Population. desert -> Name... | among the countries with a population of under 1000000, how many of them have over 2 languages? |
mondial_geo | select count(t2.name) from country as t1 inner join organization as t2 on t1.code = t2.country where t1.population < 1000000 | Question: how many organizations are founded in countries with a population of under 1000000? | Tables: borders -> Country1, Country2, Length. city -> Name, Country, Province, Population, Longitude, Latitude. continent -> Name, Area. country -> Name, Code, Capital, Province, Area, Population. desert -> Name, Area, Long... | how many organizations are founded in countries with a population of under 1000000? |
mondial_geo | select t1.country, count(t1.country) from economy as t1 inner join organization as t2 on t1.country = t2.country where t1.gdp < 500000 and strftime('%y', t2.established) < '1999' group by t1.country | Question: how many organizations are established after 1999/1/1 in a country whose gdp is under 500000? | Tables: borders -> Country1, Country2, Length. city -> Name, Country, Province, Population, Longitude, Latitude. continent -> Name, Area. country -> Name, Code, Capital, Province, Area, Population. desert -> Name, ... | how many organizations are established after 1999/1/1 in a country whose gdp is under 500000? |
mondial_geo | select count(t2.country) from economy as t1 inner join organization as t2 on t1.country = t2.country where t2.country in ( select country from organization group by country having count(country) > 3 ) and t1.inflation > 5 | Question: among the countries with over 3 organizations, how many of them have an inflation rate of over 5%? | Tables: borders -> Country1, Country2, Length. city -> Name, Country, Province, Population, Longitude, Latitude. continent -> Name, Area. country -> Name, Code, Capital, Province, Area, Population. desert -> N... | among the countries with over 3 organizations, how many of them have an inflation rate of over 5%? |
mondial_geo | select count(t2.province) from country as t1 inner join organization as t2 on t1.code = t2.country inner join ethnicgroup as t3 on t3.country = t2.country group by t1.name order by count(t3.name) desc limit 1 | Question: how many organizations are established in the country with the most ethnic groups? | Tables: borders -> Country1, Country2, Length. city -> Name, Country, Province, Population, Longitude, Latitude. continent -> Name, Area. country -> Name, Code, Capital, Province, Area, Population. desert -> Name, Area, Longi... | how many organizations are established in the country with the most ethnic groups? |
mondial_geo | select t2.name from language as t1 inner join organization as t2 on t1.country = t2.country where t1.name = 'dutch' | Question: please list the organization names established in the countries where dutch is spoken. | Tables: borders -> Country1, Country2, Length. city -> Name, Country, Province, Population, Longitude, Latitude. continent -> Name, Area. country -> Name, Code, Capital, Province, Area, Population. desert -> Name, Area, L... | please list the organization names established in the countries where dutch is spoken. |
mondial_geo | select count(t2.name) from language as t1 inner join organization as t2 on t1.country = t2.country where t1.name = 'bosnian' | Question: how many organizations are established in countries where people speak bosnian? | Tables: borders -> Country1, Country2, Length. city -> Name, Country, Province, Population, Longitude, Latitude. continent -> Name, Area. country -> Name, Code, Capital, Province, Area, Population. desert -> Name, Area, Longitud... | how many organizations are established in countries where people speak bosnian? |
mondial_geo | select max(t2.infant_mortality) from economy as t1 inner join population as t2 on t1.country = t2.country where t1.inflation < 3 | Question: what is the highest infant mortality rate per thousand of the countries whose inflation is under 3? | Tables: borders -> Country1, Country2, Length. city -> Name, Country, Province, Population, Longitude, Latitude. continent -> Name, Area. country -> Name, Code, Capital, Province, Area, Population. desert -> ... | what is the highest infant mortality rate per thousand of the countries whose inflation is under 3? |
mondial_geo | select count(t1.country) from economy as t1 inner join population as t2 on t1.country = t2.country where t1.gdp > 1000000 and t2.population_growth > 3 | Question: among the countries whose gdp is over 1000000, how many of them have a population groth rate of over 3%? | Tables: borders -> Country1, Country2, Length. city -> Name, Country, Province, Population, Longitude, Latitude. continent -> Name, Area. country -> Name, Code, Capital, Province, Area, Population. deser... | among the countries whose gdp is over 1000000, how many of them have a population groth rate of over 3%? |
mondial_geo | select t1.name from country as t1 inner join economy as t2 on t1.code = t2.country order by t2.gdp / t1.population desc limit 1 | Question: which country has the highest gdp per capita? | Tables: borders -> Country1, Country2, Length. city -> Name, Country, Province, Population, Longitude, Latitude. continent -> Name, Area. country -> Name, Code, Capital, Province, Area, Population. desert -> Name, Area, Longitude, Latitude. economy -> Country, G... | which country has the highest gdp per capita? |
mondial_geo | select t2.area * 100 / t3.area from located as t1 inner join lake as t2 on t1.lake = t2.name inner join country as t3 on t3.code = t1.country order by t2.longitude desc limit 1 | Question: what is the highest lake area coverage of a country? | Tables: borders -> Country1, Country2, Length. city -> Name, Country, Province, Population, Longitude, Latitude. continent -> Name, Area. country -> Name, Code, Capital, Province, Area, Population. desert -> Name, Area, Longitude, Latitude. economy -> Cou... | what is the highest lake area coverage of a country? |
mondial_geo | select sum(t3.population_growth) / count(t3.country) from country as t1 inner join language as t2 on t1.code = t2.country inner join population as t3 on t3.country = t2.country where t2.country in ( select country from language group by country having count(country) > 3 ) group by t3.country | Question: what is the average population growth rate of countries where more than 3 languages are used? | Tables: borders -> Country1, Country2, Length. city -> Name, Country, Province, Population, Longitude, Latitude. continent -> Name, Area. country -> Name, Code, Capital, Province, Area, Population. desert -> Name, ... | what is the average population growth rate of countries where more than 3 languages are used? |
mondial_geo | select t1.name from country as t1 inner join economy as t2 on t1.code = t2.country group by t1.name, t2.inflation having t2.inflation > avg(t2.inflation) * 1.3 | Question: please list the names of the countries with an inflation rate that's 30% above the average. | Tables: borders -> Country1, Country2, Length. city -> Name, Country, Province, Population, Longitude, Latitude. continent -> Name, Area. country -> Name, Code, Capital, Province, Area, Population. desert -> Name, Ar... | please list the names of the countries with an inflation rate that's 30% above the average. |
mondial_geo | select name from country where province = 'baghdad' | Question: where country does baghdad belongs to? | Tables: borders -> Country1, Country2, Length. city -> Name, Country, Province, Population, Longitude, Latitude. continent -> Name, Area. country -> Name, Code, Capital, Province, Area, Population. desert -> Name, Area, Longitude, Latitude. economy -> Country, GDP, Agr... | where country does baghdad belongs to? |
mondial_geo | select t2.name from country as t1 inner join religion as t2 on t1.code = t2.country where t1.name = 'martinique' order by t1.population desc limit 1 | Question: which religion has the largest population in martinique? | Tables: borders -> Country1, Country2, Length. city -> Name, Country, Province, Population, Longitude, Latitude. continent -> Name, Area. country -> Name, Code, Capital, Province, Area, Population. desert -> Name, Area, Longitude, Latitude. economy ->... | which religion has the largest population in martinique? |
mondial_geo | select t1.name from country as t1 inner join religion as t2 on t1.code = t2.country where t2.name = 'christian' and t2.percentage = 41 | Question: which country is 41% christian? give the full name of the country. | Tables: borders -> Country1, Country2, Length. city -> Name, Country, Province, Population, Longitude, Latitude. continent -> Name, Area. country -> Name, Code, Capital, Province, Area, Population. desert -> Name, Area, Longitude, Latitude. ... | which country is 41% christian? give the full name of the country. |
mondial_geo | select t3.name from located as t1 inner join river as t2 on t1.river = t2.name inner join country as t3 on t3.code = t1.country where t2.name = 'detroit river' | Question: which two countries does the detroit river flow through? give the full name of the country. | Tables: borders -> Country1, Country2, Length. city -> Name, Country, Province, Population, Longitude, Latitude. continent -> Name, Area. country -> Name, Code, Capital, Province, Area, Population. desert -> Name, Ar... | which two countries does the detroit river flow through? give the full name of the country. |
mondial_geo | select t2.country1, t2.country2 from country as t1 inner join borders as t2 on t1.code = t2.country1 order by t2.length desc limit 1 | Question: which two countries have the longest border in the world? give the full name of the country. | Tables: borders -> Country1, Country2, Length. city -> Name, Country, Province, Population, Longitude, Latitude. continent -> Name, Area. country -> Name, Code, Capital, Province, Area, Population. desert -> Name, A... | which two countries have the longest border in the world? give the full name of the country. |
mondial_geo | select t1.name from country as t1 inner join borders as t2 on t1.code = t2.country1 group by t1.name order by count(t1.name) desc limit 1 | Question: which country has the most neighbors? give the full name of the country. | Tables: borders -> Country1, Country2, Length. city -> Name, Country, Province, Population, Longitude, Latitude. continent -> Name, Area. country -> Name, Code, Capital, Province, Area, Population. desert -> Name, Area, Longitude, Lati... | which country has the most neighbors? give the full name of the country. |
mondial_geo | select distinct t1.name from country as t1 inner join geo_mountain as t2 on t1.code = t2.country where t2.mountain = 'cerro chirripo' | Question: which country is mountain cerro chirripo located in? give the full name of the country. | Tables: borders -> Country1, Country2, Length. city -> Name, Country, Province, Population, Longitude, Latitude. continent -> Name, Area. country -> Name, Code, Capital, Province, Area, Population. desert -> Name, Area, ... | which country is mountain cerro chirripo located in? give the full name of the country. |
mondial_geo | select count(distinct t2.mountain) from country as t1 inner join geo_mountain as t2 on t1.code = t2.country where t1.name = 'indonesia' | Question: how many mountains are there in indonesia? | Tables: borders -> Country1, Country2, Length. city -> Name, Country, Province, Population, Longitude, Latitude. continent -> Name, Area. country -> Name, Code, Capital, Province, Area, Population. desert -> Name, Area, Longitude, Latitude. economy -> Country, GDP,... | how many mountains are there in indonesia? |
mondial_geo | select count(distinct t2.mountain) from country as t1 inner join geo_mountain as t2 on t1.code = t2.country where t1.name = 'japan' | Question: what is the quantity of the mountains does japan have? | Tables: borders -> Country1, Country2, Length. city -> Name, Country, Province, Population, Longitude, Latitude. continent -> Name, Area. country -> Name, Code, Capital, Province, Area, Population. desert -> Name, Area, Longitude, Latitude. economy -> C... | what is the quantity of the mountains does japan have? |
mondial_geo | select t1.latitude from island as t1 inner join mountainonisland as t2 on t1.name = t2.island where t2.mountain = 'andringitra' | Question: what is the latitude of the island on which mount andrinjitra is located? | Tables: borders -> Country1, Country2, Length. city -> Name, Country, Province, Population, Longitude, Latitude. continent -> Name, Area. country -> Name, Code, Capital, Province, Area, Population. desert -> Name, Area, Longitude, Lat... | what is the latitude of the island on which mount andrinjitra is located? |
mondial_geo | select t1.code from country as t1 inner join geo_mountain as t2 on t1.code = t2.country where t2.mountain = ( select name from mountain order by height desc limit 1, 1 ) | Question: which two countries share the second highest mountain? give the country code. | Tables: borders -> Country1, Country2, Length. city -> Name, Country, Province, Population, Longitude, Latitude. continent -> Name, Area. country -> Name, Code, Capital, Province, Area, Population. desert -> Name, Area, Longitude,... | which two countries share the second highest mountain? give the country code. |
mondial_geo | select t2.percentage from country as t1 inner join encompasses as t2 on t1.code = t2.country inner join continent as t3 on t3.name = t2.continent where t3.name = 'asia' and t1.name = 'egypt' | Question: what is the area of egypt as a percentage of asia? | Tables: borders -> Country1, Country2, Length. city -> Name, Country, Province, Population, Longitude, Latitude. continent -> Name, Area. country -> Name, Code, Capital, Province, Area, Population. desert -> Name, Area, Longitude, Latitude. economy -> Count... | what is the area of egypt as a percentage of asia? |
mondial_geo | select t1.area * 100 / t3.area from country as t1 inner join encompasses as t2 on t1.code = t2.country inner join continent as t3 on t3.name = t2.continent where t3.name = 'asia' and t1.name = 'egypt' | Question: what is the area of egypt as a percentage of asia? | Tables: borders -> Country1, Country2, Length. city -> Name, Country, Province, Population, Longitude, Latitude. continent -> Name, Area. country -> Name, Code, Capital, Province, Area, Population. desert -> Name, Area, Longitude, Latitude. economy -> Count... | what is the area of egypt as a percentage of asia? |
mondial_geo | select t2.name from country as t1 inner join city as t2 on t1.code = t2.country where t1.name = 'japan' order by t2.population desc limit 1 | Question: which city in japan has the most people in the country? | Tables: borders -> Country1, Country2, Length. city -> Name, Country, Province, Population, Longitude, Latitude. continent -> Name, Area. country -> Name, Code, Capital, Province, Area, Population. desert -> Name, Area, Longitude, Latitude. economy -> ... | which city in japan has the most people in the country? |
mondial_geo | select t1.capital from country as t1 inner join city as t2 on t1.code = t2.country where t2.name = 'olsztyn' | Question: for the country in which olsztyn is located, where is the capital? | Tables: borders -> Country1, Country2, Length. city -> Name, Country, Province, Population, Longitude, Latitude. continent -> Name, Area. country -> Name, Code, Capital, Province, Area, Population. desert -> Name, Area, Longitude, Latitude. ... | for the country in which olsztyn is located, where is the capital? |
mondial_geo | select t1.province from country as t1 inner join geo_mountain as t2 on t1.code = t2.country inner join mountain as t3 on t3.name = t2.mountain where t3.type = 'volcano' order by t3.height desc limit 1 | Question: in which province is the highest volcano mountain located in? | Tables: borders -> Country1, Country2, Length. city -> Name, Country, Province, Population, Longitude, Latitude. continent -> Name, Area. country -> Name, Code, Capital, Province, Area, Population. desert -> Name, Area, Longitude, Latitude. econo... | in which province is the highest volcano mountain located in? |
mondial_geo | select t2.independence from country as t1 inner join politics as t2 on t1.code = t2.country where t1.name = 'uganda' | Question: when did uganda declare independence? | Tables: borders -> Country1, Country2, Length. city -> Name, Country, Province, Population, Longitude, Latitude. continent -> Name, Area. country -> Name, Code, Capital, Province, Area, Population. desert -> Name, Area, Longitude, Latitude. economy -> Country, GDP, Agri... | when did uganda declare independence? |
mondial_geo | select t2.government from country as t1 inner join politics as t2 on t1.code = t2.country where t1.name = 'iran' | Question: what kind of government does iran have? | Tables: borders -> Country1, Country2, Length. city -> Name, Country, Province, Population, Longitude, Latitude. continent -> Name, Area. country -> Name, Code, Capital, Province, Area, Population. desert -> Name, Area, Longitude, Latitude. economy -> Country, GDP, Ag... | what kind of government does iran have? |
mondial_geo | select t3.name from locatedon as t1 inner join island as t2 on t1.island = t2.name inner join country as t3 on t3.code = t1.country where t3.name = 'bermuda' | Question: where does bermuda belong to? give the full name of the country. | Tables: borders -> Country1, Country2, Length. city -> Name, Country, Province, Population, Longitude, Latitude. continent -> Name, Area. country -> Name, Code, Capital, Province, Area, Population. desert -> Name, Area, Longitude, Latitude. ec... | where does bermuda belong to? give the full name of the country. |
mondial_geo | select t1.capital from country as t1 inner join ethnicgroup as t2 on t1.code = t2.country where t2.name = 'malay' order by t2.percentage desc limit 1 | Question: where is the capital of country which has the largest percentage of malay people? | Tables: borders -> Country1, Country2, Length. city -> Name, Country, Province, Population, Longitude, Latitude. continent -> Name, Area. country -> Name, Code, Capital, Province, Area, Population. desert -> Name, Area, Longit... | where is the capital of country which has the largest percentage of malay people? |
mondial_geo | select t2.name from country as t1 inner join ethnicgroup as t2 on t1.code = t2.country where t1.name = ( select name from country order by area desc limit 2, 1 ) group by t2.name order by t2.percentage * t1.population desc limit 1 | Question: for the third largest country, which ethinic group has the most population? | Tables: borders -> Country1, Country2, Length. city -> Name, Country, Province, Population, Longitude, Latitude. continent -> Name, Area. country -> Name, Code, Capital, Province, Area, Population. desert -> Name, Area, Longitude, L... | for the third largest country, which ethinic group has the most population? |
mondial_geo | select t1.name from country as t1 inner join city as t2 on t1.code = t2.country where t2.population = 114339 | Question: which country has the city of 114339 in population? give the full name of the country. | Tables: borders -> Country1, Country2, Length. city -> Name, Country, Province, Population, Longitude, Latitude. continent -> Name, Area. country -> Name, Code, Capital, Province, Area, Population. desert -> Name, Area, L... | which country has the city of 114339 in population? give the full name of the country. |
mondial_geo | select count(*) from river where sea in ( select name from sea where depth = 459 ) | Question: how many rivers finally flows to the sea of 459m in depth? | Tables: borders -> Country1, Country2, Length. city -> Name, Country, Province, Population, Longitude, Latitude. continent -> Name, Area. country -> Name, Code, Capital, Province, Area, Population. desert -> Name, Area, Longitude, Latitude. economy ... | how many rivers finally flows to the sea of 459m in depth? |
mondial_geo | select t1.area from country as t1 inner join politics as t2 on t1.code = t2.country where t2.independence = '1921-03-13' | Question: what is the area of the country which became independent in 1921/3/13? | Tables: borders -> Country1, Country2, Length. city -> Name, Country, Province, Population, Longitude, Latitude. continent -> Name, Area. country -> Name, Code, Capital, Province, Area, Population. desert -> Name, Area, Longitude, Latitu... | what is the area of the country which became independent in 1921/3/13? |
mondial_geo | select cast(t1.population as real) / t1.area from country as t1 inner join city as t2 on t1.code = t2.country where t2.name = 'petropavl' | Question: what is the population density of the petropavl's home country? | Tables: borders -> Country1, Country2, Length. city -> Name, Country, Province, Population, Longitude, Latitude. continent -> Name, Area. country -> Name, Code, Capital, Province, Area, Population. desert -> Name, Area, Longitude, Latitude. eco... | what is the population density of the petropavl's home country? |
mondial_geo | select t3.population * (t2.percentage - t1.percentage) from ethnicgroup as t1 inner join ethnicgroup as t2 on t1.country = t2.country inner join country as t3 on t1.country = t3.code where t1.name = 'scottish' and t2.name = 'english' and t3.name = 'united kingdom' | Question: how many more people speak english than speak scottish in united kingdom? | Tables: borders -> Country1, Country2, Length. city -> Name, Country, Province, Population, Longitude, Latitude. continent -> Name, Area. country -> Name, Code, Capital, Province, Area, Population. desert -> Name, Area, Longitude, Lat... | how many more people speak english than speak scottish in united kingdom? |
mondial_geo | select t2.name from country as t1 inner join city as t2 on t1.code = t2.country where t1.name = ( select name from country order by cast(population as real) / area limit 11, 1 ) order by t2.population desc limit 1 | Question: what is the most populated city of the 12th highest density country? | Tables: borders -> Country1, Country2, Length. city -> Name, Country, Province, Population, Longitude, Latitude. continent -> Name, Area. country -> Name, Code, Capital, Province, Area, Population. desert -> Name, Area, Longitude, Latitude... | what is the most populated city of the 12th highest density country? |
mondial_geo | select max(t2.length) / min(t2.length) from country as t1 inner join borders as t2 on t1.code = t2.country2 where t1.name = 'united states' | Question: how many times longer is the longest border in the united states than the shortest? | Tables: borders -> Country1, Country2, Length. city -> Name, Country, Province, Population, Longitude, Latitude. continent -> Name, Area. country -> Name, Code, Capital, Province, Area, Population. desert -> Name, Area, Long... | how many times longer is the longest border in the united states than the shortest? |
mondial_geo | select t1.capital from country as t1 inner join geo_mountain as t2 on t1.code = t2.country group by t1.name, t1.capital having count(t1.name) > 4 | Question: please list the capital cities of the countries that have more than 4 mountains. | Tables: borders -> Country1, Country2, Length. city -> Name, Country, Province, Population, Longitude, Latitude. continent -> Name, Area. country -> Name, Code, Capital, Province, Area, Population. desert -> Name, Area, Longitu... | please list the capital cities of the countries that have more than 4 mountains. |
mondial_geo | select count(t2.mountain) from country as t1 inner join geo_mountain as t2 on t1.code = t2.country group by t1.name order by t1.population desc limit 1 | Question: how many mountains are there in the country with the greatest population? | Tables: borders -> Country1, Country2, Length. city -> Name, Country, Province, Population, Longitude, Latitude. continent -> Name, Area. country -> Name, Code, Capital, Province, Area, Population. desert -> Name, Area, Longitude, Lat... | how many mountains are there in the country with the greatest population? |
mondial_geo | select count(t3.country) from ( select t1.country from economy as t1 inner join geo_mountain as t2 on t1.country = t2.country where t1.industry < 40 group by t1.country having count(t1.country) < 2 ) as t3 | Question: among the countries whose agriculture takes up more than 40% of its gdp, how many of them have less than 2 mountains? | Tables: borders -> Country1, Country2, Length. city -> Name, Country, Province, Population, Longitude, Latitude. continent -> Name, Area. country -> Name, Code, Capital, Province, Area, Popu... | among the countries whose agriculture takes up more than 40% of its gdp, how many of them have less than 2 mountains? |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.