db_id stringclasses 69 values | question stringlengths 24 325 | evidence stringlengths 0 673 | SQL stringlengths 23 804 |
|---|---|---|---|
sales_in_weather | What is the minimum dew point? | minimum dew point refers to Min(dewpoint) | SELECT MIN(dewpoint) FROM weather |
sales_in_weather | What is the maximum and minimum temperature for station number 1 on 15 January 2012? | station number 1 refers to station_nbr = 1 ; minimum temperature = tmin; maximum temperature = tmax; on 15 January 2012 refers to date = '2012-01-15' | SELECT tmax, tmin FROM weather WHERE station_nbr = 1 AND `date` = '2012-01-15' |
sales_in_weather | How many stations were able to sell item 5 on January 2014? | item 5 refers to item_nbr = 5; on January 2014 refers to Substring (date, 1, 7) = '2014-01' | 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 |
sales_in_weather | What is the lowest minimum temperature recorded in store 16 on January 2012? | lowest minimum temperature refers to Min(tmin); store 16 refers to store_nbr = 16; on January 2012 refers to Substring (date, 1, 7) = '2012-01' | 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%' |
sales_in_weather | How many units of item 7 have been sold by store 7 when the snow is less than 5 inches? | item 7 refers to item_nbr = 7; store 7 refers to store_nbr = 7; snow is less than 5 inches refers to snowfall < 5 | 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 |
sales_in_weather | How many items were sold by store 9 during a snowy day? | store 9 refers to store_nbr = 9; snowy day refers to snowfall < > 0 and snowfall is not null; item refers to item_nbr | 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 |
sales_in_weather | List out stations number and items sold by store 17. | station number refers to station_nbr; store 17 refers to store_nbr = 17 | 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 |
sales_in_weather | List out dates when haze is recorded in store 35. | store 35 refers to store_nbr = 35; haze is recorded refers to codesum like '%'||'HZ'||'%' | 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 '%' |
sales_in_weather | What is the sea level and average speed for store number 3 and store number 4? | store number 3 refers to store_nbr = 3; average speed refers to avgspeed; store number 4 refers to store_nbr = 4 | 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 |
sales_in_weather | Which items from store 1 have the highest units sold during rainy day? | store 1 refers to store_nbr = 1; highest unit sold refers to Max(units); during rainy day refers to codesum like '%'||'RA'||'%'; item refers to item_nbr | 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 |
sales_in_weather | What is the ratio of the highest and lowest temperature in store 11? | store 11 refers to store_nbr = 11; highest temperature refers to Max(tmax); lowest temperature refers to Min(tmin); ration = Divide (Max(tmax), Min(tmin)) | 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 |
sales_in_weather | What was the difference of number of units sold in station number 1 and number 2 on year 2012? | station 1 refers to station_nbr = 1; station 2 refers to station_nbr = 2; on year 2012 refers to substring (date, 1, 4) = '2012'; difference = Subtract (Sum(units where station_nbr = 1), Sum(units where station_nbr = 2)) | 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%' |
sales_in_weather | What was the average temperature difference between store number 18 and 19 on 16 September 2022? | store number 18 refers to store_nbr = 18; store number 19 refers to store_nbr = 19; on 16 September 2022 refers to date = '2022-09-16'; average temperature difference = Subtract(tavg where store_nbr = 18, tavg where store_nbr = 19) | 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' |
sales_in_weather | How many units are being sold for item 1 when the average temperature is 83? | item 1 refers to item_nbr = 1; when the average temperature is 83 refers to tavg = 83 | 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 |
sales_in_weather | What is the difference between the units sold for item 1 when the sunset was the earliest and the latest? | item 1 refers to item_nbr = 1; when the sunset earliest refers to Min(sunset); latest sunset refers to Max(sunset); difference unit sold refers to Subtract(Sum(units where Min(sunset)), Sum(units where Max(sunset))) | 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 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 DESC LIMIT 1 ) |
sales_in_weather | What was the total unit sold for item 10 when the average temperature was below the median temperature? | item 10 refers to item_nbr = 10; average temperature below median temperature refers to tavg < avg(tavg); total units refers to Sum(units) | 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 ON T2.store_nbr = T3.store_nbr WHERE T2.item_nbr = 10 ) |
sales_in_weather | What was the average temperature differences during May 2012 for store number 6 and 7? | during May 2012 refers to SUBSTR(date, 1, 7) = '2012-05'; store number 6 refers to store_nbr = 6; store number 7 refers to store_nbr = 7; average temperature difference = Subtract (Divide (Sum(tavg), Count (date) where the store_nbr = 6), Divide (Sum(tavg), Count(date) where store_nbr = 7)) | 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 WHERE T1.`date` LIKE '%2012-05%' AND T2.store_nbr = 7 ) |
mondial_geo | In which country does Polish found least in? | 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 | |
mondial_geo | Which countries have more than 90% of African? List the name of the country in full. | Percentage = 90 means 90% of the population | 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 |
mondial_geo | State the different ethnic group and percentage of the language in Singapore. | 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 | |
mondial_geo | Calculate the percentage of country which gained independence as republic after 1970. | SELECT CAST(SUM(CASE WHEN Government = 'republic' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(Country) FROM politics WHERE STRFTIME('%Y', Independence) > '1970' | |
mondial_geo | Find the GPD for Bosnia and Herzegovina and the type of government it belongs to. | 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' | |
mondial_geo | State the country and its population with population growth greater than 2% but infant mortality rate less than 5%. | 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 | |
mondial_geo | Which is the majority of the ethnic group in country with great than 10,000,000 population | 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 | |
mondial_geo | Provide the country with its full name which has the most ethnic group? List them all ethnic group together with its percentage. | 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 | |
mondial_geo | What is the full name of the country with 100% Africans? | Percentage = 100 means 100% of the population | 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' |
mondial_geo | List the infant mortality of country with the least Amerindian. | 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 | |
mondial_geo | For country with area greater than 600000, what is agriculture percentage of GDP the country contributes? | 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 | |
mondial_geo | Provide the country with republic government which has the highest population growth? | 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 | |
mondial_geo | When did 'Bulgaria' gain independence? | SELECT T2.Independence FROM country AS T1 INNER JOIN politics AS T2 ON T1.Code = T2.Country WHERE T1.Name = 'Bulgaria' | |
mondial_geo | Calculate the population of Arab in each country? | Arab is the name of enthic groups in the country; Population of (Arab in each country) = (percentage of Arab) * (population of each country) | SELECT T2.Percentage * T1.Population FROM country AS T1 INNER JOIN ethnicGroup AS T2 ON T1.Code = T2.Country WHERE T2.Name = 'Arab' |
mondial_geo | What is the population of African in 'Turks and Caicos Islands'? | African is the name of enthic groups in the country; Population of (African in Turks and Calcos Island) = (percentage of African) * (population of Turks and Calcos Island) | 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' |
mondial_geo | What is the number of growth population for country with the lowest infant mortality? | Growth population = population_growth * population | 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 |
mondial_geo | Among countries with more than 400,000 GDP, state its capital and population. | SELECT T1.Capital, T1.Population FROM country AS T1 INNER JOIN economy AS T2 ON T1.Code = T2.Country WHERE T2.GDP > 400000 | |
mondial_geo | Calculate the service of GDP for Brazil. | The service of GDP can be computed by service * GDP | SELECT T2.Service * T2.GDP FROM country AS T1 INNER JOIN economy AS T2 ON T1.Code = T2.Country WHERE T1.Name = 'Brazil' |
mondial_geo | Which country has the highest infant mortality? Also state its population growth. | 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 | |
mondial_geo | List all countries with negative growth in population. State the country, population and growth. | Negative growth in population means population_growth < 0 | 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 |
mondial_geo | For countries with area between 500000 to 1000000, state the country and infant mortality rate. | 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 | |
mondial_geo | Among the countries with more than 3% population growth rate, state the country name in full along with its GDP. | Population_growth = 3 means 3% population growth rate | 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 |
mondial_geo | What is the infant mortality rate for Ethiopia? | Ethiopia is one of country names | SELECT T2.Infant_Mortality FROM country AS T1 INNER JOIN population AS T2 ON T1.Code = T2.Country WHERE T1.Name = 'Ethiopia' |
mondial_geo | How much does the gross domestic products goes to the industry sector for Singapore? | Singapore is one of country names; GDP refers to gross domestic products; GDP to the industry sector = GDP * Industry | SELECT T2.GDP * T2.Industry FROM country AS T1 INNER JOIN economy AS T2 ON T1.Code = T2.Country WHERE T1.Name = 'Singapore' |
mondial_geo | How much is her GDP in agriculture for the country with the least area? | 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 | |
mondial_geo | Which country has the biggest percentage of the albanian ethnic group? | 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 | |
mondial_geo | Among the countries with the African ethnic group, how many of them has a population of over 10000000? | 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 | |
mondial_geo | Please list the name of the countries with over 5 ethnic groups. | 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 | |
mondial_geo | Which country has the highest GDP? | SELECT T1.Name FROM country AS T1 INNER JOIN economy AS T2 ON T1.Code = T2.Country ORDER BY T2.GDP DESC LIMIT 1 | |
mondial_geo | Among the countries with a population of over 10000000, how many of them have a GDP of over 500000? | 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 | |
mondial_geo | Please list the capital cities of the countries with an inflation rate under 2. | SELECT T1.Capital FROM country AS T1 INNER JOIN economy AS T2 ON T1.Code = T2.Country WHERE T2.Inflation < 2 | |
mondial_geo | Which country has the lowest inflation rate? | 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 | |
mondial_geo | Among the countries whose agriculture percentage of the GDP is under 50%, how many of them have an area of over 8000000? | 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 | |
mondial_geo | How many cities have a salt lake located in it? | SELECT COUNT(T1.City) FROM located AS T1 INNER JOIN lake AS T2 ON T1.Lake = T2.Name WHERE T2.Type = 'salt' | |
mondial_geo | Please list the depth of the lakes that are located in the Province of Albania. | SELECT T2.Depth FROM located AS T1 INNER JOIN lake AS T2 ON T1.Lake = T2.Name WHERE T1.Province = 'Albania' | |
mondial_geo | The lake with the highest altitude is located in which city? | SELECT T2.City FROM lake AS T1 LEFT JOIN located AS T2 ON T2.Lake = T1.Name ORDER BY T1.Altitude DESC LIMIT 1 | |
mondial_geo | How many lakes in the Canary Islands cover an area of over 1000000? | 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 | |
mondial_geo | Which country has the most languages spoken? | 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 | |
mondial_geo | What is the capital city of the country that has the percentage of Armenian speakers over 90%? | Percentage of country > 90% refers to percentage > 90; America is one of country names | 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 |
mondial_geo | Among the countries with a population of under 1000000, how many of them have over 2 languages? | 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 | |
mondial_geo | How many organizations are founded in countries with a population of under 1000000? | SELECT COUNT(T2.Name) FROM country AS T1 INNER JOIN organization AS T2 ON T1.Code = T2.Country WHERE T1.Population < 1000000 | |
mondial_geo | How many organizations are established after 1999/1/1 in a country whose GDP is under 500000? | 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 | |
mondial_geo | Among the countries with over 3 organizations, how many of them have an inflation rate of over 5%? | 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 | |
mondial_geo | How many organizations are established in the country with the most ethnic groups? | 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 | |
mondial_geo | Please list the organization names established in the countries where Dutch is spoken. | Dutch is one of language | SELECT T2.Name FROM language AS T1 INNER JOIN organization AS T2 ON T1.Country = T2.Country WHERE T1.Name = 'Dutch' |
mondial_geo | How many organizations are established in countries where people speak Bosnian? | Bosnian is one of language | SELECT COUNT(T2.Name) FROM language AS T1 INNER JOIN organization AS T2 ON T1.Country = T2.Country WHERE T1.Name = 'Bosnian' |
mondial_geo | What is the highest infant mortality rate per thousand of the countries whose inflation is under 3? | SELECT MAX(T2.Infant_Mortality) FROM economy AS T1 INNER JOIN population AS T2 ON T1.Country = T2.Country WHERE T1.Inflation < 3 | |
mondial_geo | Among the countries whose GDP is over 1000000, how many of them have a population groth rate of over 3%? | population growth rate of over 3% means population_growth > 3 | 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 |
mondial_geo | Which country has the highest GDP per capita? | GDP per capita = GDP / population | 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 |
mondial_geo | What is the highest lake area coverage of a country? | Lake area coverage = [sum(area of the lakes in the country) / (area of the country)] * 100% | 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 |
mondial_geo | What is the average population growth rate of countries where more than 3 languages are used? | 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 | |
mondial_geo | Please list the names of the countries with an inflation rate that's 30% above the average. | Average inflation rate = [sum(inflation) / count(countries)]; 30% above average implies inflation > 1.3 average inflation rate | 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 |
mondial_geo | Where country does Baghdad belongs to? | Baghdad is one of provinces | SELECT Name FROM country WHERE Province = 'Baghdad' |
mondial_geo | Which religion has the largest population in Martinique? | 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 | |
mondial_geo | Which country is 41% Christian? Give the full name of the country. | 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 | |
mondial_geo | Which two countries does the Detroit River flow through? Give the full name of the country. | 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' | |
mondial_geo | Which two countries have the longest border in the world? Give the full name of the country. | 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 | |
mondial_geo | Which country has the most neighbors? Give the full name of the country. | 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 | |
mondial_geo | Which country is Mountain Cerro Chirripo located in? Give the full name of the country. | SELECT DISTINCT T1.Name FROM country AS T1 INNER JOIN geo_mountain AS T2 ON T1.Code = T2.Country WHERE T2.Mountain = 'Cerro Chirripo' | |
mondial_geo | How many mountains are there in Indonesia? | Indonesia refers to one of countries | SELECT COUNT(DISTINCT T2.Mountain) FROM country AS T1 INNER JOIN geo_mountain AS T2 ON T1.Code = T2.Country WHERE T1.Name = 'Indonesia' |
mondial_geo | What is the quantity of the mountains does Japan have? | Japan is one of country names | SELECT COUNT(DISTINCT T2.Mountain) FROM country AS T1 INNER JOIN geo_mountain AS T2 ON T1.Code = T2.Country WHERE T1.Name = 'Japan' |
mondial_geo | What is the latitude of the island on which Mount Andrinjitra is located? | SELECT T1.Latitude FROM island AS T1 INNER JOIN mountainOnIsland AS T2 ON T1.Name = T2.Island WHERE T2.Mountain = 'Andringitra' | |
mondial_geo | Which two countries share the second highest mountain? Give the country code. | 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 ) | |
mondial_geo | What is the area of Egypt as a percentage of Asia? | 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' | |
mondial_geo | What is the area of Egypt as a percentage of Asia? | 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' | |
mondial_geo | Which city in Japan has the most people in the country? | most people refers to largest population | 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 |
mondial_geo | For the country in which Olsztyn is located, where is the capital? | Olsztyn is one of country names | SELECT T1.Capital FROM country AS T1 INNER JOIN city AS T2 ON T1.Code = T2.Country WHERE T2.Name = 'Olsztyn' |
mondial_geo | In which province is the highest volcano mountain located in? | 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 | |
mondial_geo | When did Uganda declare independence? | Uganda is one of country names | SELECT T2.Independence FROM country AS T1 INNER JOIN politics AS T2 ON T1.Code = T2.Country WHERE T1.Name = 'Uganda' |
mondial_geo | What kind of government does Iran have? | Uganda is one of country names | SELECT T2.Government FROM country AS T1 INNER JOIN politics AS T2 ON T1.Code = T2.Country WHERE T1.Name = 'Iran' |
mondial_geo | Where does Bermuda belong to? Give the full name of the country. | Bermuda is one of countries | 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' |
mondial_geo | Where is the capital of country which has the largest percentage of Malay people? | Malay is one of country names | 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 |
mondial_geo | For the third largest country, which ethinic group has the most population? | 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 | |
mondial_geo | Which country has the city of 114339 in population? Give the full name of the country. | SELECT T1.Name FROM country AS T1 INNER JOIN city AS T2 ON T1.Code = T2.Country WHERE T2.Population = 114339 | |
mondial_geo | How many rivers finally flows to the sea of 459m in depth? | SELECT COUNT(*) FROM river WHERE Sea IN ( SELECT Name FROM sea WHERE Depth = 459 ) | |
mondial_geo | What is the area of the country which became independent in 1921/3/13? | SELECT T1.Area FROM country AS T1 INNER JOIN politics AS T2 ON T1.Code = T2.Country WHERE T2.Independence = '1921-03-13' | |
mondial_geo | What is the population density of the Petropavl's home country? | Population density = Population / area | 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' |
mondial_geo | How many more people speak English than speak Scottish in United Kingdom? | English and Scottish are two languages; United Kingdom is a country | 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' |
mondial_geo | What is the most populated city of the 12th highest density country? | Population density = Population / area | 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 |
mondial_geo | How many times longer is the longest border in the United States than the shortest? | How many times longer = longest border / shortest border | 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' |
mondial_geo | Please list the capital cities of the countries that have more than 4 mountains. | 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 | |
mondial_geo | How many mountains are there in the country with the greatest population? | 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 | |
mondial_geo | Among the countries whose agriculture takes up more than 40% of its GDP, how many of them have less than 2 mountains? | 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 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.