Chinastark/bird_dataset huggingface dataset:
Database: mondial_geo
Question: For island area less than 200, list the island name and city it belongs to.
SQL: SELECT DISTINCT island.name, city.name FROM city INNER JOIN locatedon ON city.name = locatedon.city INNER JOIN island ON island.name = locatedon.island WHERE island.area < 200
Database: mondial_geo
Question: In which province is city Glenrothes located? What is the capital of the province?
SQL: SELECT city.province, province.capital FROM province INNER JOIN city ON province.name = city.province AND province.country = city.country WHERE city.name = 'Glenrothes'
Database: mondial_geo
Question: List the all the cities and its city population for provinces with population more than 1000000.
SQL: SELECT city.name, city.population FROM city INNER JOIN province ON province.name = city.province WHERE province.population > 1000000
Database: mondial_geo
Note: Baltic sea is a sea located in Northern Europe;
Question: List all the coral islands along with its city and province.
SQL: SELECT city, province FROM locatedon WHERE island IN ( SELECT name FROM island WHERE TYPE = 'coral' )
Database: mondial_geo
Note: Baltic sea is a sea located in Northern Europe;
Question: What is the average population for all cities location at Baltic Sea?
SQL: SELECT avg(city.population) FROM city INNER JOIN located ON city.name = located.city INNER JOIN sea ON sea.name = located.sea WHERE sea.name = 'Baltic Sea'
Database: mondial_geo
Note: percentage of population in each city = population(city) / population(province) * 100%;
Question: Calculate the percentage of population in Edmonton city to the population of its province.
SQL: SELECT cast(city.population AS REAL) * 100 / province.population FROM city INNER JOIN province ON city.province = province.name WHERE city.name = 'Edmonton'
Database: mondial_geo
Note: Black sea is a sea located in Eastern Europe and Western Asia;
Question: Which are the rivers that flows to Black Sea?
SQL: SELECT name FROM river WHERE sea = 'Black Sea'
Database: mondial_geo
Question: State the name of the lake in Albania province and in which city does it located at.
SQL: SELECT lake, city FROM located WHERE province = 'Albania' AND lake IS NOT NULL
Database: mondial_geo
Note: Tallest refers to max(height);
Question: Name the tallest mountain on Himalaya and what is its height.
SQL: SELECT name, height FROM mountain WHERE mountains = 'Himalaya' ORDER BY height DESC LIMIT 1
Database: mondial_geo
Question: List all the mountains that are volcanic along with its longitude and latitude.
SQL: SELECT name, latitude, longitude FROM mountain WHERE TYPE = 'volcano'
Database: mondial_geo
Question: Name all the volcano mountains between the height of 2000 to 4000.
SQL: SELECT name FROM mountain WHERE TYPE = 'volcano' AND height BETWEEN 2000 AND 4000
Database: mondial_geo
Question: Please state the longest river that flows to the Mediterranean Sea.
SQL: SELECT name FROM river WHERE sea = 'Mediterranean Sea' ORDER BY LENGTH DESC LIMIT 1
Database: mondial_geo
Note: Percent of non-volcanic mountains = count(mountains = 'Andes' & type ! = 'volcano') / count(mountains = 'Andes') * 100%;
Question: How many percent of the mountains on Andes which are non-volcanic?
SQL: SELECT cast(sum(CASE WHEN TYPE != 'volcano' THEN 1 ELSE 0 END) AS REAL) * 100 / count(*) FROM mountain WHERE mountains = 'Andes'
Database: mondial_geo
Note: Atlantic Ocean is the second-largest ocean on Earth, after the Pacific Ocean; Ocean and sea share the same meaning;
Question: List all the cities and provinces located at the rivers that flows to Atlantic Ocean.
SQL: SELECT city.name, city.province FROM city INNER JOIN located ON city.name = located.city INNER JOIN river ON river.name = located.river WHERE river.sea = 'Atlantic Ocean'
Database: mondial_geo
Note: Orleans is a city in north-central France;
Question: What is the name and length of rivers located at 'Orleans' city?
SQL: SELECT river.name, river.length FROM city INNER JOIN located ON city.name = located.city INNER JOIN river ON river.name = located.river WHERE city.name = 'Orleans'
Database: mondial_geo
Question: What is the height of the mountain on which river 'Lech' is located? Please also provide its longitude and latitude.
SQL: SELECT mountain.height, mountain.latitude, mountain.longitude FROM mountain INNER JOIN geo_mountain ON mountain.name = geo_mountain.mountain INNER JOIN province ON province.name = geo_mountain.province INNER JOIN located ON located.province = province.name WHERE located.river = 'Lech'
Database: mondial_geo
Note: Lorraine is a province;
Question: Name the river of which Lorraine is on. Please name the mountains where to source flow from?
SQL: SELECT river.sourcelongitude, river.sourcelatitude, river.sourcealtitude FROM river INNER JOIN geo_river ON geo_river.river = river.name WHERE geo_river.province = 'Lorraine'
Database: mondial_geo
Question: Which mountain does the river source Blue Nile located? State the height of the mountain.
SQL: SELECT mountain.name, mountain.height FROM mountain INNER JOIN geo_mountain ON mountain.name = geo_mountain.mountain INNER JOIN province ON province.name = geo_mountain.province INNER JOIN geo_source ON geo_source.province = province.name WHERE geo_source.river = 'Blue Nile'
Database: mondial_geo
Question: Name the river at Little Rock city. State the length of the river.
SQL: SELECT river.length FROM city INNER JOIN located ON city.name = located.city INNER JOIN river ON river.name = located.river WHERE city.name = 'Little Rock'
Database: mondial_geo
Question: List all rivers and province it is located that is greater than 1000 in length.
SQL: SELECT geo_river.province, river.name FROM geo_river INNER JOIN river ON geo_river.river = river.name WHERE river.length > 1000
Database: mondial_geo
Note: Moldoveanu is a mountain;
Question: In which province and country does Moldoveanu located? State its height.
SQL: SELECT geo_mountain.province, geo_mountain.country, mountain.height FROM mountain INNER JOIN geo_mountain ON mountain.name = geo_mountain.mountain WHERE mountain.name = 'Moldoveanu'
Database: mondial_geo
Note: USA is a country;
Question: Provide all rivers name and length in USA.
SQL: SELECT DISTINCT river.name, river.length FROM city INNER JOIN located ON city.name = located.city INNER JOIN river ON river.name = located.river WHERE located.country = 'USA'
Database: mondial_geo
Note: Nepal is a province;
Question: What is the average height of all mountains in Nepal?
SQL: SELECT avg(mountain.height) FROM mountain INNER JOIN geo_mountain ON mountain.name = geo_mountain.mountain WHERE geo_mountain.province = 'Nepal'
Database: mondial_geo
Note: Seince is a river; population disparity refers to difference between cities with greatest and least population; Difference between cities with greatest and least population means max(population) - min(population);
Question: For all cities where Seine is located at, which city has the greatest population? Calculate the difference from the city with least population.
SQL: SELECT max(city.population) - min(city.population) FROM city INNER JOIN located ON city.name = located.city INNER JOIN river ON river.name = located.river WHERE river.name = 'Seine'
Database: mondial_geo
Question: Which are the 2 rivers located at Belgrade city? Which river is longer and how by much?
SQL: SELECT river.name, river.length FROM river INNER JOIN located ON river.name = located.river INNER JOIN city ON city.name = located.city WHERE city.name = 'Belgrade'
Database: mondial_geo
Question: Which nations have a 100% Spanish-speaking population?
SQL: SELECT country FROM LANGUAGE WHERE name = 'Spanish' AND percentage = 100
Database: mondial_geo
Question: Which countries are dependent on the British Crown?
SQL: SELECT country FROM politics WHERE government = 'British crown dependency'
Database: mondial_geo
Question: What are the names of the rivers in Canada?
SQL: SELECT DISTINCT located.river FROM located INNER JOIN country ON located.country = country.code WHERE country.name = 'Canada' AND located.river IS NOT NULL
Database: mondial_geo
Note: inflation can reduce purchasing power over time for recipients and payers.;
Question: What is the name of the country whose citizens have the lowest purchasing power?
SQL: SELECT country.name FROM economy INNER JOIN country ON economy.country = country.code ORDER BY economy.inflation DESC LIMIT 1
Database: mondial_geo
Question: What province does the 4th most populous city in the United Kingdom belong to, and how many people live there?
SQL: SELECT city.province, city.population FROM city INNER JOIN country ON city.country = country.code WHERE country.name = 'United Kingdom' ORDER BY city.population DESC LIMIT 3, 1
Database: mondial_geo
Note: Moldova is one country located in Eastern Europe; The number of residents can be computed by percentage * population;
Question: How many Jewish residents are there in Moldova?
SQL: SELECT ethnicgroup.percentage * country.population FROM country INNER JOIN ethnicgroup ON country.code = ethnicgroup.country WHERE country.name = 'Moldova' AND ethnicgroup.name = 'Jewish'
Database: mondial_geo
Note: Asia is a continent;
Question: What is the average area of Asian countries?
SQL: SELECT avg(area) FROM country INNER JOIN encompasses ON country.code = encompasses.country WHERE encompasses.continent = 'Asia'
Database: mondial_geo
Question: Which country is home to the world's tiniest desert, and what are its longitude and latitude?
SQL: SELECT geo_desert.country, desert.latitude, desert.longitude FROM desert INNER JOIN geo_desert ON desert.name = geo_desert.desert WHERE desert.name = ( SELECT name FROM desert ORDER BY area ASC LIMIT 1 )
Database: mondial_geo
Note: Serbian is one language; Montenegro is a country located in Southeastern Europe;
Question: How many people in Montenegro speaks Serbian?
SQL: SELECT LANGUAGE.percentage * country.population FROM LANGUAGE INNER JOIN country ON LANGUAGE.country = country.code WHERE LANGUAGE.name = 'Serbian' AND country.name = 'Montenegro'
Database: mondial_geo
Question: How many mountains are there in the country with the most land area?
SQL: SELECT count(mountain) FROM geo_mountain WHERE country = ( SELECT code FROM country ORDER BY area DESC LIMIT 1 )
Database: mondial_geo
Note: Shallow sea refers to the sea with less depth;
Question: Which sea is the shallowest and which country surrounds it?
SQL: SELECT DISTINCT country.name FROM located INNER JOIN country ON located.country = country.code WHERE sea = ( SELECT name FROM sea ORDER BY depth ASC LIMIT 1 )
Database: mondial_geo
Note: Communist is a government form;
Question: Which nation's GDP is the lowest among those that are communist states?
SQL: SELECT economy.country FROM politics INNER JOIN economy ON politics.country = economy.country WHERE politics.government = 'Communist state' ORDER BY economy.gdp ASC LIMIT 1
Database: mondial_geo
Note: Political system refers to government form;
Question: What kind of political system is in place in the country with the highest inflation rate?
SQL: SELECT politics.government FROM politics INNER JOIN economy ON politics.country = economy.country ORDER BY economy.inflation DESC LIMIT 1
Database: mondial_geo
Question: Which nation has the greatest infant mortality rate among those that attained independence in 1960?
SQL: SELECT politics.country FROM politics INNER JOIN population ON politics.country = population.country WHERE strftime('%Y', politics.independence) = '1960' ORDER BY population.infant_mortality DESC LIMIT 1
Database: mondial_geo
Question: What is the smallest border's length, and what form of government do the two nations bordering it have?
SQL: SELECT politics.government, politics.government FROM politics INNER JOIN borders ON politics.country = borders.country1 INNER JOIN politics ON politics.country = borders.country2 ORDER BY borders.length ASC LIMIT 1
Database: mondial_geo
Note: Arabic-speaking country = country that speaks 100% Arabic;
Question: Which Arabic-speaking country has the smallest population?
SQL: SELECT country.name FROM country INNER JOIN LANGUAGE ON country.code = LANGUAGE.country WHERE LANGUAGE.name = 'Arabic' AND LANGUAGE.percentage = 100 ORDER BY country.population ASC LIMIT 1
Database: mondial_geo
Question: What provinces encompass the world's biggest desert in terms of overall area?
SQL: SELECT province FROM geo_desert WHERE desert = ( SELECT name FROM desert ORDER BY area DESC LIMIT 1 )
Database: mondial_geo
Question: How many lakes are there in the 4th most populous African country with a republican form of government?
SQL: SELECT count(*) FROM geo_lake WHERE country = ( SELECT t4.code FROM ( SELECT country.code, country.population FROM encompasses INNER JOIN country ON encompasses.country = country.code INNER JOIN politics ON encompasses.country = politics.country WHERE encompasses.continent = 'Africa' AND encompasses.percentage = 100 AND politics.government = 'republic' ORDER BY population DESC LIMIT 4 ) AS t4 ORDER BY population ASC LIMIT 1 )
Database: mondial_geo
Note: Most prevalent religion refers to the religion with the most population percentage;
Question: Which religion is most prevalent in Asia?
SQL: SELECT religion.name FROM continent INNER JOIN encompasses ON continent.name = encompasses.continent INNER JOIN country ON country.code = encompasses.country INNER JOIN religion ON religion.country = country.code WHERE continent.name = 'Asia' GROUP BY religion.name ORDER BY sum(religion.percentage) DESC LIMIT 1
Database: mondial_geo
Question: What is the difference in population between the two nations where the tallest peak is located?
SQL: SELECT * FROM mountain INNER JOIN geo_mountain ON mountain.name = geo_mountain.mountain INNER JOIN province ON province.country = geo_mountain.country INNER JOIN country ON country.code = province.country WHERE mountain.name = ( SELECT name FROM mountain ORDER BY height DESC LIMIT 1 )
Database: mondial_geo
Question: What are the names of the sea that can be found on the island with the biggest area?
SQL: SELECT sea.name FROM islandin INNER JOIN sea ON sea.name = islandin.sea WHERE islandin.island = ( SELECT name FROM island ORDER BY area DESC LIMIT 1 )
Database: mondial_geo
Note: Empties into the Atlantic Ocean = flows to the Atlantic Ocean;
Question: What are the names of the three nations where the longest river that empties into the Atlantic Ocean stretches to?
SQL: SELECT DISTINCT city.country FROM city INNER JOIN located ON city.name = located.city INNER JOIN river ON river.name = located.river WHERE river.name = ( SELECT name FROM river WHERE sea = 'Atlantic Ocean' ORDER BY LENGTH DESC LIMIT 1 )
Database: mondial_geo
Question: How many people reside in the nation's capital city, which is situated in the nation that attained independence on 8/15/1947?
SQL: SELECT city.population FROM politics INNER JOIN country ON politics.country = country.code INNER JOIN city ON city.name = country.capital WHERE politics.independence = '1947-08-15'
Database: mondial_geo
Note: Total Number of People = percentage * population;
Question: What is the total number of Afro-Asian people in the most populous Asian country governed by a monarchy?
SQL: SELECT ethnicgroup.percentage * country.population FROM ethnicgroup INNER JOIN country ON ethnicgroup.country = country.code WHERE country = ( SELECT country.code FROM continent INNER JOIN encompasses ON continent.name = encompasses.continent INNER JOIN country ON country.code = encompasses.country INNER JOIN politics ON politics.country = country.code WHERE politics.government = 'monarchy' AND continent.name = 'Asia' ORDER BY country.population DESC LIMIT 1 ) AND ethnicgroup.name = 'Afro-Asian'
Database: mondial_geo
Question: What are the names of the cities along the Euphrat River's course? Indicate the capital city of the nation where the Euphrat River flows.
SQL: SELECT located.city, country.capital FROM country INNER JOIN located ON country.code = located.country INNER JOIN river ON river.name = located.river WHERE river.name = 'Euphrat'
Database: mondial_geo
Question: What is the proportion of English-speaking citizens in the countries that rely on the United States compared to the total number of citizens in those countries?
SQL: SELECT LANGUAGE.percentage * country.population FROM country INNER JOIN LANGUAGE ON country.code = LANGUAGE.country INNER JOIN politics ON politics.country = LANGUAGE.country WHERE politics.dependent = 'USA' AND LANGUAGE.name = 'English'
Database: mondial_geo
Note: Republic is on of government forms; percentage of services of the gdp was mentioned in economy.service; population Density = population / area;
Question: Which federal republic country in Europe has the most provinces, and what proportion of GDP is devoted to services? Calculate the population density as well.
SQL: SELECT province.country, economy.service , sum(province.population) / sum(province.area) FROM province INNER JOIN economy ON province.country = economy.country WHERE province.country IN ( SELECT country FROM encompasses WHERE continent = 'Europe' ) GROUP BY province.country, economy.service ORDER BY count(province.name) DESC LIMIT 1
Database: mondial_geo
Question: What is the capital of the 3rd most populated country in Asia and what is the capital city's ratio in percentage (%) against the overall population of the country?
SQL: SELECT t4.capital, cast(city.population AS REAL) * 100 / t4.population FROM city INNER JOIN ( SELECT country.capital , country.population FROM country INNER JOIN encompasses ON country.code = encompasses.country WHERE encompasses.continent = 'Asia' ORDER BY country.population DESC LIMIT 2, 1 ) AS t4 ON city.name = t4.capital
Database: mondial_geo
Question: What's the name of the second biggest desert?
SQL: SELECT name FROM desert ORDER BY area DESC LIMIT 1, 1
Database: mondial_geo
Note: MNE is one country;
Question: What is the main spoken language in MNE?
SQL: SELECT name FROM LANGUAGE WHERE country = 'MNE' ORDER BY percentage DESC LIMIT 1
Database: mondial_geo
Note: Cayman islands is a country;
Question: What's the percentage of people in Cayman Islands speak English?
SQL: SELECT LANGUAGE.percentage FROM LANGUAGE INNER JOIN country ON LANGUAGE.country = country.code WHERE country.name = 'Cayman Islands' AND LANGUAGE.name = 'English'
Database: mondial_geo
Question: Which country was the source of Pjandsh River? Give the full name of the country.
SQL: SELECT country.name FROM country INNER JOIN located ON country.code = located.country WHERE located.river = 'Pjandsh'
Database: mondial_geo
Note: billion = 1000000000;
Question: For the countries have the population north of a billion, which one has the lowest GDP? Give the full name of the country.
SQL: SELECT country.name FROM country INNER JOIN economy ON country.code = economy.country WHERE country.population > 1000000000 ORDER BY economy.gdp ASC LIMIT 1
Database: mondial_geo
Question: What is the capital of the country that has the Licancabur Mountain?
SQL: SELECT country.capital FROM mountain INNER JOIN geo_mountain ON mountain.name = geo_mountain.mountain INNER JOIN province ON province.name = geo_mountain.province INNER JOIN country ON country.province = province.name WHERE mountain.name = 'Licancabur'
Database: mondial_geo
Question: How much sea is around the island where Kerinci Mountain is located?
SQL: SELECT count(islandin.sea) FROM mountain INNER JOIN mountainonisland ON mountain.name = mountainonisland.mountain INNER JOIN island ON island.name = mountainonisland.island INNER JOIN islandin ON islandin.island = island.name WHERE mountain.name = 'Kerinci'
Database: mondial_geo
Note: Amazonas flow is a river;
Question: Which three countries does the Amazonas flow through? Give the full name of the countries.
SQL: SELECT DISTINCT country.name FROM city INNER JOIN located ON city.name = located.city INNER JOIN river ON river.name = located.river INNER JOIN country ON country.code = located.country WHERE river.name = 'Amazonas'
Database: mondial_geo
Question: Which country became independent on 1492-01-01? Give the full name of the country.
SQL: SELECT country.name FROM country INNER JOIN politics ON country.code = politics.country WHERE politics.independence = '1492-01-01'
Database: mondial_geo
Question: How many cities in France have a population of more than 100,000?
SQL: SELECT count(city.name) FROM country INNER JOIN city ON city.country = country.code WHERE country.name = 'France' AND city.population > 100000
Database: mondial_geo
Question: Among all the rivers finally flows to the sea of 540m in depth, which one has the longest length?
SQL: SELECT river.name FROM sea INNER JOIN river ON river.sea = sea.name WHERE sea.depth = 540 ORDER BY river.length DESC LIMIT 1
Database: mondial_geo
Question: In which Country is the second highest volcanic mountain located in? Give the code of the country.
SQL: SELECT province.country FROM mountain INNER JOIN geo_mountain ON mountain.name = geo_mountain.mountain INNER JOIN province ON province.name = geo_mountain.province ORDER BY mountain.height DESC LIMIT 1, 1
Database: mondial_geo
Question: What is the longitude of the island on which Mount Olympos is located?
SQL: SELECT island.longitude FROM mountain INNER JOIN mountainonisland ON mountain.name = mountainonisland.mountain INNER JOIN island ON island.name = mountainonisland.island WHERE mountain.name = 'Olympos'
Database: mondial_geo
Question: For all the countries that is smaller than 100 square kilometres, which one has the most GDP?
SQL: SELECT country.name FROM country INNER JOIN economy ON country.code = economy.country WHERE country.area < 100 ORDER BY economy.gdp DESC LIMIT 1
Database: mondial_geo
Note: Japan is a country;
Question: What is the total number of cities that Japan have?
SQL: SELECT count(city.name) FROM country INNER JOIN province ON country.code = province.country INNER JOIN city ON city.province = province.name WHERE country.name = 'Japan'
Database: mondial_geo
Note: Bangladesh is a country;
Question: Which city has most population other than its capital in Bangladesh?
SQL: SELECT city.name FROM country INNER JOIN province ON country.code = province.country INNER JOIN city ON city.province = province.name WHERE country.name = 'Bangladesh' AND city.name <> country.capital ORDER BY city.population DESC LIMIT 1
Database: mondial_geo
Question: Which non capital city has the most people of all?
SQL: SELECT city.name FROM country INNER JOIN province ON country.code = province.country INNER JOIN city ON city.province = province.name WHERE city.name <> country.capital ORDER BY city.population DESC LIMIT 1
Database: mondial_geo
Note: Grozny is a province;
Question: In which country is the city of Grozny? Give the full name of the country.
SQL: SELECT country.name FROM country INNER JOIN province ON country.code = province.country INNER JOIN city ON city.province = province.name WHERE city.name = 'Grozny'
Database: mondial_geo
Note: Japan is a country;
Question: Which religion has the majority of the people in Japan?
SQL: SELECT religion.name FROM country INNER JOIN religion ON country.code = religion.country WHERE country.name = 'Japan' ORDER BY religion.percentage DESC LIMIT 1
Database: mondial_geo
Question: Which two countries have the border in length of 803 km? Give the full names of the countries.
SQL: SELECT country.name, country.name FROM country INNER JOIN borders ON country.code = borders.country1 INNER JOIN country ON country.code = borders.country2 WHERE borders.length = 803
Database: mondial_geo
Question: How many percent of the total area of Russia is in Europe?
SQL: SELECT encompasses.percentage FROM continent INNER JOIN encompasses ON continent.name = encompasses.continent INNER JOIN country ON country.code = encompasses.country WHERE country.name = 'Russia' AND continent.name = 'Europe'
Database: mondial_geo
Question: Give the full names of the countries that are located in more than one continent.
SQL: SELECT country.name FROM continent INNER JOIN encompasses ON continent.name = encompasses.continent INNER JOIN country ON country.code = encompasses.country GROUP BY country.name HAVING count(country.name) > 1