problem
stringlengths 121
422
| db_id
stringclasses 69
values | solution
stringlengths 23
804
|
---|---|---|
Write SQL query to solve given problem: 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?. Keep the solution inside sql tag ```sql [SQL-Query] ``` | mondial_geo | SELECT T2.Country FROM country AS T1 INNER JOIN isMember AS T2 ON T1.Code = T2.Country INNER JOIN organization AS T3 ON T3.Country = T2.Country INNER JOIN city AS T4 ON T4.Country = T3.Country WHERE T3.Abbreviation = 'EBRD' AND T4.Population BETWEEN 50000 AND 300000 AND T3.Established BETWEEN '1991-01-31' AND '1991-04-30' |
Write SQL query to solve given problem: Which river with its mouth in the Donau River and a length greater than 500 km is located in Slovenia?. Keep the solution inside sql tag ```sql [SQL-Query] ``` | mondial_geo | SELECT T2.River FROM country AS T1 INNER JOIN geo_river AS T2 ON T1.Code = T2.Country WHERE T1.Name = 'Slovenia' AND T2.River IN ( SELECT NAME FROM river WHERE Length > 500 AND River = 'Donau' ) |
Write SQL query to solve given problem: In which city is the sea whose depth is 4232 meters less than that of the Bay of Bengal?. Keep the solution inside sql tag ```sql [SQL-Query] ``` | mondial_geo | SELECT T2.City FROM sea AS T1 INNER JOIN located AS T2 ON T1.Name = T2.Sea INNER JOIN city AS T3 ON T3.Name = T2.City WHERE ( SELECT Depth FROM sea WHERE Name LIKE '%Bengal%' ) - T1.Depth = 4235 |
Write SQL query to solve given problem: In which city is the lake located at coordinates longitude -85.35 and latitude 11.6?. Keep the solution inside sql tag ```sql [SQL-Query] ``` | mondial_geo | SELECT T2.City FROM lake AS T1 INNER JOIN located AS T2 ON T1.Name = T2.Lake INNER JOIN province AS T3 ON T3.Name = T2.Province INNER JOIN city AS T4 ON T4.Province = T3.Name WHERE T1.Longitude = -85.35 AND T1.Latitude = 11.6 |
Write SQL query to solve given problem: On which continent is the country with the most erosion of real income?. Keep the solution inside sql tag ```sql [SQL-Query] ``` | mondial_geo | SELECT T1.Name FROM continent AS T1 INNER JOIN encompasses AS T2 ON T1.Name = T2.Continent INNER JOIN country AS T3 ON T3.Code = T2.Country INNER JOIN economy AS T4 ON T4.Country = T3.Code ORDER BY T4.Inflation DESC LIMIT 1 |
Write SQL query to solve given problem: Which two Asian countries share a border that is 1,782 kilometers long?. Keep the solution inside sql tag ```sql [SQL-Query] ``` | mondial_geo | SELECT T4.Country1, T4.Country2 FROM continent AS T1 INNER JOIN encompasses AS T2 ON T1.Name = T2.Continent INNER JOIN country AS T3 ON T3.Code = T2.Country INNER JOIN borders AS T4 ON T4.Country1 = T3.Code WHERE T1.Name = 'Asia' AND T4.Length = 1782 |
Write SQL query to solve given problem: Of all the lakes in Bolivia, which is the deepest?. Keep the solution inside sql tag ```sql [SQL-Query] ``` | mondial_geo | SELECT T1.Name FROM lake AS T1 INNER JOIN geo_lake AS T2 ON T1.Name = T2.Lake INNER JOIN province AS T3 ON T3.Name = T2.Province INNER JOIN country AS T4 ON T4.Code = T3.Country WHERE T4.Name = 'Bolivia' ORDER BY T1.Depth DESC LIMIT 1 |
Write SQL query to solve given problem: In which lake flows the river that is, in turn, the mouth of the Manicouagan River?. Keep the solution inside sql tag ```sql [SQL-Query] ``` | mondial_geo | SELECT NAME FROM lake WHERE river = ( SELECT river FROM river WHERE NAME = 'Manicouagan' ) |
Write SQL query to solve given problem: In which group of islands is Rinjani Mountain located?. Keep the solution inside sql tag ```sql [SQL-Query] ``` | mondial_geo | SELECT T1.Islands FROM island AS T1 INNER JOIN mountainOnIsland AS T2 ON T1.Name = T2.Island INNER JOIN mountain AS T3 ON T3.Name = T2.Mountain WHERE T3.Name = 'Rinjani' |
Write SQL query to solve given problem: List all the seas with which the deepest sea merges.. Keep the solution inside sql tag ```sql [SQL-Query] ``` | mondial_geo | SELECT T2.Sea2 FROM sea AS T1 INNER JOIN mergesWith AS T2 ON T1.Name = T2.Sea1 WHERE T1.Name = ( SELECT Name FROM sea ORDER BY Depth DESC LIMIT 1 ) |
Write SQL query to solve given problem: 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?. Keep the solution inside sql tag ```sql [SQL-Query] ``` | mondial_geo | SELECT NAME FROM country WHERE CODE IN ( SELECT country FROM encompasses GROUP BY country HAVING COUNT(continent) > 1 ) AND population / Area <= 10 |
Write SQL query to solve given problem: Of all the countries of the Hindu religion, which has the lowest ratio of people per square meter of surface?. Keep the solution inside sql tag ```sql [SQL-Query] ``` | mondial_geo | SELECT T1.Name FROM country AS T1 INNER JOIN religion AS T2 ON T1.Code = T2.Country WHERE T2.Name = 'Hindu' ORDER BY T1.Population / T1.Area ASC LIMIT 1 |
Write SQL query to solve given problem: On what date did the country have a gross domestic product 400% higher than Saint Kitts and Nevis become independent?. Keep the solution inside sql tag ```sql [SQL-Query] ``` | mondial_geo | SELECT Independence FROM politics WHERE country = ( SELECT country FROM economy WHERE GDP = 1100 ) |
Write SQL query to solve given problem: What is the average population ratio of the countries in which organizations were established in 1947?. Keep the solution inside sql tag ```sql [SQL-Query] ``` | mondial_geo | SELECT T1.Population / T1.Area FROM country AS T1 INNER JOIN organization AS T2 ON T1.Code = T2.Country WHERE STRFTIME('%Y', T2.Established) = '1947' |
Write SQL query to solve given problem: What is the name of Anguilla's capital, and where is it located?. Keep the solution inside sql tag ```sql [SQL-Query] ``` | mondial_geo | SELECT Capital, Province FROM country WHERE Name = 'Anguilla' |
Write SQL query to solve given problem: Which nation has the smallest population, and where is its capital located?. Keep the solution inside sql tag ```sql [SQL-Query] ``` | mondial_geo | SELECT Name, Capital FROM country ORDER BY Population ASC LIMIT 1 |
Write SQL query to solve given problem: How much more space does Asia have than Europe?. Keep the solution inside sql tag ```sql [SQL-Query] ``` | mondial_geo | SELECT MAX(Area) - MIN(Area) FROM continent WHERE Name = 'Asia' OR Name = 'Europe' |
Write SQL query to solve given problem: What is the geographic location of Aarhus city? Please provide the answer with the coordinates of the location.. Keep the solution inside sql tag ```sql [SQL-Query] ``` | mondial_geo | SELECT Longitude, Latitude FROM city WHERE Name = 'Aarhus' |
Write SQL query to solve given problem: What is the population gap between the United Kingdom and Italy?. Keep the solution inside sql tag ```sql [SQL-Query] ``` | mondial_geo | SELECT MAX(Population) - MIN(Population) FROM country WHERE Name = 'United Kingdom' OR Name = 'Italy' |
Write SQL query to solve given problem: 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.. Keep the solution inside sql tag ```sql [SQL-Query] ``` | mondial_geo | SELECT City, Province FROM organization WHERE Name = 'European Bank for Reconstruction and Development' |
Write SQL query to solve given problem: Which lake is the largest in terms of both surface area and depth?. Keep the solution inside sql tag ```sql [SQL-Query] ``` | mondial_geo | SELECT Name FROM lake ORDER BY Area * Depth DESC LIMIT 1 |
Write SQL query to solve given problem: Which two nations are separated from one another by the longest border? Please include the entire names of the nations in your answer.. Keep the solution inside sql tag ```sql [SQL-Query] ``` | mondial_geo | SELECT Country1, Country2 FROM borders ORDER BY Length DESC LIMIT 1 |
Write SQL query to solve given problem: Which nation has the highest GDP? Please give the nation's full name.. Keep the solution inside sql tag ```sql [SQL-Query] ``` | mondial_geo | SELECT T1.Name FROM country AS T1 INNER JOIN economy AS T2 ON T1.Code = T2.Country ORDER BY T2.GDP DESC LIMIT 1 |
Write SQL query to solve given problem: Which nation has the lowest proportion of people who speak an African language? Please state the nation's full name.. Keep the solution inside sql tag ```sql [SQL-Query] ``` | mondial_geo | SELECT T1.Name FROM country AS T1 INNER JOIN ethnicGroup AS T2 ON T1.Code = T2.Country WHERE T2.Name = 'African' ORDER BY T2.Percentage ASC LIMIT 1 |
Write SQL query to solve given problem: Which country has three different religions-Anglicanism, Christianity, and Roman Catholicism and uses 100% English?. Keep the solution inside sql tag ```sql [SQL-Query] ``` | mondial_geo | SELECT T2.Country FROM country AS T1 INNER JOIN religion AS T2 ON T1.Code = T2.Country INNER JOIN language AS T3 ON T3.Country = T2.Country WHERE (T2.Name = 'Anglican' OR T2.Name = 'Christian' OR T2.Name = 'Roman Catholic') AND T3.Name = 'English' AND T3.Percentage = 100 GROUP BY T1.Name HAVING COUNT(T1.Name) = 3 |
Write SQL query to solve given problem: Please list the top 3 countries with the highest inflation rate.. Keep the solution inside sql tag ```sql [SQL-Query] ``` | mondial_geo | SELECT T1.Name FROM country AS T1 INNER JOIN economy AS T2 ON T1.Code = T2.Country ORDER BY T2.Inflation DESC LIMIT 3 |
Write SQL query to solve given problem: Please provide a list of every nation where English is spoken and utilized entirely.. Keep the solution inside sql tag ```sql [SQL-Query] ``` | mondial_geo | SELECT T1.Name FROM country AS T1 INNER JOIN language AS T2 ON T1.Code = T2.Country WHERE T2.Name = 'English' AND T2.Percentage = 100 |
Write SQL query to solve given problem: How many businesses were founded after 1960 in a nation that wasn't independent?. Keep the solution inside sql tag ```sql [SQL-Query] ``` | mondial_geo | SELECT COUNT(T3.Name) FROM country AS T1 INNER JOIN politics AS T2 ON T1.Code = T2.Country INNER JOIN organization AS T3 ON T3.Country = T2.Country WHERE T2.Independence = NULL AND STRFTIME('%Y', T3.Established) > '1960' |
Write SQL query to solve given problem: What province did the river Klaeaelv travel through and how long is the river?. Keep the solution inside sql tag ```sql [SQL-Query] ``` | mondial_geo | SELECT T1.Province FROM city AS T1 INNER JOIN located AS T2 ON T1.Name = T2.City INNER JOIN river AS T3 ON T3.Name = T2.River WHERE T3.Name = 'Klaraelv' |
Write SQL query to solve given problem: How many Italian regions are bordered by the Mediterranean Sea? How deep is the Mediterranean Sea?. Keep the solution inside sql tag ```sql [SQL-Query] ``` | mondial_geo | SELECT COUNT(DISTINCT T2.province), T3.Depth FROM country AS T1 INNER JOIN located AS T2 ON T1.Code = T2.Country INNER JOIN sea AS T3 ON T3.Name = T2.Sea WHERE T1.Code = 'I' AND T3.Name = 'Mediterranean Sea' GROUP BY T3.Depth |
Write SQL query to solve given problem: What nations are considered British Overseas Territories?. Keep the solution inside sql tag ```sql [SQL-Query] ``` | mondial_geo | SELECT name FROM country WHERE CODE IN ( SELECT country FROM politics WHERE government = 'British Overseas Territories' ) |
Write SQL query to solve given problem: Which of the top 3 economies by GDP has the lowest proportion of the economy devoted to agriculture?. Keep the solution inside sql tag ```sql [SQL-Query] ``` | mondial_geo | SELECT T1.Name FROM country AS T1 INNER JOIN economy AS T2 ON T1.Code = T2.Country ORDER BY T2.GDP DESC, T2.Agriculture ASC LIMIT 1 |
Write SQL query to solve given problem: How big is Africa, and how many nations make up the continent?. Keep the solution inside sql tag ```sql [SQL-Query] ``` | mondial_geo | SELECT T1.Area, COUNT(T3.Name) FROM continent AS T1 INNER JOIN encompasses AS T2 ON T1.Name = T2.Continent INNER JOIN country AS T3 ON T3.Code = T2.Country WHERE T1.Name = 'Asia' GROUP BY T1.Name, T1.Area |
Write SQL query to solve given problem: Which United States province is home to the greatest number of corporations' corporate headquarters?. Keep the solution inside sql tag ```sql [SQL-Query] ``` | mondial_geo | SELECT T1.Province FROM country AS T1 INNER JOIN organization AS T2 ON T1.Code = T2.Country WHERE T1.Name = 'United States' GROUP BY T1.Province ORDER BY COUNT(T1.Name) DESC LIMIT 1 |
Write SQL query to solve given problem: What are the most recent three independent nations?. Keep the solution inside sql tag ```sql [SQL-Query] ``` | mondial_geo | SELECT T1.Name FROM country AS T1 INNER JOIN politics AS T2 ON T1.Code = T2.Country ORDER BY T2.Independence DESC LIMIT 3 |
Write SQL query to solve given problem: Please name any three sovereign nations that have been governed by the republic since 1991.. Keep the solution inside sql tag ```sql [SQL-Query] ``` | mondial_geo | SELECT country FROM politics WHERE government = 'republic' AND STRFTIME('%Y', independence) >= '1991' AND country IN ( SELECT country FROM country ) ORDER BY independence LIMIT 3 |
Write SQL query to solve given problem: Which company falls under the category of an associated member? Please provide the organization's full name.. Keep the solution inside sql tag ```sql [SQL-Query] ``` | mondial_geo | SELECT NAME FROM organization WHERE country IN ( SELECT country FROM politics WHERE dependent != '' ) |
Write SQL query to solve given problem: Which nations have a boundary with the Kalahari Desert?. Keep the solution inside sql tag ```sql [SQL-Query] ``` | mondial_geo | SELECT T3.Name FROM desert AS T1 INNER JOIN geo_desert AS T2 ON T1.Name = T2.Desert INNER JOIN country AS T3 ON T3.Code = T2.Country WHERE T1.Name = 'Kalahari' |
Write SQL query to solve given problem: Which desert in Kazakhstan is the largest?. Keep the solution inside sql tag ```sql [SQL-Query] ``` | mondial_geo | SELECT T1.Name FROM desert AS T1 INNER JOIN geo_desert AS T2 ON T1.Name = T2.Desert INNER JOIN country AS T3 ON T3.Code = T2.Country WHERE T3.Name = 'Kazakstan' ORDER BY T1.Area DESC LIMIT 1 |
Write SQL query to solve given problem: What sea does the Baltic Sea converge with, and how deep is the Baltic Sea?. Keep the solution inside sql tag ```sql [SQL-Query] ``` | mondial_geo | SELECT T2.Sea2, T1.Depth FROM sea AS T1 INNER JOIN mergesWith AS T2 ON T1.Name = T2.Sea1 WHERE T1.Name = 'Baltic Sea' |
Write SQL query to solve given problem: Which constitutional monarchy nations saw the greatest growth in the number of organizations after 1907?. Keep the solution inside sql tag ```sql [SQL-Query] ``` | mondial_geo | SELECT T1.Name FROM country AS T1 INNER JOIN organization AS T2 ON T1.Code = T2.Country INNER JOIN politics AS T3 ON T3.Country = T2.Country WHERE STRFTIME('%Y', T2.Established) > '1907' AND T3.Government = 'constitutional monarchy' GROUP BY T1.Name ORDER BY COUNT(DISTINCT T2.Name) DESC LIMIT 1 |
Write SQL query to solve given problem: What kind of mountain is Ampato? Which province and nation does this mountain belong to?. Keep the solution inside sql tag ```sql [SQL-Query] ``` | mondial_geo | SELECT T1.Type, T3.Name, T4.Name FROM mountain AS T1 INNER JOIN geo_mountain AS T2 ON T1.Name = T2.Mountain INNER JOIN province AS T3 ON T3.Name = T2.Province INNER JOIN country AS T4 ON T3.Country = T4.Code WHERE T1.Name = 'Ampato' |
Write SQL query to solve given problem: Please provide a list of every volcano mountain in the province of Ecuador.. Keep the solution inside sql tag ```sql [SQL-Query] ``` | mondial_geo | SELECT T1.Name FROM mountain AS T1 INNER JOIN geo_mountain AS T2 ON T1.Name = T2.Mountain INNER JOIN province AS T3 ON T3.Name = T2.Province WHERE T3.Name = 'Ecuador' AND T1.Type = 'volcano' |
Write SQL query to solve given problem: 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.. Keep the solution inside sql tag ```sql [SQL-Query] ``` | mondial_geo | SELECT SUM(IIF(government = 'parliamentary democracy', 1, 0)) , CAST(SUM(IIF(government = 'parliamentary democracy', 1, 0)) AS REAL) * 100 / COUNT(*) FROM politics AS t1 WHERE STRFTIME('%Y', independence) >= '1993' |
Write SQL query to solve given problem: 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.. Keep the solution inside sql tag ```sql [SQL-Query] ``` | mondial_geo | SELECT CAST(SUM(CASE WHEN T1.Length > 3000 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.Name) FROM river AS T1 INNER JOIN located AS T2 ON T1.Name = T2.River INNER JOIN country AS T3 ON T3.Code = T2.Country |
Write SQL query to solve given problem: What is the full name of ABEDA and when was it established?. Keep the solution inside sql tag ```sql [SQL-Query] ``` | mondial_geo | SELECT Name, Established FROM organization WHERE Abbreviation = 'ABEDA' |
Write SQL query to solve given problem: Name all the organisations that were established from 1970 to 1980.. Keep the solution inside sql tag ```sql [SQL-Query] ``` | mondial_geo | SELECT Name FROM organization WHERE STRFTIME('%Y', Established) BETWEEN '1970' AND '1980' |
Write SQL query to solve given problem: Provide a list of all organisations with headquarters in London?. Keep the solution inside sql tag ```sql [SQL-Query] ``` | mondial_geo | SELECT Name FROM organization WHERE City = 'London' |
Write SQL query to solve given problem: For each organisations with headquarters in the USA, provide the its full name and the city where the headquarter is located at.. Keep the solution inside sql tag ```sql [SQL-Query] ``` | mondial_geo | SELECT Name, City FROM organization WHERE Country = 'USA' |
Write SQL query to solve given problem: Name the first organisation established in the Paris city. State its abbreviation, full name and date of establishment.. Keep the solution inside sql tag ```sql [SQL-Query] ``` | mondial_geo | SELECT Abbreviation, Name, Established FROM organization WHERE City = 'Paris' ORDER BY Established ASC LIMIT 1 |
Write SQL query to solve given problem: List all the organisations that where its name contains 'United Nation'. State its full name and its headquarter city.. Keep the solution inside sql tag ```sql [SQL-Query] ``` | mondial_geo | SELECT Name, City FROM organization WHERE Name LIKE '%United Nation%' |
Write SQL query to solve given problem: Which 2 countries' border span across the longest length? Provide the country's full name.. Keep the solution inside sql tag ```sql [SQL-Query] ``` | mondial_geo | SELECT T1.Name, T3.Name FROM country AS T1 INNER JOIN borders AS T2 ON T1.Code = T2.Country1 INNER JOIN country AS T3 ON T3.Code = T2.Country2 ORDER BY T2.Length DESC LIMIT 1 |
Write SQL query to solve given problem: Name all countries in which have border with Bulgaria.. Keep the solution inside sql tag ```sql [SQL-Query] ``` | mondial_geo | SELECT T3.Name FROM country AS T1 INNER JOIN borders AS T2 ON T1.Code = T2.Country1 INNER JOIN country AS T3 ON T3.Code = T2.Country2 WHERE T1.Name = 'Bulgaria' |
Write SQL query to solve given problem: State all countries with border greater than 4,000. List the full country name.. Keep the solution inside sql tag ```sql [SQL-Query] ``` | mondial_geo | SELECT T1.Name FROM country AS T1 INNER JOIN borders AS T2 ON T1.Code = T2.Country1 WHERE T2.Length > 4000 |
Write SQL query to solve given problem: Among the country member of 'IOC' organization, which country has the most population?. Keep the solution inside sql tag ```sql [SQL-Query] ``` | mondial_geo | SELECT T2.Name FROM isMember AS T1 INNER JOIN country AS T2 ON T1.Country = T2.Code WHERE T1.Organization = 'IOC' ORDER BY T2.Population DESC LIMIT 1 |
Write SQL query to solve given problem: List all members and member type of the Islamic Development Bank.. Keep the solution inside sql tag ```sql [SQL-Query] ``` | mondial_geo | SELECT T2.Country, T2.Type FROM organization AS T1 INNER JOIN isMember AS T2 ON T1.Abbreviation = T2.Organization INNER JOIN country AS T3 ON T2.Country = T3.Code WHERE T1.Name = 'Islamic Development Bank' |
Write SQL query to solve given problem: State the area and population of the country where Asia Pacific Economic Cooperation headquarter is located.. Keep the solution inside sql tag ```sql [SQL-Query] ``` | mondial_geo | SELECT T2.Name, T2.Population FROM organization AS T1 INNER JOIN country AS T2 ON T1.Country = T2.Code WHERE T1.Name = 'Asia Pacific Economic Cooperation' |
Write SQL query to solve given problem: What is the organization(s) that has 'National Society' as member type.. Keep the solution inside sql tag ```sql [SQL-Query] ``` | mondial_geo | SELECT T1.Name FROM organization AS T1 INNER JOIN isMember AS T2 ON T2.Country = T1.Country INNER JOIN country AS T3 ON T2.Country = T3.Code WHERE T2.Type = 'National Society' |
Write SQL query to solve given problem: Which country has the least organization membership?. Keep the solution inside sql tag ```sql [SQL-Query] ``` | mondial_geo | SELECT country FROM organization WHERE country IN ( SELECT Code FROM country ) GROUP BY country ORDER BY COUNT(NAME) LIMIT 1 |
Write SQL query to solve given problem: List all countries with 'Category III' membership in 'IFAD' organization. Please also provide the capital of the country.. Keep the solution inside sql tag ```sql [SQL-Query] ``` | mondial_geo | SELECT Name, Capital FROM country WHERE Code IN ( SELECT Country FROM isMember WHERE type = 'Category III' AND Organization = 'IFAD' ) |
Write SQL query to solve given problem: Name the organizations with the most members.. Keep the solution inside sql tag ```sql [SQL-Query] ``` | mondial_geo | SELECT T1.Name FROM organization AS T1 INNER JOIN isMember AS T2 ON T2.Country = T1.Country INNER JOIN country AS T3 ON T2.Country = T3.Code GROUP BY T1.Name ORDER BY COUNT(T3.Name) DESC LIMIT 1 |
Write SQL query to solve given problem: What is the capital of Australia? Is the capital a headquarter to any organization? Name the organization(s).. Keep the solution inside sql tag ```sql [SQL-Query] ``` | mondial_geo | SELECT T2.Capital, T1.Name FROM organization AS T1 INNER JOIN country AS T2 ON T1.City = T2.Capital WHERE T2.Name = 'Australia' |
Write SQL query to solve given problem: Among the organizations where headquarters are in the 'USA', what is the percentage of the them are in 'Washington'?. Keep the solution inside sql tag ```sql [SQL-Query] ``` | mondial_geo | SELECT CAST(SUM(CASE WHEN T2.City = 'Washington' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T2.City) FROM country AS T1 INNER JOIN organization AS T2 ON T1.Code = T2.Country WHERE T2.Country = 'USA' |
Write SQL query to solve given problem: What is the border length between 'USA' and 'MEX'. Keep the solution inside sql tag ```sql [SQL-Query] ``` | mondial_geo | SELECT Length FROM borders WHERE Country1 = 'MEX' AND Country2 = 'USA' |
Write SQL query to solve given problem: What is the newest established organization where Singapore is a member of?. Keep the solution inside sql tag ```sql [SQL-Query] ``` | mondial_geo | SELECT T3.Name FROM country AS T1 INNER JOIN isMember AS T2 ON T1.Code = T2.Country INNER JOIN organization AS T3 ON T3.Country = T2.Country WHERE T1.Name = 'Singapore' ORDER BY T3.Established DESC LIMIT 1 |
Write SQL query to solve given problem: Provide the population of the city of the 'World Tourism Organization' headquarter.. Keep the solution inside sql tag ```sql [SQL-Query] ``` | mondial_geo | SELECT T2.Population FROM organization AS T1 INNER JOIN city AS T2 ON T1.City = T2.Name WHERE T1.Name = 'World Tourism Organization' |
Write SQL query to solve given problem: What is the height of mountain Dhaulagiri located and in which province is it located?. Keep the solution inside sql tag ```sql [SQL-Query] ``` | mondial_geo | SELECT T1.Height, T2.Province FROM mountain AS T1 INNER JOIN geo_mountain AS T2 ON T1.Name = T2.Mountain WHERE T1.Name = 'Dhaulagiri' |
Write SQL query to solve given problem: List all the name and height of all mountains in Alaska. Keep the solution inside sql tag ```sql [SQL-Query] ``` | mondial_geo | SELECT T1.Name, T1.Height FROM mountain AS T1 INNER JOIN geo_mountain AS T2 ON T1.Name = T2.Mountain WHERE T2.Province = 'Alaska' |
Write SQL query to solve given problem: What is the population of the country with the highest infant mortality rate?. Keep the solution inside sql tag ```sql [SQL-Query] ``` | mondial_geo | SELECT T1.Population FROM country AS T1 INNER JOIN population AS T2 ON T1.Code = T2.Country ORDER BY T2.Infant_Mortality DESC LIMIT 1 |
Write SQL query to solve given problem: State the inflation rate of Greece.. Keep the solution inside sql tag ```sql [SQL-Query] ``` | mondial_geo | SELECT T2.Inflation FROM country AS T1 INNER JOIN economy AS T2 ON T1.Code = T2.Country WHERE T1.Name = 'Greece' |
Write SQL query to solve given problem: Find the government type for the country with the highest percentage GDP in Agriculture.. Keep the solution inside sql tag ```sql [SQL-Query] ``` | mondial_geo | SELECT T3.Government FROM country AS T1 INNER JOIN economy AS T2 ON T1.Code = T2.Country INNER JOIN politics AS T3 ON T3.Country = T2.Country ORDER BY T2.Agriculture DESC LIMIT 1 |
Write SQL query to solve given problem: List the full name its capital of all the countries with parliamentary democracy government.. Keep the solution inside sql tag ```sql [SQL-Query] ``` | mondial_geo | SELECT T1.Capital FROM country AS T1 INNER JOIN politics AS T2 ON T1.Code = T2.Country WHERE T2.Government = 'parliamentary democracy' |
Write SQL query to solve given problem: Provide a full list of countries and its population with more than 70% of Chinese.. Keep the solution inside sql tag ```sql [SQL-Query] ``` | mondial_geo | SELECT T1.Name, T1.Population * T2.Percentage FROM country AS T1 INNER JOIN ethnicGroup AS T2 ON T1.Code = T2.Country WHERE T2.Name = 'Chinese' AND T2.Percentage > 70 |
Write SQL query to solve given problem: In which city has the greatest population, what is its percentage to its country population?. Keep the solution inside sql tag ```sql [SQL-Query] ``` | mondial_geo | SELECT T3.Name, CAST(T3.Population AS REAL) * 100 / T1.Population FROM country AS T1 INNER JOIN province AS T2 ON T1.Code = T2.Country INNER JOIN city AS T3 ON T3.Country = T2.Country ORDER BY T3.Population DESC LIMIT 1 |
Write SQL query to solve given problem: When did the United States of America attained it's Independence?. Keep the solution inside sql tag ```sql [SQL-Query] ``` | mondial_geo | SELECT T1.Independence FROM politics AS T1 INNER JOIN country AS T2 ON T1.Country = T2.Code WHERE T2.Name = 'United States' |
Write SQL query to solve given problem: What is the peak height of the highest volcanic type of mountain? Give it's name.. Keep the solution inside sql tag ```sql [SQL-Query] ``` | mondial_geo | SELECT Height, Name FROM mountain WHERE Type = 'volcanic' ORDER BY Height DESC LIMIT 1 |
Write SQL query to solve given problem: What is the name of the most recently founded organization in Saudi Arabia?. Keep the solution inside sql tag ```sql [SQL-Query] ``` | mondial_geo | SELECT T1.Name FROM organization AS T1 INNER JOIN country AS T2 ON T1.Country = T2.Code WHERE T2.Name = 'Saudi Arabia' ORDER BY T1.Established DESC LIMIT 1 |
Write SQL query to solve given problem: Which country has the 5th highest infant mortality rate?. Keep the solution inside sql tag ```sql [SQL-Query] ``` | mondial_geo | SELECT T2.Name FROM population AS T1 INNER JOIN country AS T2 ON T1.Country = T2.Code ORDER BY T1.Infant_Mortality DESC LIMIT 4, 1 |
Write SQL query to solve given problem: Which country has the widest range of religious practices?. Keep the solution inside sql tag ```sql [SQL-Query] ``` | mondial_geo | SELECT T1.Name FROM country AS T1 INNER JOIN religion AS T2 ON T1.Code = T2.Country GROUP BY T1.Name ORDER BY COUNT(DISTINCT T2.Name) DESC LIMIT 1 |
Write SQL query to solve given problem: What river has the 17th-longest length overall? Specify it's length.. Keep the solution inside sql tag ```sql [SQL-Query] ``` | mondial_geo | SELECT Name, Length FROM river ORDER BY Length DESC LIMIT 16, 1 |
Write SQL query to solve given problem: When did the country whose capital is Nouakchott attained it's independence?. Keep the solution inside sql tag ```sql [SQL-Query] ``` | mondial_geo | SELECT T2.Independence FROM country AS T1 INNER JOIN politics AS T2 ON T1.Code = T2.Country WHERE T1.Capital = 'Nouakchott' |
Write SQL query to solve given problem: What is the name of the country with the smallest population, and what is its gross domestic product?. Keep the solution inside sql tag ```sql [SQL-Query] ``` | mondial_geo | SELECT T1.Name, T2.GDP FROM country AS T1 INNER JOIN economy AS T2 ON T1.Code = T2.Country ORDER BY T1.Population ASC LIMIT 1 |
Write SQL query to solve given problem: Which Zaire region is home to the country's deepest lake's Name it and list its depth.. Keep the solution inside sql tag ```sql [SQL-Query] ``` | mondial_geo | SELECT T3.Name, T1.Name, T1.Depth FROM lake AS T1 INNER JOIN located AS T2 ON T1.Name = T2.Lake INNER JOIN province AS T3 ON T3.Name = T2.Province INNER JOIN country AS T4 ON T4.Code = T3.Country WHERE T4.Name = 'Zaire' |
Write SQL query to solve given problem: What is the maximal elevation of the summit of the shortest mountain that can be found in the island of Madagaskar? Indicate what type of mountain it is.. Keep the solution inside sql tag ```sql [SQL-Query] ``` | mondial_geo | SELECT T3.Height, T3.Type FROM island AS T1 INNER JOIN mountainOnIsland AS T2 ON T1.Name = T2.Island INNER JOIN mountain AS T3 ON T3.Name = T2.Mountain WHERE T1.Name = 'Madagaskar' ORDER BY T3.Height DESC LIMIT 1 |
Write SQL query to solve given problem: Which nation, with a population ranging from 60,000,000 to 99,000,000, has the greatest gross domestic product?. Keep the solution inside sql tag ```sql [SQL-Query] ``` | mondial_geo | SELECT T1.Name, T2.GDP FROM country AS T1 INNER JOIN economy AS T2 ON T1.Code = T2.Country WHERE T1.Population BETWEEN 60000000 AND 90000000 ORDER BY T2.GDP DESC LIMIT 1 |
Write SQL query to solve given problem: Which Asian country gave its agricultural sector the largest share of its gross domestic product?. Keep the solution inside sql tag ```sql [SQL-Query] ``` | mondial_geo | SELECT T2.Country FROM continent AS T1 INNER JOIN encompasses AS T2 ON T1.Name = T2.Continent INNER JOIN country AS T3 ON T2.Country = T3.Code INNER JOIN economy AS T4 ON T4.Country = T3.Code WHERE T1.Name = 'Asia' ORDER BY T4.Agriculture DESC LIMIT 1 |
Write SQL query to solve given problem: What form of governance does the least prosperous nation in the world have?. Keep the solution inside sql tag ```sql [SQL-Query] ``` | mondial_geo | SELECT T3.Government FROM country AS T1 INNER JOIN economy AS T2 ON T1.Code = T2.Country INNER JOIN politics AS T3 ON T3.Country = T2.Country WHERE T2.GDP IS NOT NULL ORDER BY T2.GDP ASC LIMIT 1 |
Write SQL query to solve given problem: What year saw the greatest number of organizations created on the European continent?. Keep the solution inside sql tag ```sql [SQL-Query] ``` | mondial_geo | SELECT STRFTIME('%Y', T4.Established) FROM continent AS T1 INNER JOIN encompasses AS T2 ON T1.Name = T2.Continent INNER JOIN country AS T3 ON T2.Country = T3.Code INNER JOIN organization AS T4 ON T4.Country = T3.Code WHERE T1.Name = 'Europe' GROUP BY STRFTIME('%Y', T4.Established) ORDER BY COUNT(T4.Name) DESC LIMIT 1 |
Write SQL query to solve given problem: What other country does the most populated nation in the world share a border with and how long is the border between the two nations?. Keep the solution inside sql tag ```sql [SQL-Query] ``` | mondial_geo | SELECT T2.Country2, T2.Length FROM country AS T1 INNER JOIN borders AS T2 ON T1.Code = T2.Country1 INNER JOIN country AS T3 ON T3.Code = T2.Country2 WHERE T1.Name = ( SELECT Name FROM country ORDER BY Population DESC LIMIT 1 ) |
Write SQL query to solve given problem: What is the population density of the nation whose capital city is in the Distrito Federal province, and what portion of its gross domestic product is devoted to its industries?. Keep the solution inside sql tag ```sql [SQL-Query] ``` | mondial_geo | SELECT T1.Population / T1.Area, T2.Industry FROM country AS T1 INNER JOIN economy AS T2 ON T1.Code = T2.Country WHERE T1.Province = 'Distrito Federal' |
Write SQL query to solve given problem: Lists all governments with a parliamentary democracy that achieved their independence between 01/01/1950 and 12/31/1999.. Keep the solution inside sql tag ```sql [SQL-Query] ``` | mondial_geo | SELECT * FROM politics WHERE STRFTIME('%Y', Independence) BETWEEN '1950' AND '1999' AND Government = 'parliamentary democracy' |
Write SQL query to solve given problem: What percentage of countries became independent during the year 1960?. Keep the solution inside sql tag ```sql [SQL-Query] ``` | mondial_geo | SELECT CAST(SUM(CASE WHEN STRFTIME('%Y', Independence) = '1960' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(Country) FROM politics |
Write SQL query to solve given problem: List all deserts that are not between latitudes 30 and 40.. Keep the solution inside sql tag ```sql [SQL-Query] ``` | mondial_geo | SELECT Name FROM desert WHERE Latitude < 30 OR Latitude > 40 |
Write SQL query to solve given problem: Indicate the coordinates of all the deserts whose area is in more than one country.. Keep the solution inside sql tag ```sql [SQL-Query] ``` | mondial_geo | SELECT T1.Latitude, T1.Longitude FROM desert AS T1 INNER JOIN geo_desert AS T2 ON T1.Name = T2.Desert GROUP BY T1.Name, T1.Latitude, T1.Longitude HAVING COUNT(T1.Name) > 1 |
Write SQL query to solve given problem: What is the provincial capital of the province with a population of less than 80,000 that has the highest average population per area?. Keep the solution inside sql tag ```sql [SQL-Query] ``` | mondial_geo | SELECT CapProv FROM province WHERE Population < 80000 ORDER BY Population / Area DESC LIMIT 1 |
Write SQL query to solve given problem: How many customers have never married?. Keep the solution inside sql tag ```sql [SQL-Query] ``` | software_company | SELECT COUNT(ID) FROM Customers WHERE MARITAL_STATUS = 'Never-married' |
Write SQL query to solve given problem: Among all the customers, how many of them are teenagers?. Keep the solution inside sql tag ```sql [SQL-Query] ``` | software_company | SELECT COUNT(ID) FROM Customers WHERE age >= 13 AND age <= 19 |
Write SQL query to solve given problem: Please list the occupations of the customers with an education level of 11.. Keep the solution inside sql tag ```sql [SQL-Query] ``` | software_company | SELECT DISTINCT OCCUPATION FROM Customers WHERE EDUCATIONNUM = 11 |
Write SQL query to solve given problem: Of the first 60,000 customers' responses to the incentive mailing sent by the marketing department, how many of them are considered a true response?. Keep the solution inside sql tag ```sql [SQL-Query] ``` | software_company | SELECT COUNT(REFID) custmoer_number FROM Mailings1_2 WHERE RESPONSE = 'true' |
Write SQL query to solve given problem: Among the customers over 30, how many of them are Machine-op-inspcts?. Keep the solution inside sql tag ```sql [SQL-Query] ``` | software_company | SELECT COUNT(ID) FROM Customers WHERE OCCUPATION = 'Machine-op-inspct' AND age > 30 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.