Chinastark/bird_dataset huggingface dataset:
Database: mondial_geo
Note: Mother country refers to home country;
Question: How many people are there in Fareham's mother country?
SQL: SELECT country.population FROM country INNER JOIN province ON country.code = province.country INNER JOIN city ON city.province = province.name WHERE city.name = 'Fareham'
Database: mondial_geo
Note: Number can be calculated = infant_mortality * population * population_growth;
Question: What's the number of infant mortality in Switzerland in a year?
SQL: SELECT population.infant_mortality * country.population * population.population_growth FROM country INNER JOIN population ON country.code = population.country WHERE country.name = 'Switzerland'
Database: mondial_geo
Question: How many mountains are there in the United States?
SQL: SELECT count(mountain.name) 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 country.name = 'United States'
Database: mondial_geo
Note: Equatorial Guinea is a country;
Question: When did Equatorial Guinea become independent?
SQL: SELECT politics.independence FROM country INNER JOIN politics ON country.code = politics.country WHERE country.name = 'Equatorial Guinea'
Database: mondial_geo
Note: gdp per capita = gdp / population;
Question: What is the GDP per capita in Switzerland?
SQL: SELECT economy.gdp / country.population FROM country INNER JOIN economy ON country.code = economy.country WHERE country.name = 'Switzerland'
Database: mondial_geo
Question: What is the GDP for Service of the country with Fuenlabrada as its city.
SQL: SELECT economy.service * economy.gdp FROM country INNER JOIN province ON country.code = province.country INNER JOIN city ON city.province = province.name INNER JOIN economy ON economy.country = province.country WHERE city.name = 'Fuenlabrada'
Database: mondial_geo
Note: TJ is an abbreviated country code of Tajikistan;
Question: How many times longer is the longest river in Tajikistan than the shortest river?
SQL: SELECT max(river.length) / min(river.length) FROM located INNER JOIN river ON located.river = river.name WHERE located.country = 'TJ'
Database: mondial_geo
Note: population density = population / area;
Question: What is the population density of Hanoi's home country?
SQL: SELECT country.population / country.area FROM country INNER JOIN province ON country.code = province.country INNER JOIN city ON city.province = province.name WHERE city.name = 'Hanoi'
Database: mondial_geo
Note: greatest presence can be represented by largest percentage.;
Question: In countries where there is more than one ethnic group, name the ethnic group with the greatest presence in each country and the country to which it corresponds.
SQL: SELECT country, name FROM ethnicgroup WHERE percentage < 100 AND percentage = ( SELECT max(percentage) FROM ethnicgroup WHERE ethnicgroup.country = ethnicgroup.country )
Database: mondial_geo
Question: How many deserts are not located in a single country? Name them.
SQL: SELECT desert FROM geo_desert GROUP BY desert HAVING count(DISTINCT country) > 1
Database: mondial_geo
Question: How many rivers belong to more than one country? Name the provinces where we can find them.
SQL: SELECT river, group_concat(province) FROM geo_river GROUP BY river HAVING count(DISTINCT country) > 1
Database: mondial_geo
Question: What percentage of the border does Angola share with each of the countries with which it borders?
SQL: SELECT sum(CASE WHEN country.name = 'Angola' THEN borders.length ELSE 0 END) * 100 / sum(borders.length) FROM borders LEFT JOIN country ON borders.country1 = country.code
Database: mondial_geo
Note: Percent = [count(non volcanic islands Lesser Antilles area 300 or less) / count(non volcanic islands Lesser Antilles)] * 100%;
Question: What percent of the non volcanic islands in the Lesser Antilles group of islands have an area of no more than 300 square kilometers?
SQL: SELECT sum(CASE WHEN area <= 300 THEN 1 ELSE 0 END) * 100 / count(*) FROM island WHERE islands = 'Lesser Antilles' AND (TYPE != 'volcanic' OR TYPE IS NULL)
Database: mondial_geo
Note: percentage = [count(countries 100% English) / count(countries English)] * 100%;
Question: Of all the countries in which English is spoken, what percentage has English as their only language?
SQL: SELECT cast(sum(CASE WHEN LANGUAGE.percentage = 100 THEN 1 ELSE 0 END) AS REAL) * 100 / count(country.name) FROM country INNER JOIN LANGUAGE ON country.code = LANGUAGE.country WHERE LANGUAGE.name = 'English'
Database: mondial_geo
Question: Name of the capitals of the countries that have less than 99.95% less population than the country that has the most population.
SQL: SELECT capital FROM country WHERE population <= ( SELECT max(population) - max(population) * 0.9995 FROM country )
Database: mondial_geo
Question: Average length of the rivers flowing into the Donau River.
SQL: SELECT * FROM river WHERE name = 'Donau'
Database: mondial_geo
Note: percentage of countries are non-Christian = [count(non-Christian) / count(non-Christian + Christian)] * 100%;
Question: Based on the data shown at Target, what percentage of countries are non-Christian?
SQL: SELECT 100 - (cast(sum(CASE WHEN target = 'Christian' THEN 1 ELSE 0 END) AS REAL)) * 100 / count(country) FROM target
Database: mondial_geo
Question: Which country with a city with a population between 50,000 and 300,000 inhabitants and which is a member of an organization established between 03/01/1991 and 04/30/1991 is also a member of the EBRD?
SQL: SELECT ismember.country FROM country INNER JOIN ismember ON country.code = ismember.country INNER JOIN organization ON organization.country = ismember.country INNER JOIN city ON city.country = organization.country WHERE organization.abbreviation = 'EBRD' AND city.population BETWEEN 50000 AND 300000 AND organization.established BETWEEN '1991-01-31' AND '1991-04-30'
Database: mondial_geo
Question: Which river with its mouth in the Donau River and a length greater than 500 km is located in Slovenia?
SQL: SELECT geo_river.river FROM country INNER JOIN geo_river ON country.code = geo_river.country WHERE country.name = 'Slovenia' AND geo_river.river IN ( SELECT name FROM river WHERE LENGTH > 500 AND river = 'Donau' )
Database: mondial_geo
Question: In which city is the sea whose depth is 4232 meters less than that of the Bay of Bengal?
SQL: SELECT located.city FROM sea INNER JOIN located ON sea.name = located.sea INNER JOIN city ON city.name = located.city WHERE ( SELECT depth FROM sea WHERE name LIKE '%Bengal%' ) - sea.depth = 4235
Database: mondial_geo
Question: In which city is the lake located at coordinates longitude -85.35 and latitude 11.6?
SQL: SELECT located.city FROM lake INNER JOIN located ON lake.name = located.lake INNER JOIN province ON province.name = located.province INNER JOIN city ON city.province = province.name WHERE lake.longitude = -85.35 AND lake.latitude = 11.6
Database: mondial_geo
Note: highest inflation rate results in the most erosion of real income;
Question: On which continent is the country with the most erosion of real income?
SQL: SELECT continent.name FROM continent INNER JOIN encompasses ON continent.name = encompasses.continent INNER JOIN country ON country.code = encompasses.country INNER JOIN economy ON economy.country = country.code ORDER BY economy.inflation DESC LIMIT 1
Database: mondial_geo
Question: Which two Asian countries share a border that is 1,782 kilometers long?
SQL: SELECT borders.country1, borders.country2 FROM continent INNER JOIN encompasses ON continent.name = encompasses.continent INNER JOIN country ON country.code = encompasses.country INNER JOIN borders ON borders.country1 = country.code WHERE continent.name = 'Asia' AND borders.length = 1782
Database: mondial_geo
Note: Bolivia is the country;
Question: Of all the lakes in Bolivia, which is the deepest?
SQL: SELECT lake.name FROM lake INNER JOIN geo_lake ON lake.name = geo_lake.lake INNER JOIN province ON province.name = geo_lake.province INNER JOIN country ON country.code = province.country WHERE country.name = 'Bolivia' ORDER BY lake.depth DESC LIMIT 1
Database: mondial_geo
Question: In which lake flows the river that is, in turn, the mouth of the Manicouagan River?
SQL: SELECT name FROM lake WHERE river = ( SELECT river FROM river WHERE name = 'Manicouagan' )
Database: mondial_geo
Question: In which group of islands is Rinjani Mountain located?
SQL: SELECT island.islands FROM island INNER JOIN mountainonisland ON island.name = mountainonisland.island INNER JOIN mountain ON mountain.name = mountainonisland.mountain WHERE mountain.name = 'Rinjani'
Database: mondial_geo
Question: List all the seas with which the deepest sea merges.
SQL: SELECT mergeswith.sea2 FROM sea INNER JOIN mergeswith ON sea.name = mergeswith.sea1 WHERE sea.name = ( SELECT name FROM sea ORDER BY depth DESC LIMIT 1 )
Database: mondial_geo
Question: Of all the countries that share territory with more than one continent, in which of them does the average population not exceed 10 inhabitants per square kilometer?
SQL: SELECT name FROM country WHERE code IN ( SELECT country FROM encompasses GROUP BY country HAVING count(continent) > 1 ) AND population / area <= 10
Database: mondial_geo
Note: ratio of people per square meter of surface = population / area;
Question: Of all the countries of the Hindu religion, which has the lowest ratio of people per square meter of surface?
SQL: SELECT country.name FROM country INNER JOIN religion ON country.code = religion.country WHERE religion.name = 'Hindu' ORDER BY country.population / country.area ASC LIMIT 1
Database: mondial_geo
Note: gdp refers to gross domestic product;
Question: On what date did the country have a gross domestic product 400% higher than Saint Kitts and Nevis become independent?
SQL: SELECT independence FROM politics WHERE country = ( SELECT country FROM economy WHERE gdp = 1100 )
Database: mondial_geo
Note: Average population ratio = population / area;
Question: What is the average population ratio of the countries in which organizations were established in 1947?
SQL: SELECT country.population / country.area FROM country INNER JOIN organization ON country.code = organization.country WHERE strftime('%Y', organization.established) = '1947'
Database: mondial_geo
Note: Anguilla is a country;
Question: What is the name of Anguilla's capital, and where is it located?
SQL: SELECT capital, province FROM country WHERE name = 'Anguilla'
Database: mondial_geo
Question: Which nation has the smallest population, and where is its capital located?
SQL: SELECT name, capital FROM country ORDER BY population ASC LIMIT 1
Database: mondial_geo
Note: Asia and Europe are two continents.;
Question: How much more space does Asia have than Europe?
SQL: SELECT max(area) - min(area) FROM continent WHERE name = 'Asia' OR name = 'Europe'
Database: mondial_geo
Note: longitude, latitude = coordinates of the location;
Question: What is the geographic location of Aarhus city? Please provide the answer with the coordinates of the location.
SQL: SELECT longitude, latitude FROM city WHERE name = 'Aarhus'
Database: mondial_geo
Note: population gap = Total population of the United Kingdom - Total population of Italy;
Question: What is the population gap between the United Kingdom and Italy?
SQL: SELECT max(population) - min(population) FROM country WHERE name = 'United Kingdom' OR name = 'Italy'
Database: mondial_geo
Question: In which city is the European Bank for Reconstruction and Development's headquarters? Please include the city and province where the headquarters are located in your answer.
SQL: SELECT city, province FROM organization WHERE name = 'European Bank for Reconstruction and Development'
Database: mondial_geo
Note: area * depth can represents the metric in terms of both surface area and depth;
Question: Which lake is the largest in terms of both surface area and depth?
SQL: SELECT name FROM lake ORDER BY area * depth DESC LIMIT 1
Database: mondial_geo
Question: Which two nations are separated from one another by the longest border? Please include the entire names of the nations in your answer.
SQL: SELECT country1, country2 FROM borders ORDER BY LENGTH DESC LIMIT 1
Database: mondial_geo
Question: Which nation has the highest GDP? Please give the nation's full name.
SQL: SELECT country.name FROM country INNER JOIN economy ON country.code = economy.country ORDER BY economy.gdp DESC LIMIT 1
Database: mondial_geo
Note: Nation and country share the same meaning. Proportion refers to percentage;
Question: Which nation has the lowest proportion of people who speak an African language? Please state the nation's full name.
SQL: SELECT country.name FROM country INNER JOIN ethnicgroup ON country.code = ethnicgroup.country WHERE ethnicgroup.name = 'African' ORDER BY ethnicgroup.percentage ASC LIMIT 1
Database: mondial_geo
Question: Which country has three different religions-Anglicanism, Christianity, and Roman Catholicism and uses 100% English?
SQL: SELECT religion.country FROM country INNER JOIN religion ON country.code = religion.country INNER JOIN LANGUAGE ON LANGUAGE.country = religion.country WHERE (religion.name = 'Anglican' OR religion.name = 'Christian' OR religion.name = 'Roman Catholic') AND LANGUAGE.name = 'English' AND LANGUAGE.percentage = 100 GROUP BY country.name HAVING count(country.name) = 3
Database: mondial_geo
Question: Please list the top 3 countries with the highest inflation rate.
SQL: SELECT country.name FROM country INNER JOIN economy ON country.code = economy.country ORDER BY economy.inflation DESC LIMIT 3
Database: mondial_geo
Note: Utilizition entirely means percentage = 100% uses;
Question: Please provide a list of every nation where English is spoken and utilized entirely.
SQL: SELECT country.name FROM country INNER JOIN LANGUAGE ON country.code = LANGUAGE.country WHERE LANGUAGE.name = 'English' AND LANGUAGE.percentage = 100
Database: mondial_geo
Note: established means founded; country means nation; organization means businesses;
Question: How many businesses were founded after 1960 in a nation that wasn't independent?
SQL: SELECT count(organization.name) FROM country INNER JOIN politics ON country.code = politics.country INNER JOIN organization ON organization.country = politics.country WHERE politics.independence = NULL AND strftime('%Y', organization.established) > '1960'
Database: mondial_geo
Question: What province did the river Klaeaelv travel through and how long is the river?
SQL: SELECT city.province FROM city INNER JOIN located ON city.name = located.city INNER JOIN river ON river.name = located.river WHERE river.name = 'Klaraelv'
Database: mondial_geo
Note: Reigion refers to province;
Question: How many Italian regions are bordered by the Mediterranean Sea? How deep is the Mediterranean Sea?
SQL: SELECT count(DISTINCT located.province), sea.depth FROM country INNER JOIN located ON country.code = located.country INNER JOIN sea ON sea.name = located.sea WHERE country.code = 'I' AND sea.name = 'Mediterranean Sea' GROUP BY sea.depth
Database: mondial_geo
Note: British Overseas Territories is one government form; Nation and country share the same meaning;
Question: What nations are considered British Overseas Territories?
SQL: SELECT name FROM country WHERE code IN ( SELECT country FROM politics WHERE government = 'British Overseas Territories' )
Database: mondial_geo
Note: Economies refers to countries;
Question: Which of the top 3 economies by GDP has the lowest proportion of the economy devoted to agriculture?
SQL: SELECT country.name FROM country INNER JOIN economy ON country.code = economy.country ORDER BY economy.gdp DESC, economy.agriculture ASC LIMIT 1
Database: mondial_geo
Note: area can measure the size of countries; country and nation share the same meaning;
Question: How big is Africa, and how many nations make up the continent?
SQL: SELECT continent.area, count(country.name) FROM continent INNER JOIN encompasses ON continent.name = encompasses.continent INNER JOIN country ON country.code = encompasses.country WHERE continent.name = 'Asia' GROUP BY continent.name, continent.area
Database: mondial_geo
Note: organization refers to corporation;
Question: Which United States province is home to the greatest number of corporations' corporate headquarters?
SQL: SELECT country.province FROM country INNER JOIN organization ON country.code = organization.country WHERE country.name = 'United States' GROUP BY country.province ORDER BY count(country.name) DESC LIMIT 1
Database: mondial_geo
Note: Larger date of indepedence refers to more recent indepdence; Nation refers to country;
Question: What are the most recent three independent nations?
SQL: SELECT country.name FROM country INNER JOIN politics ON country.code = politics.country ORDER BY politics.independence DESC LIMIT 3
Database: mondial_geo
Note: Nation refers to country;
Question: Please name any three sovereign nations that have been governed by the republic since 1991.
SQL: SELECT country FROM politics WHERE government = 'republic' AND strftime('%Y', independence) >= '1991' AND country IN ( SELECT country FROM country ) ORDER BY independence LIMIT 3
Database: mondial_geo
Question: Which company falls under the category of an associated member? Please provide the organization's full name.
SQL: SELECT name FROM organization WHERE country IN ( SELECT country FROM politics WHERE dependent != '' )
Database: mondial_geo
Note: Nation refers to country;
Question: Which nations have a boundary with the Kalahari Desert?
SQL: SELECT country.name FROM desert INNER JOIN geo_desert ON desert.name = geo_desert.desert INNER JOIN country ON country.code = geo_desert.country WHERE desert.name = 'Kalahari'
Database: mondial_geo
Question: Which desert in Kazakhstan is the largest?
SQL: SELECT desert.name FROM desert INNER JOIN geo_desert ON desert.name = geo_desert.desert INNER JOIN country ON country.code = geo_desert.country WHERE country.name = 'Kazakstan' ORDER BY desert.area DESC LIMIT 1
Database: mondial_geo
Note: Coverage refers to mergeswith;
Question: What sea does the Baltic Sea converge with, and how deep is the Baltic Sea?
SQL: SELECT mergeswith.sea2, sea.depth FROM sea INNER JOIN mergeswith ON sea.name = mergeswith.sea1 WHERE sea.name = 'Baltic Sea'
Database: mondial_geo
Note: Nation refers to country; Information of growth appears in the column established;
Question: Which constitutional monarchy nations saw the greatest growth in the number of organizations after 1907?
SQL: SELECT country.name FROM country INNER JOIN organization ON country.code = organization.country INNER JOIN politics ON politics.country = organization.country WHERE strftime('%Y', organization.established) > '1907' AND politics.government = 'constitutional monarchy' GROUP BY country.name ORDER BY count(DISTINCT organization.name) DESC LIMIT 1
Database: mondial_geo
Note: Nation refers to country;
Question: What kind of mountain is Ampato? Which province and nation does this mountain belong to?
SQL: SELECT mountain.type, province.name, country.name 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 province.country = country.code WHERE mountain.name = 'Ampato'
Database: mondial_geo
Question: Please provide a list of every volcano mountain in the province of Ecuador.
SQL: SELECT mountain.name FROM mountain INNER JOIN geo_mountain ON mountain.name = geo_mountain.mountain INNER JOIN province ON province.name = geo_mountain.province WHERE province.name = 'Ecuador' AND mountain.type = 'volcano'
Database: mondial_geo
Note: percentage of rivers with lengths greater than 3,000 miles = [(Total number of rivers with lengths greater than 3,000 miles) / (Total number of rivers)] * 100%;
Question: What percentage of nations have achieved independence since 1993 and practice parliamentary democracy? Please include any three parliament-based democracies that attained independence after 1993.
SQL: SELECT sum(iif(government = 'parliamentary democracy', 1, 0)) , cast(sum(iif(government = 'parliamentary democracy', 1, 0)) AS REAL) * 100 / count(*) FROM politics WHERE strftime('%Y', independence) >= '1993'
Database: mondial_geo
Note: Proportion of rivers with lengths greater than 3,000 miles = [(Total number of rivers with lengths greater than 3,000 miles) / (Total number of rivers)] * 100%;
Question: What proportion of rivers have a length of more than 3,000 miles? Please provide the name of a Russian river that is more than 3,000 miles long.
SQL: SELECT cast(sum(CASE WHEN river.length > 3000 THEN 1 ELSE 0 END) AS REAL) * 100 / count(river.name) FROM river INNER JOIN located ON river.name = located.river INNER JOIN country ON country.code = located.country
Database: mondial_geo
Question: What is the full name of ABEDA and when was it established?
SQL: SELECT name, established FROM organization WHERE abbreviation = 'ABEDA'
Database: mondial_geo
Question: Name all the organisations that were established from 1970 to 1980.
SQL: SELECT name FROM organization WHERE strftime('%Y', established) BETWEEN '1970' AND '1980'
Database: mondial_geo
Note: London is a city;
Question: Provide a list of all organisations with headquarters in London?
SQL: SELECT name FROM organization WHERE city = 'London'
Database: mondial_geo
Question: For each organisations with headquarters in the USA, provide the its full name and the city where the headquarter is located at.
SQL: SELECT name, city FROM organization WHERE country = 'USA'
Database: mondial_geo
Note: Paris is a city;
Question: Name the first organisation established in the Paris city. State its abbreviation, full name and date of establishment.
SQL: SELECT abbreviation, name, established FROM organization WHERE city = 'Paris' ORDER BY established ASC LIMIT 1
Database: mondial_geo
Question: List all the organisations that where its name contains 'United Nation'. State its full name and its headquarter city.
SQL: SELECT name, city FROM organization WHERE name LIKE '%United Nation%'
Database: mondial_geo
Question: Which 2 countries' border span across the longest length? Provide the country's full name.
SQL: SELECT country.name, country.name FROM country INNER JOIN borders ON country.code = borders.country1 INNER JOIN country ON country.code = borders.country2 ORDER BY borders.length DESC LIMIT 1
Database: mondial_geo
Note: Bulgaria is a country name;
Question: Name all countries in which have border with Bulgaria.
SQL: SELECT country.name FROM country INNER JOIN borders ON country.code = borders.country1 INNER JOIN country ON country.code = borders.country2 WHERE country.name = 'Bulgaria'
Database: mondial_geo
Question: State all countries with border greater than 4,000. List the full country name.
SQL: SELECT country.name FROM country INNER JOIN borders ON country.code = borders.country1 WHERE borders.length > 4000
Database: mondial_geo
Question: Among the country member of 'IOC' organization, which country has the most population?
SQL: SELECT country.name FROM ismember INNER JOIN country ON ismember.country = country.code WHERE ismember.organization = 'IOC' ORDER BY country.population DESC LIMIT 1
Database: mondial_geo
Question: List all members and member type of the Islamic Development Bank.
SQL: SELECT ismember.country, ismember.type FROM organization INNER JOIN ismember ON organization.abbreviation = ismember.organization INNER JOIN country ON ismember.country = country.code WHERE organization.name = 'Islamic Development Bank'
Database: mondial_geo
Note: Asia Pacific Economic Cooperation is an organization name;
Question: State the area and population of the country where Asia Pacific Economic Cooperation headquarter is located.
SQL: SELECT country.name, country.population FROM organization INNER JOIN country ON organization.country = country.code WHERE organization.name = 'Asia Pacific Economic Cooperation'
Database: mondial_geo
Question: What is the organization(s) that has 'National Society' as member type.
SQL: SELECT organization.name FROM organization INNER JOIN ismember ON ismember.country = organization.country INNER JOIN country ON ismember.country = country.code WHERE ismember.type = 'National Society'