db_id stringclasses 68 values | question stringlengths 24 325 | evidence stringlengths 0 580 | SQL stringlengths 23 728 |
|---|---|---|---|
university | Calculate the difference between the total number of students and the number of international international students in Univeristy of Tokyo from 2011 to 2014. | international students refers to DIVIDE(MULTIPLY(num_students, pct_international_students), 100); difference refers to SUBTRACT(SUM(num_students), SUM(DIVIDE(MULTIPLY(num_students, pct_international_students), 100))); in University of Tokyo refers to university_name = 'University of Tokyo'; from 2011 to 2014 refers to year BETWEEN 2011 AND 2014 | SELECT SUM(T1.num_students) - SUM(CAST(T1.num_students * T1.pct_international_students AS REAL) / 100) FROM university_year AS T1 INNER JOIN university AS T2 ON T1.university_id = T2.id WHERE T1.year BETWEEN 2011 AND 2014 AND T2.university_name = 'University of Tokyo' |
university | List the names of universities with a score less than 28% of the average score of all universities in 2015. | in 2015 refers to year = 2015; score less than 28% refers to score < MULTIPLY(avg(score), 0.28) where year = 2015; names of universities refers to university_name | SELECT T2.university_name FROM university_ranking_year AS T1 INNER JOIN university AS T2 ON T1.university_id = T2.id WHERE T1.year = 2015 AND T1.score * 100 < ( SELECT AVG(score) * 28 FROM university_ranking_year WHERE year = 2015 ) |
sales_in_weather | How many units of item no.5 were sold in store no.3 on the day the temperature range was the biggest? | item no. 5 refers to item_nbr = 5; store no.3 refers to store_nbr = 3; when the temperature range was the biggest refers to Max(Subtract(tmax, tmin)) | SELECT t2.units FROM relation AS T1 INNER JOIN sales_in_weather AS T2 ON T1.store_nbr = T2.store_nbr INNER JOIN weather AS T3 ON T1.station_nbr = T3.station_nbr WHERE T2.store_nbr = 3 AND T2.item_nbr = 5 ORDER BY t3.tmax - t3.tmin DESC LIMIT 1 |
sales_in_weather | How many units of item no.5 were sold in store no.3 in total on days with a total precipitation of over 0.05? | item no. 5 refers to item_nbr = 5; store no.3 refers to store_nbr = 3; with a total precipitation of over 0.05 refers to preciptotal > 0.05 | SELECT SUM(CASE WHEN T3.preciptotal > 0.05 THEN units ELSE 0 END) AS sum FROM sales_in_weather AS T1 INNER JOIN relation AS T2 ON T1.store_nbr = T2.store_nbr INNER JOIN weather AS T3 ON T2.station_nbr = T3.station_nbr WHERE T2.store_nbr = 3 AND T1.item_nbr = 5 |
sales_in_weather | Give the id of the weather station with most stores. | station with more stores refers to Max(Count(store_nbr)); ID of weather station refers to station_nbr | SELECT station_nbr FROM relation GROUP BY station_nbr ORDER BY COUNT(station_nbr) DESC LIMIT 1 |
sales_in_weather | Which weather station does store no.20 belong to? | store no.20 refers to store_nbr = 20; weather station refers to station_nbr | SELECT station_nbr FROM relation WHERE store_nbr = 20 |
sales_in_weather | For the weather station which recorded the highest temperature above the 30-year normal, how many stores does it have? | highest temperature above the 30-year normal refers to Max(depart) | SELECT store_nbr FROM relation WHERE station_nbr = ( SELECT station_nbr FROM weather ORDER BY depart DESC LIMIT 1 ) |
sales_in_weather | Give the number of stores which opened on the weather station that recorded the fastest average wind speed. | fastest average wind speed refers to Max(avgspeed); number of store refers to count(store_nbr) | SELECT COUNT(T.store_nbr) FROM ( SELECT DISTINCT store_nbr FROM relation WHERE station_nbr = ( SELECT station_nbr FROM weather ORDER BY avgspeed DESC LIMIT 1 ) ) T |
sales_in_weather | State the number of stores that belongs to the weather station which recorded the deepest snowfall. | deepest snowfall refers to Max(snowfall); number of stores refers to store_nbr | SELECT T2.store_nbr FROM weather AS T1 INNER JOIN relation AS T2 ON T1.station_nbr = T2.station_nbr ORDER BY snowfall DESC LIMIT 1 |
sales_in_weather | How many stores are in weather station 12? | weather station 12 refers to station_nbr = 12; number of stores refers to Count(store_nbr) | SELECT SUM(store_nbr) FROM relation WHERE station_nbr = 12 |
sales_in_weather | Which weather station has the highest number of stores? | number of store refers to store_nbr; highest number of store refers to Max(Count(store_nbr)); weather station refers to station_nbr | SELECT station_nbr FROM relation GROUP BY station_nbr ORDER BY COUNT(store_nbr) DESC LIMIT 1 |
sales_in_weather | Which weather station does the store that sold the highest quantity of item 9 belongs to? | item 9 refers to item_nbr = 9; sold the highest quantity refers to Max(Sum(units)); weather station refers to station_nbr | SELECT station_nbr FROM sales_in_weather AS T1 INNER JOIN relation AS T2 ON T1.store_nbr = T2.store_nbr WHERE T1.item_nbr = 9 GROUP BY T2.station_nbr ORDER BY SUM(T1.units) DESC LIMIT 1 |
sales_in_weather | How many stores belong to the most windy station? | most windy station refers to Max(avgspeed) | SELECT COUNT(store_nbr) FROM relation WHERE station_nbr = ( SELECT station_nbr FROM weather ORDER BY avgspeed DESC LIMIT 1 ) |
sales_in_weather | Which station sold the highest quantity of item number 5 overall? | item number 5 refers to item_nbr = 5; sold highest quantity refers to Max(Sum(units)); station refers to station_nbr | SELECT T2.station_nbr FROM sales_in_weather AS T1 INNER JOIN relation AS T2 ON T1.store_nbr = T2.store_nbr WHERE T1.item_nbr = 5 GROUP BY T2.station_nbr ORDER BY SUM(T1.units) DESC LIMIT 1 |
sales_in_weather | What are the top 3 stations that have sold the highest quantities for an item in a single day? | highest quantity refers to Max(units); station refers to station_nbr | SELECT T2.station_nbr FROM sales_in_weather AS T1 INNER JOIN relation AS T2 ON T1.store_nbr = T2.store_nbr ORDER BY T1.units DESC LIMIT 3 |
sales_in_weather | How many stores belong to the station with the highest recorded heat of all time? | highest recorded heat refers to Max(heat); station refers to station_nbr | SELECT COUNT(T2.store_nbr) FROM ( SELECT station_nbr FROM weather ORDER BY heat DESC LIMIT 1 ) AS T1 INNER JOIN relation AS T2 ON T1.station_nbr = T2.station_nbr |
sales_in_weather | What is the maximum average speed? | maximum average speed refers to Max(avgspeed) | SELECT MAX(avgspeed) FROM weather |
sales_in_weather | What is the minimum dew point? | minimum dew point refers to Min(dewpoint) | SELECT MIN(dewpoint) FROM weather |
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 | 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 | 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 |
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 | 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 | 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 | 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 | 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 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 | 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 | 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 | 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 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 | 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 | 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 | |
mondial_geo | Among the independent countries whose type of government is republic, what is the biggest number of deserts they have? | SELECT COUNT(T3.Desert) FROM country AS T1 INNER JOIN politics AS T2 ON T1.Code = T2.Country INNER JOIN geo_desert AS T3 ON T3.Country = T2.Country WHERE T2.Government = 'republic' | |
mondial_geo | Please list the deserts in the countries whose population is over 100000 and covers an area of under 500000. | SELECT T2.Desert FROM country AS T1 INNER JOIN geo_desert AS T2 ON T1.Code = T2.Country WHERE T1.Area > 100000 AND T1.Population < 500000 | |
mondial_geo | How many deserts are there in a country where over 90% of people speaks Armenian? | SELECT COUNT(T2.Desert) FROM country AS T1 INNER JOIN geo_desert AS T2 ON T1.Code = T2.Country INNER JOIN language AS T3 ON T1.Code = T2.Country WHERE T3.Name = 'Armenian' AND T3.Percentage > 90 | |
mondial_geo | How many volcanic mountains are there in countries whose population is no more than 5000000? | SELECT COUNT(DISTINCT T3.Name) 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 = 'volcanic' AND T1.Population <= 5000000 | |
mondial_geo | Among the countries with a GDP of over 1000000, how many of them have mountains higher than 1000? | SELECT COUNT(DISTINCT T1.Name) FROM country AS T1 INNER JOIN geo_mountain AS T2 ON T1.Code = T2.Country INNER JOIN economy AS T3 ON T3.Country = T1.Code INNER JOIN mountain AS T4 ON T4.Name = T2.Mountain WHERE T3.GDP > 1000000 AND T4.Height > 1000 | |
mondial_geo | Among the countries whose government type is republic, how many of them shares a border that's longer than 200? | SELECT COUNT(DISTINCT T1.Name) FROM country AS T1 INNER JOIN politics AS T2 ON T1.Code = T2.Country INNER JOIN borders AS T3 ON T3.Country1 = T2.Country WHERE T2.Government = 'republic' AND T3.Length > 200 | |
mondial_geo | Please list the countries that share the shortest border. | SELECT T1.Name FROM country AS T1 INNER JOIN borders AS T2 ON T1.Code = T2.Country1 ORDER BY T2.Length ASC LIMIT 1 | |
mondial_geo | What is the GDP of the European Continent? | SELECT SUM(T4.GDP) FROM country AS T1 INNER JOIN encompasses AS T2 ON T1.Code = T2.Country INNER JOIN continent AS T3 ON T3.Name = T2.Continent INNER JOIN economy AS T4 ON T4.Country = T1.Code WHERE T3.Name = 'Europe' | |
mondial_geo | How many mountains are there on the African Continent? | SELECT COUNT(T3.Name) FROM country AS T1 INNER JOIN encompasses AS T2 ON T1.Code = T2.Country INNER JOIN continent AS T3 ON T3.Name = T2.Continent INNER JOIN province AS T4 ON T4.Country = T1.Code INNER JOIN geo_mountain AS T5 ON T5.Province = T4.Name WHERE T3.Name = 'European' | |
mondial_geo | Of the deserts on the America Continent, which one covers the greatest area? | SELECT T5.Name FROM country AS T1 INNER JOIN encompasses AS T2 ON T1.Code = T2.Country INNER JOIN continent AS T3 ON T3.Name = T2.Continent INNER JOIN geo_desert AS T4 ON T4.Country = T1.Code INNER JOIN desert AS T5 ON T5.Name = T4.Desert WHERE T3.Name = 'America' ORDER BY T5.Area DESC LIMIT 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.