context
stringlengths
11
9.12k
question
stringlengths
0
1.06k
SQL
stringlengths
2
4.44k
source
stringclasses
28 values
CREATE TABLE world (ID integer, Name text, CountryCode text, District text, Population integer, Code text, Name text, Continent text, Region text, SurfaceArea real, IndepYear integer, Population integer, LifeExpectancy real, GNP real, GNPOld real, LocalName text, GovernmentForm text, HeadOfState text, Capital integer, Code2 text, CountryCode text, Language text, IsOfficial text, Percentage real)
What is the capital city and population of San Marino?
SELECT T1.Capital, T2.Population FROM Country AS T1 INNER JOIN City AS T2 ON T1.Code = T2.CountryCode WHERE T1.Name = 'San Marino'
bird
CREATE TABLE world (ID integer, Name text, CountryCode text, District text, Population integer, Code text, Name text, Continent text, Region text, SurfaceArea real, IndepYear integer, Population integer, LifeExpectancy real, GNP real, GNPOld real, LocalName text, GovernmentForm text, HeadOfState text, Capital integer, Code2 text, CountryCode text, Language text, IsOfficial text, Percentage real)
List the languages used in Turkmenistan.
SELECT T2.Language FROM Country AS T1 INNER JOIN CountryLanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.Name = 'Turkmenistan'
bird
CREATE TABLE world (ID integer, Name text, CountryCode text, District text, Population integer, Code text, Name text, Continent text, Region text, SurfaceArea real, IndepYear integer, Population integer, LifeExpectancy real, GNP real, GNPOld real, LocalName text, GovernmentForm text, HeadOfState text, Capital integer, Code2 text, CountryCode text, Language text, IsOfficial text, Percentage real)
Provide the name, capital city and its official language of the country with the highest life expectancy.
SELECT T1.Name, T1.Capital, T2.Language FROM Country AS T1 INNER JOIN CountryLanguage AS T2 ON T1.Code = T2.CountryCode INNER JOIN City AS T3 ON T1.Code = T3.CountryCode WHERE T2.IsOfficial = 'T' ORDER BY T1.LifeExpectancy DESC LIMIT 1
bird
CREATE TABLE world (ID integer, Name text, CountryCode text, District text, Population integer, Code text, Name text, Continent text, Region text, SurfaceArea real, IndepYear integer, Population integer, LifeExpectancy real, GNP real, GNPOld real, LocalName text, GovernmentForm text, HeadOfState text, Capital integer, Code2 text, CountryCode text, Language text, IsOfficial text, Percentage real)
List the countries and their official languages in Antarctica.
SELECT T1.Name, T2.Language FROM Country AS T1 INNER JOIN CountryLanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.Continent = 'Antarctica' AND T2.IsOfficial = 'T'
bird
CREATE TABLE world (ID integer, Name text, CountryCode text, District text, Population integer, Code text, Name text, Continent text, Region text, SurfaceArea real, IndepYear integer, Population integer, LifeExpectancy real, GNP real, GNPOld real, LocalName text, GovernmentForm text, HeadOfState text, Capital integer, Code2 text, CountryCode text, Language text, IsOfficial text, Percentage real)
List any five countries which use English as an official language.
SELECT T1.Name FROM Country AS T1 INNER JOIN CountryLanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = 'English' AND T2.IsOfficial = 'T' LIMIT 5
bird
CREATE TABLE world (ID integer, Name text, CountryCode text, District text, Population integer, Code text, Name text, Continent text, Region text, SurfaceArea real, IndepYear integer, Population integer, LifeExpectancy real, GNP real, GNPOld real, LocalName text, GovernmentForm text, HeadOfState text, Capital integer, Code2 text, CountryCode text, Language text, IsOfficial text, Percentage real)
Among the languages used in Baltic Countries, provide the languages which are used by over 80%.
SELECT T2.Language FROM Country AS T1 INNER JOIN CountryLanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.Region = 'Baltic Countries' AND T2.Percentage > 80
bird
CREATE TABLE world (ID integer, Name text, CountryCode text, District text, Population integer, Code text, Name text, Continent text, Region text, SurfaceArea real, IndepYear integer, Population integer, LifeExpectancy real, GNP real, GNPOld real, LocalName text, GovernmentForm text, HeadOfState text, Capital integer, Code2 text, CountryCode text, Language text, IsOfficial text, Percentage real)
Among the languages used in Baltic Countries, provide the languages which are used by over 80%.
SELECT T2.Language FROM Country AS T1 INNER JOIN CountryLanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.Region = 'Baltic Countries' AND T2.Percentage > 80
bird
CREATE TABLE world (ID integer, Name text, CountryCode text, District text, Population integer, Code text, Name text, Continent text, Region text, SurfaceArea real, IndepYear integer, Population integer, LifeExpectancy real, GNP real, GNPOld real, LocalName text, GovernmentForm text, HeadOfState text, Capital integer, Code2 text, CountryCode text, Language text, IsOfficial text, Percentage real)
Provide the name, located country, and life expectancy of the most populated city
SELECT T2.Name, T1.Code, T1.LifeExpectancy FROM Country AS T1 INNER JOIN City AS T2 ON T1.Code = T2.CountryCode ORDER BY T2.Population DESC LIMIT 1
bird
CREATE TABLE world (ID integer, Name text, CountryCode text, District text, Population integer, Code text, Name text, Continent text, Region text, SurfaceArea real, IndepYear integer, Population integer, LifeExpectancy real, GNP real, GNPOld real, LocalName text, GovernmentForm text, HeadOfState text, Capital integer, Code2 text, CountryCode text, Language text, IsOfficial text, Percentage real)
Describe the capital city and languages used in the country with the shortest life expectancy.
SELECT T1.Capital, T2.Language FROM Country AS T1 INNER JOIN CountryLanguage AS T2 ON T1.Code = T2.CountryCode INNER JOIN City AS T3 ON T1.Code = T3.CountryCode ORDER BY T1.LifeExpectancy LIMIT 1
bird
CREATE TABLE world (ID integer, Name text, CountryCode text, District text, Population integer, Code text, Name text, Continent text, Region text, SurfaceArea real, IndepYear integer, Population integer, LifeExpectancy real, GNP real, GNPOld real, LocalName text, GovernmentForm text, HeadOfState text, Capital integer, Code2 text, CountryCode text, Language text, IsOfficial text, Percentage real)
Provide the country, population, capital city, and official language of the country with the smallest surface area.
SELECT T1.Name, T1.Population, T1.Capital, T2.Language FROM Country AS T1 INNER JOIN CountryLanguage AS T2 ON T1.Code = T2.CountryCode INNER JOIN City AS T3 ON T1.Code = T3.CountryCode WHERE T2.IsOfficial = 'T' ORDER BY T1.SurfaceArea LIMIT 1
bird
CREATE TABLE world (ID integer, Name text, CountryCode text, District text, Population integer, Code text, Name text, Continent text, Region text, SurfaceArea real, IndepYear integer, Population integer, LifeExpectancy real, GNP real, GNPOld real, LocalName text, GovernmentForm text, HeadOfState text, Capital integer, Code2 text, CountryCode text, Language text, IsOfficial text, Percentage real)
How many percent of countries in North America use English?
SELECT CAST(SUM(IIF(T2.Language = 'English', 1, 0)) AS REAL) * 100 / COUNT(T1.Code) FROM Country AS T1 INNER JOIN CountryLanguage AS T2 ON T1.Code = T2.CountryCode
bird
CREATE TABLE world (ID integer, Name text, CountryCode text, District text, Population integer, Code text, Name text, Continent text, Region text, SurfaceArea real, IndepYear integer, Population integer, LifeExpectancy real, GNP real, GNPOld real, LocalName text, GovernmentForm text, HeadOfState text, Capital integer, Code2 text, CountryCode text, Language text, IsOfficial text, Percentage real)
List the district name of the city with the smallest population.
SELECT District FROM City ORDER BY Population LIMIT 1
bird
CREATE TABLE world (ID integer, Name text, CountryCode text, District text, Population integer, Code text, Name text, Continent text, Region text, SurfaceArea real, IndepYear integer, Population integer, LifeExpectancy real, GNP real, GNPOld real, LocalName text, GovernmentForm text, HeadOfState text, Capital integer, Code2 text, CountryCode text, Language text, IsOfficial text, Percentage real)
In which continent does the country with the smallest surface area belongs?
SELECT Continent FROM Country ORDER BY SurfaceArea LIMIT 1
bird
CREATE TABLE world (ID integer, Name text, CountryCode text, District text, Population integer, Code text, Name text, Continent text, Region text, SurfaceArea real, IndepYear integer, Population integer, LifeExpectancy real, GNP real, GNPOld real, LocalName text, GovernmentForm text, HeadOfState text, Capital integer, Code2 text, CountryCode text, Language text, IsOfficial text, Percentage real)
Who is the head of the state where the most crowded city belongs?
SELECT T1.HeadOfState FROM Country AS T1 INNER JOIN City AS T2 ON T1.Code = T2.CountryCode ORDER BY T2.Population DESC LIMIT 1
bird
CREATE TABLE world (ID integer, Name text, CountryCode text, District text, Population integer, Code text, Name text, Continent text, Region text, SurfaceArea real, IndepYear integer, Population integer, LifeExpectancy real, GNP real, GNPOld real, LocalName text, GovernmentForm text, HeadOfState text, Capital integer, Code2 text, CountryCode text, Language text, IsOfficial text, Percentage real)
Among the countries that officially use the English language, what country has the highest capital?
SELECT T1.Code FROM Country AS T1 INNER JOIN CountryLanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = 'English' AND T2.IsOfficial = 'T' ORDER BY T1.Capital DESC LIMIT 1
bird
CREATE TABLE world (ID integer, Name text, CountryCode text, District text, Population integer, Code text, Name text, Continent text, Region text, SurfaceArea real, IndepYear integer, Population integer, LifeExpectancy real, GNP real, GNPOld real, LocalName text, GovernmentForm text, HeadOfState text, Capital integer, Code2 text, CountryCode text, Language text, IsOfficial text, Percentage real)
List down the cities that belong to the country with a life expectancy of 66.4.
SELECT T2.Name FROM Country AS T1 INNER JOIN City AS T2 ON T1.Code = T2.CountryCode WHERE T1.LifeExpectancy = 66.4
bird
CREATE TABLE world (ID integer, Name text, CountryCode text, District text, Population integer, Code text, Name text, Continent text, Region text, SurfaceArea real, IndepYear integer, Population integer, LifeExpectancy real, GNP real, GNPOld real, LocalName text, GovernmentForm text, HeadOfState text, Capital integer, Code2 text, CountryCode text, Language text, IsOfficial text, Percentage real)
Give the head of the state of the country with the lowest percentage use of English as their language.
SELECT T1.HeadOfState FROM Country AS T1 INNER JOIN CountryLanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = 'English' ORDER BY T2.Percentage LIMIT 1
bird
CREATE TABLE world (ID integer, Name text, CountryCode text, District text, Population integer, Code text, Name text, Continent text, Region text, SurfaceArea real, IndepYear integer, Population integer, LifeExpectancy real, GNP real, GNPOld real, LocalName text, GovernmentForm text, HeadOfState text, Capital integer, Code2 text, CountryCode text, Language text, IsOfficial text, Percentage real)
What is the surface area of the country where Sutton Coldfield city belongs?
SELECT T1.SurfaceArea FROM Country AS T1 INNER JOIN City AS T2 ON T1.Code = T2.CountryCode WHERE T2.Name = 'Sutton Coldfield'
bird
CREATE TABLE world (ID integer, Name text, CountryCode text, District text, Population integer, Code text, Name text, Continent text, Region text, SurfaceArea real, IndepYear integer, Population integer, LifeExpectancy real, GNP real, GNPOld real, LocalName text, GovernmentForm text, HeadOfState text, Capital integer, Code2 text, CountryCode text, Language text, IsOfficial text, Percentage real)
List down the languages of the countries that have population below 8000.
SELECT T2.Language FROM Country AS T1 INNER JOIN CountryLanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.Population < 8000
bird
CREATE TABLE world (ID integer, Name text, CountryCode text, District text, Population integer, Code text, Name text, Continent text, Region text, SurfaceArea real, IndepYear integer, Population integer, LifeExpectancy real, GNP real, GNPOld real, LocalName text, GovernmentForm text, HeadOfState text, Capital integer, Code2 text, CountryCode text, Language text, IsOfficial text, Percentage real)
What are the official languages used in Belgium?
SELECT T2.Language FROM Country AS T1 INNER JOIN CountryLanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.Name = 'Belgium' AND T2.IsOfficial = 'T'
bird
CREATE TABLE world (ID integer, Name text, CountryCode text, District text, Population integer, Code text, Name text, Continent text, Region text, SurfaceArea real, IndepYear integer, Population integer, LifeExpectancy real, GNP real, GNPOld real, LocalName text, GovernmentForm text, HeadOfState text, Capital integer, Code2 text, CountryCode text, Language text, IsOfficial text, Percentage real)
Give the cities and district names that belong to the country with Hajastan as its local name.
SELECT T2.Name, T2.District FROM Country AS T1 INNER JOIN City AS T2 ON T1.Code = T2.CountryCode WHERE T1.LocalName = 'Hajastan'
bird
CREATE TABLE world (ID integer, Name text, CountryCode text, District text, Population integer, Code text, Name text, Continent text, Region text, SurfaceArea real, IndepYear integer, Population integer, LifeExpectancy real, GNP real, GNPOld real, LocalName text, GovernmentForm text, HeadOfState text, Capital integer, Code2 text, CountryCode text, Language text, IsOfficial text, Percentage real)
How many languages are used in Cyprus?
SELECT SUM(CASE WHEN T1.Name = 'Cyprus' THEN 1 ELSE 0 END) FROM Country AS T1 INNER JOIN CountryLanguage AS T2 ON T1.Code = T2.CountryCode
bird
CREATE TABLE world (ID integer, Name text, CountryCode text, District text, Population integer, Code text, Name text, Continent text, Region text, SurfaceArea real, IndepYear integer, Population integer, LifeExpectancy real, GNP real, GNPOld real, LocalName text, GovernmentForm text, HeadOfState text, Capital integer, Code2 text, CountryCode text, Language text, IsOfficial text, Percentage real)
Provide the language used by the people of Belize.
SELECT T2.Language FROM Country AS T1 INNER JOIN CountryLanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.Name = 'Belize'
bird
CREATE TABLE world (ID integer, Name text, CountryCode text, District text, Population integer, Code text, Name text, Continent text, Region text, SurfaceArea real, IndepYear integer, Population integer, LifeExpectancy real, GNP real, GNPOld real, LocalName text, GovernmentForm text, HeadOfState text, Capital integer, Code2 text, CountryCode text, Language text, IsOfficial text, Percentage real)
List down the districts belong to the country headed by Adolf Ogi.
SELECT T2.District FROM Country AS T1 INNER JOIN City AS T2 ON T1.Code = T2.CountryCode WHERE T1.HeadOfState = 'Adolf Ogi'
bird
CREATE TABLE world (ID integer, Name text, CountryCode text, District text, Population integer, Code text, Name text, Continent text, Region text, SurfaceArea real, IndepYear integer, Population integer, LifeExpectancy real, GNP real, GNPOld real, LocalName text, GovernmentForm text, HeadOfState text, Capital integer, Code2 text, CountryCode text, Language text, IsOfficial text, Percentage real)
Who is the head of the country where Santa Catarina district belongs?
SELECT T1.HeadOfState FROM Country AS T1 INNER JOIN City AS T2 ON T1.Code = T2.CountryCode WHERE T2.District = 'Santa Catarina'
bird
CREATE TABLE world (ID integer, Name text, CountryCode text, District text, Population integer, Code text, Name text, Continent text, Region text, SurfaceArea real, IndepYear integer, Population integer, LifeExpectancy real, GNP real, GNPOld real, LocalName text, GovernmentForm text, HeadOfState text, Capital integer, Code2 text, CountryCode text, Language text, IsOfficial text, Percentage real)
Among the countries that have GNP greater than 1500, what is the percentage of the countries have English as its language?
SELECT CAST(SUM(IIF(T2.Language = 'English', 1, 0)) AS REAL) * 100 / COUNT(T1.Code) FROM Country AS T1 INNER JOIN CountryLanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.GNP > 1500
bird
CREATE TABLE world (ID integer, Name text, CountryCode text, District text, Population integer, Code text, Name text, Continent text, Region text, SurfaceArea real, IndepYear integer, Population integer, LifeExpectancy real, GNP real, GNPOld real, LocalName text, GovernmentForm text, HeadOfState text, Capital integer, Code2 text, CountryCode text, Language text, IsOfficial text, Percentage real)
In English speaking countries, provide the difference between the number of countries with republic and constitutional monarchy as its government form.
SELECT COUNT(T1.GovernmentForm = 'Republic') - COUNT(T1.GovernmentForm = 'ConstitutionalMonarchy') FROM Country AS T1 INNER JOIN CountryLanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = 'English'
bird
CREATE TABLE world (ID integer, Name text, CountryCode text, District text, Population integer, Code text, Name text, Continent text, Region text, SurfaceArea real, IndepYear integer, Population integer, LifeExpectancy real, GNP real, GNPOld real, LocalName text, GovernmentForm text, HeadOfState text, Capital integer, Code2 text, CountryCode text, Language text, IsOfficial text, Percentage real)
What country declared its independence in 1994?
SELECT Name FROM Country WHERE IndepYear = 1994
bird
CREATE TABLE world (ID integer, Name text, CountryCode text, District text, Population integer, Code text, Name text, Continent text, Region text, SurfaceArea real, IndepYear integer, Population integer, LifeExpectancy real, GNP real, GNPOld real, LocalName text, GovernmentForm text, HeadOfState text, Capital integer, Code2 text, CountryCode text, Language text, IsOfficial text, Percentage real)
List all the countries in Asia.
SELECT Name FROM Country WHERE Continent = 'Asia'
bird
CREATE TABLE world (ID integer, Name text, CountryCode text, District text, Population integer, Code text, Name text, Continent text, Region text, SurfaceArea real, IndepYear integer, Population integer, LifeExpectancy real, GNP real, GNPOld real, LocalName text, GovernmentForm text, HeadOfState text, Capital integer, Code2 text, CountryCode text, Language text, IsOfficial text, Percentage real)
What country in Asia has the largest gross national product(GNP)?
SELECT Name FROM Country WHERE Continent = 'Asia' ORDER BY GNP DESC LIMIT 1
bird
CREATE TABLE world (ID integer, Name text, CountryCode text, District text, Population integer, Code text, Name text, Continent text, Region text, SurfaceArea real, IndepYear integer, Population integer, LifeExpectancy real, GNP real, GNPOld real, LocalName text, GovernmentForm text, HeadOfState text, Capital integer, Code2 text, CountryCode text, Language text, IsOfficial text, Percentage real)
How many cities are in the Philippines?
SELECT COUNT(ID) FROM City WHERE Name = 'PHL'
bird
CREATE TABLE world (ID integer, Name text, CountryCode text, District text, Population integer, Code text, Name text, Continent text, Region text, SurfaceArea real, IndepYear integer, Population integer, LifeExpectancy real, GNP real, GNPOld real, LocalName text, GovernmentForm text, HeadOfState text, Capital integer, Code2 text, CountryCode text, Language text, IsOfficial text, Percentage real)
What is the local name of Ukraine that they are also known for?
SELECT LocalName FROM Country WHERE Name = 'Ukraine'
bird
CREATE TABLE world (ID integer, Name text, CountryCode text, District text, Population integer, Code text, Name text, Continent text, Region text, SurfaceArea real, IndepYear integer, Population integer, LifeExpectancy real, GNP real, GNPOld real, LocalName text, GovernmentForm text, HeadOfState text, Capital integer, Code2 text, CountryCode text, Language text, IsOfficial text, Percentage real)
How many countries have Socialistic Republic form of government?
SELECT COUNT(Code) FROM Country WHERE GovernmentForm = 'Socialistic Republic'
bird
CREATE TABLE world (ID integer, Name text, CountryCode text, District text, Population integer, Code text, Name text, Continent text, Region text, SurfaceArea real, IndepYear integer, Population integer, LifeExpectancy real, GNP real, GNPOld real, LocalName text, GovernmentForm text, HeadOfState text, Capital integer, Code2 text, CountryCode text, Language text, IsOfficial text, Percentage real)
What is the official language of China?
SELECT T2.Language FROM Country AS T1 INNER JOIN CountryLanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.Name = 'China' AND T2.IsOfficial = 'T'
bird
CREATE TABLE world (ID integer, Name text, CountryCode text, District text, Population integer, Code text, Name text, Continent text, Region text, SurfaceArea real, IndepYear integer, Population integer, LifeExpectancy real, GNP real, GNPOld real, LocalName text, GovernmentForm text, HeadOfState text, Capital integer, Code2 text, CountryCode text, Language text, IsOfficial text, Percentage real)
How many percent of the population of China used Chinese as their language?
SELECT T2.Percentage FROM Country AS T1 INNER JOIN CountryLanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.Name = 'China' AND T2.Language = 'Chinese'
bird
CREATE TABLE world (ID integer, Name text, CountryCode text, District text, Population integer, Code text, Name text, Continent text, Region text, SurfaceArea real, IndepYear integer, Population integer, LifeExpectancy real, GNP real, GNPOld real, LocalName text, GovernmentForm text, HeadOfState text, Capital integer, Code2 text, CountryCode text, Language text, IsOfficial text, Percentage real)
What is the form of government that the city of Manila has?
SELECT T1.GovernmentForm FROM Country AS T1 INNER JOIN City AS T2 ON T1.Code = T2.CountryCode WHERE T2.Name = 'Manila'
bird
CREATE TABLE world (ID integer, Name text, CountryCode text, District text, Population integer, Code text, Name text, Continent text, Region text, SurfaceArea real, IndepYear integer, Population integer, LifeExpectancy real, GNP real, GNPOld real, LocalName text, GovernmentForm text, HeadOfState text, Capital integer, Code2 text, CountryCode text, Language text, IsOfficial text, Percentage real)
What is the capital city of the Philippines?
SELECT T1.Capital FROM Country AS T1 INNER JOIN City AS T2 ON T1.Code = T2.CountryCode WHERE T1.Name = 'Philipiines'
bird
CREATE TABLE world (ID integer, Name text, CountryCode text, District text, Population integer, Code text, Name text, Continent text, Region text, SurfaceArea real, IndepYear integer, Population integer, LifeExpectancy real, GNP real, GNPOld real, LocalName text, GovernmentForm text, HeadOfState text, Capital integer, Code2 text, CountryCode text, Language text, IsOfficial text, Percentage real)
List all the languages used in Europe.
SELECT T2.Language FROM Country AS T1 INNER JOIN CountryLanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.Continent = 'Europe'
bird
CREATE TABLE world (ID integer, Name text, CountryCode text, District text, Population integer, Code text, Name text, Continent text, Region text, SurfaceArea real, IndepYear integer, Population integer, LifeExpectancy real, GNP real, GNPOld real, LocalName text, GovernmentForm text, HeadOfState text, Capital integer, Code2 text, CountryCode text, Language text, IsOfficial text, Percentage real)
Who is the head of state of the country where the city of Pyongyang is under?
SELECT T1.HeadOfState FROM Country AS T1 INNER JOIN City AS T2 ON T1.Code = T2.CountryCode WHERE T2.Name = 'Pyongyang'
bird
CREATE TABLE world (ID integer, Name text, CountryCode text, District text, Population integer, Code text, Name text, Continent text, Region text, SurfaceArea real, IndepYear integer, Population integer, LifeExpectancy real, GNP real, GNPOld real, LocalName text, GovernmentForm text, HeadOfState text, Capital integer, Code2 text, CountryCode text, Language text, IsOfficial text, Percentage real)
How many unofficial languages are used in Italy?
SELECT SUM(CASE WHEN T2.IsOfficial = 'F' THEN 1 ELSE 0 END) FROM Country AS T1 INNER JOIN CountryLanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.Name = 'Italy'
bird
CREATE TABLE world (ID integer, Name text, CountryCode text, District text, Population integer, Code text, Name text, Continent text, Region text, SurfaceArea real, IndepYear integer, Population integer, LifeExpectancy real, GNP real, GNPOld real, LocalName text, GovernmentForm text, HeadOfState text, Capital integer, Code2 text, CountryCode text, Language text, IsOfficial text, Percentage real)
What city in Russia has the least population?
SELECT T2.Name FROM Country AS T1 INNER JOIN City AS T2 ON T1.Code = T2.CountryCode WHERE T1.Name = 'Russian Federation' ORDER BY T2.Population ASC LIMIT 1
bird
CREATE TABLE world (ID integer, Name text, CountryCode text, District text, Population integer, Code text, Name text, Continent text, Region text, SurfaceArea real, IndepYear integer, Population integer, LifeExpectancy real, GNP real, GNPOld real, LocalName text, GovernmentForm text, HeadOfState text, Capital integer, Code2 text, CountryCode text, Language text, IsOfficial text, Percentage real)
List all the cities in the country where there is high life expectancy at birth.
SELECT T2.Name FROM Country AS T1 INNER JOIN City AS T2 ON T1.Code = T2.CountryCode ORDER BY T1.LifeExpectancy DESC LIMIT 1
bird
CREATE TABLE world (ID integer, Name text, CountryCode text, District text, Population integer, Code text, Name text, Continent text, Region text, SurfaceArea real, IndepYear integer, Population integer, LifeExpectancy real, GNP real, GNPOld real, LocalName text, GovernmentForm text, HeadOfState text, Capital integer, Code2 text, CountryCode text, Language text, IsOfficial text, Percentage real)
List all the official and unofficial languages used by the country that declared its independence in 1830.
SELECT T2.Language, T2.IsOfficial FROM Country AS T1 INNER JOIN CountryLanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.IndepYear = 1830 GROUP BY T2.Language, T2.IsOfficial
bird
CREATE TABLE world (ID integer, Name text, CountryCode text, District text, Population integer, Code text, Name text, Continent text, Region text, SurfaceArea real, IndepYear integer, Population integer, LifeExpectancy real, GNP real, GNPOld real, LocalName text, GovernmentForm text, HeadOfState text, Capital integer, Code2 text, CountryCode text, Language text, IsOfficial text, Percentage real)
What is the capital city of the country with largest population?
SELECT T1.Capital FROM Country AS T1 INNER JOIN City AS T2 ON T1.Code = T2.CountryCode ORDER BY T1.Population DESC LIMIT 1
bird
CREATE TABLE world (ID integer, Name text, CountryCode text, District text, Population integer, Code text, Name text, Continent text, Region text, SurfaceArea real, IndepYear integer, Population integer, LifeExpectancy real, GNP real, GNPOld real, LocalName text, GovernmentForm text, HeadOfState text, Capital integer, Code2 text, CountryCode text, Language text, IsOfficial text, Percentage real)
List all the countries in the continent of Asia that use English as their unofficial language.
SELECT T1.Name FROM Country AS T1 INNER JOIN CountryLanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.Continent = 'Asia' AND T2.IsOfficial = 'F' GROUP BY T1.Name
bird
CREATE TABLE world (ID integer, Name text, CountryCode text, District text, Population integer, Code text, Name text, Continent text, Region text, SurfaceArea real, IndepYear integer, Population integer, LifeExpectancy real, GNP real, GNPOld real, LocalName text, GovernmentForm text, HeadOfState text, Capital integer, Code2 text, CountryCode text, Language text, IsOfficial text, Percentage real)
Calculate the average GNP of all countries that use Arabic language.
SELECT AVG(T1.GNP) FROM Country AS T1 INNER JOIN CountryLanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = 'Arabic'
bird
CREATE TABLE world (ID integer, Name text, CountryCode text, District text, Population integer, Code text, Name text, Continent text, Region text, SurfaceArea real, IndepYear integer, Population integer, LifeExpectancy real, GNP real, GNPOld real, LocalName text, GovernmentForm text, HeadOfState text, Capital integer, Code2 text, CountryCode text, Language text, IsOfficial text, Percentage real)
Calculate the percentage of the surface area of all countries that uses Chinese as one of their languages.
SELECT CAST(SUM(IIF(T2.Language = 'Chinese', T1.SurfaceArea, 0)) AS REAL) * 100 / SUM(T1.SurfaceArea) FROM Country AS T1 INNER JOIN CountryLanguage AS T2 ON T1.Code = T2.CountryCode
bird
CREATE TABLE world (ID integer, Name text, CountryCode text, District text, Population integer, Code text, Name text, Continent text, Region text, SurfaceArea real, IndepYear integer, Population integer, LifeExpectancy real, GNP real, GNPOld real, LocalName text, GovernmentForm text, HeadOfState text, Capital integer, Code2 text, CountryCode text, Language text, IsOfficial text, Percentage real)
Which country has the smallest surface area?
SELECT Name FROM Country ORDER BY SurfaceArea ASC LIMIT 1
bird
CREATE TABLE world (ID integer, Name text, CountryCode text, District text, Population integer, Code text, Name text, Continent text, Region text, SurfaceArea real, IndepYear integer, Population integer, LifeExpectancy real, GNP real, GNPOld real, LocalName text, GovernmentForm text, HeadOfState text, Capital integer, Code2 text, CountryCode text, Language text, IsOfficial text, Percentage real)
Write down the name of the largest population country.
SELECT Name FROM Country ORDER BY Population DESC LIMIT 1
bird
CREATE TABLE world (ID integer, Name text, CountryCode text, District text, Population integer, Code text, Name text, Continent text, Region text, SurfaceArea real, IndepYear integer, Population integer, LifeExpectancy real, GNP real, GNPOld real, LocalName text, GovernmentForm text, HeadOfState text, Capital integer, Code2 text, CountryCode text, Language text, IsOfficial text, Percentage real)
What is the language of the smallest population country?
SELECT T2.Language FROM Country AS T1 INNER JOIN CountryLanguage AS T2 ON T1.Code = T2.CountryCode ORDER BY T1.Population ASC LIMIT 1
bird
CREATE TABLE world (ID integer, Name text, CountryCode text, District text, Population integer, Code text, Name text, Continent text, Region text, SurfaceArea real, IndepYear integer, Population integer, LifeExpectancy real, GNP real, GNPOld real, LocalName text, GovernmentForm text, HeadOfState text, Capital integer, Code2 text, CountryCode text, Language text, IsOfficial text, Percentage real)
List down the name of countries whereby English is their official language.
SELECT T1.Name FROM Country AS T1 INNER JOIN CountryLanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = 'English' AND T2.IsOfficial = 'T'
bird
CREATE TABLE world (ID integer, Name text, CountryCode text, District text, Population integer, Code text, Name text, Continent text, Region text, SurfaceArea real, IndepYear integer, Population integer, LifeExpectancy real, GNP real, GNPOld real, LocalName text, GovernmentForm text, HeadOfState text, Capital integer, Code2 text, CountryCode text, Language text, IsOfficial text, Percentage real)
List down the official language of the countries which declared independence after 1990,
SELECT T1.Name, T2.Language FROM Country AS T1 INNER JOIN CountryLanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.IndepYear > 1990 AND T2.IsOfficial = 'T'
bird
CREATE TABLE world (ID integer, Name text, CountryCode text, District text, Population integer, Code text, Name text, Continent text, Region text, SurfaceArea real, IndepYear integer, Population integer, LifeExpectancy real, GNP real, GNPOld real, LocalName text, GovernmentForm text, HeadOfState text, Capital integer, Code2 text, CountryCode text, Language text, IsOfficial text, Percentage real)
What is the percentage of English used in Australia?
SELECT T2.Percentage FROM Country AS T1 INNER JOIN CountryLanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.Name = 'Australia' AND T2.Language = 'English'
bird
CREATE TABLE world (ID integer, Name text, CountryCode text, District text, Population integer, Code text, Name text, Continent text, Region text, SurfaceArea real, IndepYear integer, Population integer, LifeExpectancy real, GNP real, GNPOld real, LocalName text, GovernmentForm text, HeadOfState text, Capital integer, Code2 text, CountryCode text, Language text, IsOfficial text, Percentage real)
List down languages used in Malaysia.
SELECT T2.Language FROM Country AS T1 INNER JOIN CountryLanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.Name = 'Malaysia'
bird
CREATE TABLE world (ID integer, Name text, CountryCode text, District text, Population integer, Code text, Name text, Continent text, Region text, SurfaceArea real, IndepYear integer, Population integer, LifeExpectancy real, GNP real, GNPOld real, LocalName text, GovernmentForm text, HeadOfState text, Capital integer, Code2 text, CountryCode text, Language text, IsOfficial text, Percentage real)
Which country has the most crowded city in the world?
SELECT T1.Name FROM Country AS T1 INNER JOIN City AS T2 ON T1.Code = T2.CountryCode ORDER BY T2.Population DESC LIMIT 1
bird
CREATE TABLE world (ID integer, Name text, CountryCode text, District text, Population integer, Code text, Name text, Continent text, Region text, SurfaceArea real, IndepYear integer, Population integer, LifeExpectancy real, GNP real, GNPOld real, LocalName text, GovernmentForm text, HeadOfState text, Capital integer, Code2 text, CountryCode text, Language text, IsOfficial text, Percentage real)
What is the life expectancy of residents in the most crowded city?
SELECT T2.LifeExpectancy FROM City AS T1 INNER JOIN Country AS T2 ON T1.CountryCode = T2.Code ORDER BY T1.Population DESC LIMIT 1
bird
CREATE TABLE world (ID integer, Name text, CountryCode text, District text, Population integer, Code text, Name text, Continent text, Region text, SurfaceArea real, IndepYear integer, Population integer, LifeExpectancy real, GNP real, GNPOld real, LocalName text, GovernmentForm text, HeadOfState text, Capital integer, Code2 text, CountryCode text, Language text, IsOfficial text, Percentage real)
What is the GNP of the least crowded city in the world?
SELECT T2.GNP FROM City AS T1 INNER JOIN Country AS T2 ON T1.CountryCode = T2.Code ORDER BY T1.Population ASC LIMIT 1
bird
CREATE TABLE world (ID integer, Name text, CountryCode text, District text, Population integer, Code text, Name text, Continent text, Region text, SurfaceArea real, IndepYear integer, Population integer, LifeExpectancy real, GNP real, GNPOld real, LocalName text, GovernmentForm text, HeadOfState text, Capital integer, Code2 text, CountryCode text, Language text, IsOfficial text, Percentage real)
Within the 5 most crowded cities in the world, which country has the most languages used?
SELECT Name FROM ( SELECT T1.Name, T2.Language FROM City AS T1 INNER JOIN CountryLanguage AS T2 ON T1.CountryCode = T2.CountryCode GROUP BY T1.Name, T1.Population, T2.Language ORDER BY T1.Population DESC ) AS T3 GROUP BY t3.Name ORDER BY COUNT(Language) DESC LIMIT 1
bird
CREATE TABLE world (ID integer, Name text, CountryCode text, District text, Population integer, Code text, Name text, Continent text, Region text, SurfaceArea real, IndepYear integer, Population integer, LifeExpectancy real, GNP real, GNPOld real, LocalName text, GovernmentForm text, HeadOfState text, Capital integer, Code2 text, CountryCode text, Language text, IsOfficial text, Percentage real)
Which country has the smallest surface area and the most crowded city?
SELECT T2.Name FROM City AS T1 INNER JOIN Country AS T2 ON T1.CountryCode = T2.Code ORDER BY T1.Population DESC, T2.SurfaceArea DESC LIMIT 1
bird
CREATE TABLE world (ID integer, Name text, CountryCode text, District text, Population integer, Code text, Name text, Continent text, Region text, SurfaceArea real, IndepYear integer, Population integer, LifeExpectancy real, GNP real, GNPOld real, LocalName text, GovernmentForm text, HeadOfState text, Capital integer, Code2 text, CountryCode text, Language text, IsOfficial text, Percentage real)
List down all cities of China.
SELECT T1.Name FROM City AS T1 INNER JOIN Country AS T2 ON T1.CountryCode = T2.Code WHERE T2.Name = 'China'
bird
CREATE TABLE world (ID integer, Name text, CountryCode text, District text, Population integer, Code text, Name text, Continent text, Region text, SurfaceArea real, IndepYear integer, Population integer, LifeExpectancy real, GNP real, GNPOld real, LocalName text, GovernmentForm text, HeadOfState text, Capital integer, Code2 text, CountryCode text, Language text, IsOfficial text, Percentage real)
What are the cities for country called "´Uman" in local name.
SELECT T1.Name FROM City AS T1 INNER JOIN Country AS T2 ON T1.CountryCode = T2.Code WHERE T2.LocalName = '´Uman'
bird
CREATE TABLE world (ID integer, Name text, CountryCode text, District text, Population integer, Code text, Name text, Continent text, Region text, SurfaceArea real, IndepYear integer, Population integer, LifeExpectancy real, GNP real, GNPOld real, LocalName text, GovernmentForm text, HeadOfState text, Capital integer, Code2 text, CountryCode text, Language text, IsOfficial text, Percentage real)
What is the average life expentancy of countries that speak Arabic?
SELECT AVG(T1.LifeExpectancy) FROM Country AS T1 INNER JOIN CountryLanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = 'Arabic'
bird
CREATE TABLE world (ID integer, Name text, CountryCode text, District text, Population integer, Code text, Name text, Continent text, Region text, SurfaceArea real, IndepYear integer, Population integer, LifeExpectancy real, GNP real, GNPOld real, LocalName text, GovernmentForm text, HeadOfState text, Capital integer, Code2 text, CountryCode text, Language text, IsOfficial text, Percentage real)
What is the GNP growth rate by the country of Shanghai?
SELECT CAST((T1.GNP - T1.GNPOld) AS REAL) / T1.GNPOld FROM Country AS T1 INNER JOIN City AS T2 ON T1.Code = T2.CountryCode WHERE T2.Name = 'Shanghai'
bird
CREATE TABLE world (ID integer, Name text, CountryCode text, District text, Population integer, Code text, Name text, Continent text, Region text, SurfaceArea real, IndepYear integer, Population integer, LifeExpectancy real, GNP real, GNPOld real, LocalName text, GovernmentForm text, HeadOfState text, Capital integer, Code2 text, CountryCode text, Language text, IsOfficial text, Percentage real)
What is the district of Zaanstad?
SELECT District FROM City WHERE name = 'Zaanstad'
bird
CREATE TABLE world (ID integer, Name text, CountryCode text, District text, Population integer, Code text, Name text, Continent text, Region text, SurfaceArea real, IndepYear integer, Population integer, LifeExpectancy real, GNP real, GNPOld real, LocalName text, GovernmentForm text, HeadOfState text, Capital integer, Code2 text, CountryCode text, Language text, IsOfficial text, Percentage real)
What city has the highest population?
SELECT Name FROM City ORDER BY Population DESC LIMIT 1
bird
CREATE TABLE world (ID integer, Name text, CountryCode text, District text, Population integer, Code text, Name text, Continent text, Region text, SurfaceArea real, IndepYear integer, Population integer, LifeExpectancy real, GNP real, GNPOld real, LocalName text, GovernmentForm text, HeadOfState text, Capital integer, Code2 text, CountryCode text, Language text, IsOfficial text, Percentage real)
Provide the district of the city with a population of 201843.
SELECT District FROM City WHERE population = 201843
bird
CREATE TABLE world (ID integer, Name text, CountryCode text, District text, Population integer, Code text, Name text, Continent text, Region text, SurfaceArea real, IndepYear integer, Population integer, LifeExpectancy real, GNP real, GNPOld real, LocalName text, GovernmentForm text, HeadOfState text, Capital integer, Code2 text, CountryCode text, Language text, IsOfficial text, Percentage real)
What country has the largest surface area?
SELECT Name FROM Country ORDER BY SurfaceArea DESC LIMIT 1
bird
CREATE TABLE world (ID integer, Name text, CountryCode text, District text, Population integer, Code text, Name text, Continent text, Region text, SurfaceArea real, IndepYear integer, Population integer, LifeExpectancy real, GNP real, GNPOld real, LocalName text, GovernmentForm text, HeadOfState text, Capital integer, Code2 text, CountryCode text, Language text, IsOfficial text, Percentage real)
How many countries have a life expectancy of 75.1?
SELECT COUNT(*) FROM Country WHERE LifeExpectancy = 75.1
bird
CREATE TABLE world (ID integer, Name text, CountryCode text, District text, Population integer, Code text, Name text, Continent text, Region text, SurfaceArea real, IndepYear integer, Population integer, LifeExpectancy real, GNP real, GNPOld real, LocalName text, GovernmentForm text, HeadOfState text, Capital integer, Code2 text, CountryCode text, Language text, IsOfficial text, Percentage real)
What is the year of independence of Brunei?
SELECT IndepYear FROM Country WHERE Name = 'Brunei'
bird
CREATE TABLE world (ID integer, Name text, CountryCode text, District text, Population integer, Code text, Name text, Continent text, Region text, SurfaceArea real, IndepYear integer, Population integer, LifeExpectancy real, GNP real, GNPOld real, LocalName text, GovernmentForm text, HeadOfState text, Capital integer, Code2 text, CountryCode text, Language text, IsOfficial text, Percentage real)
How many countries have no GNP?
SELECT COUNT(*) FROM Country WHERE GNP = 0
bird
CREATE TABLE world (ID integer, Name text, CountryCode text, District text, Population integer, Code text, Name text, Continent text, Region text, SurfaceArea real, IndepYear integer, Population integer, LifeExpectancy real, GNP real, GNPOld real, LocalName text, GovernmentForm text, HeadOfState text, Capital integer, Code2 text, CountryCode text, Language text, IsOfficial text, Percentage real)
What is the average surface area of all countries?
SELECT AVG(SurfaceArea) FROM Country
bird
CREATE TABLE world (ID integer, Name text, CountryCode text, District text, Population integer, Code text, Name text, Continent text, Region text, SurfaceArea real, IndepYear integer, Population integer, LifeExpectancy real, GNP real, GNPOld real, LocalName text, GovernmentForm text, HeadOfState text, Capital integer, Code2 text, CountryCode text, Language text, IsOfficial text, Percentage real)
How many languages are there in the country where Tocantins district belongs?
SELECT COUNT(DISTINCT T2.Language) FROM City AS T1 INNER JOIN CountryLanguage AS T2 ON T1.CountryCode = T2.CountryCode WHERE T1.District = 'Tocantins'
bird
CREATE TABLE world (ID integer, Name text, CountryCode text, District text, Population integer, Code text, Name text, Continent text, Region text, SurfaceArea real, IndepYear integer, Population integer, LifeExpectancy real, GNP real, GNPOld real, LocalName text, GovernmentForm text, HeadOfState text, Capital integer, Code2 text, CountryCode text, Language text, IsOfficial text, Percentage real)
What are the districts that belong to the country with the largest surface area?
SELECT T1.District FROM City AS T1 INNER JOIN Country AS T2 ON T1.CountryCode = T2.Code WHERE T2.Name = ( SELECT Name FROM Country ORDER BY SurfaceArea DESC LIMIT 1 )
bird
CREATE TABLE world (ID integer, Name text, CountryCode text, District text, Population integer, Code text, Name text, Continent text, Region text, SurfaceArea real, IndepYear integer, Population integer, LifeExpectancy real, GNP real, GNPOld real, LocalName text, GovernmentForm text, HeadOfState text, Capital integer, Code2 text, CountryCode text, Language text, IsOfficial text, Percentage real)
How many cities are there in the country ruled by Kostis Stefanopoulos?
SELECT COUNT(DISTINCT T1.Name) FROM City AS T1 INNER JOIN Country AS T2 ON T1.CountryCode = T2.Code WHERE T2.HeadOfState = 'Kostis Stefanopoulos'
bird
CREATE TABLE world (ID integer, Name text, CountryCode text, District text, Population integer, Code text, Name text, Continent text, Region text, SurfaceArea real, IndepYear integer, Population integer, LifeExpectancy real, GNP real, GNPOld real, LocalName text, GovernmentForm text, HeadOfState text, Capital integer, Code2 text, CountryCode text, Language text, IsOfficial text, Percentage real)
What are the official languages used in Greece?
SELECT T1.Language FROM CountryLanguage AS T1 INNER JOIN Country AS T2 ON T1.CountryCode = T2.Code WHERE T1.IsOfficial = 'T' AND T2.name = 'Greece'
bird
CREATE TABLE world (ID integer, Name text, CountryCode text, District text, Population integer, Code text, Name text, Continent text, Region text, SurfaceArea real, IndepYear integer, Population integer, LifeExpectancy real, GNP real, GNPOld real, LocalName text, GovernmentForm text, HeadOfState text, Capital integer, Code2 text, CountryCode text, Language text, IsOfficial text, Percentage real)
Give the population of the country where Queimados city belongs.
SELECT T2.Population FROM City AS T1 INNER JOIN Country AS T2 ON T1.CountryCode = T2.Code WHERE T1.Name = 'Queimados'
bird
CREATE TABLE world (ID integer, Name text, CountryCode text, District text, Population integer, Code text, Name text, Continent text, Region text, SurfaceArea real, IndepYear integer, Population integer, LifeExpectancy real, GNP real, GNPOld real, LocalName text, GovernmentForm text, HeadOfState text, Capital integer, Code2 text, CountryCode text, Language text, IsOfficial text, Percentage real)
What are the official languages of the country where you can find the city with the least population?
SELECT T2.Language FROM City AS T1 INNER JOIN CountryLanguage AS T2 ON T1.CountryCode = T2.CountryCode WHERE T2.IsOfficial = 'T' ORDER BY T1.Population ASC LIMIT 1
bird
CREATE TABLE world (ID integer, Name text, CountryCode text, District text, Population integer, Code text, Name text, Continent text, Region text, SurfaceArea real, IndepYear integer, Population integer, LifeExpectancy real, GNP real, GNPOld real, LocalName text, GovernmentForm text, HeadOfState text, Capital integer, Code2 text, CountryCode text, Language text, IsOfficial text, Percentage real)
What is the surface area and GNP of the country where Namibe district belongs?
SELECT T2.SurfaceArea, T2.GNP FROM City AS T1 INNER JOIN Country AS T2 ON T1.CountryCode = T2.Code WHERE T1.District = 'Namibe'
bird
CREATE TABLE world (ID integer, Name text, CountryCode text, District text, Population integer, Code text, Name text, Continent text, Region text, SurfaceArea real, IndepYear integer, Population integer, LifeExpectancy real, GNP real, GNPOld real, LocalName text, GovernmentForm text, HeadOfState text, Capital integer, Code2 text, CountryCode text, Language text, IsOfficial text, Percentage real)
List the names of the country that officially uses English as their language.
SELECT T2.Name FROM CountryLanguage AS T1 INNER JOIN Country AS T2 ON T1.CountryCode = T2.Code WHERE T1.IsOfficial = 'T' AND T1.Language = 'English'
bird
CREATE TABLE world (ID integer, Name text, CountryCode text, District text, Population integer, Code text, Name text, Continent text, Region text, SurfaceArea real, IndepYear integer, Population integer, LifeExpectancy real, GNP real, GNPOld real, LocalName text, GovernmentForm text, HeadOfState text, Capital integer, Code2 text, CountryCode text, Language text, IsOfficial text, Percentage real)
What are the districts that belong to the country with the lowest surface area?
SELECT T1.District FROM City AS T1 INNER JOIN Country AS T2 ON T1.CountryCode = T2.Code ORDER BY T2.SurfaceArea ASC LIMIT 1
bird
CREATE TABLE world (ID integer, Name text, CountryCode text, District text, Population integer, Code text, Name text, Continent text, Region text, SurfaceArea real, IndepYear integer, Population integer, LifeExpectancy real, GNP real, GNPOld real, LocalName text, GovernmentForm text, HeadOfState text, Capital integer, Code2 text, CountryCode text, Language text, IsOfficial text, Percentage real)
List down the country names of countries that have a GNP lower than 1000 and have Dutch as their language.
SELECT T2.Name FROM CountryLanguage AS T1 INNER JOIN Country AS T2 ON T1.CountryCode = T2.Code WHERE T2.GNP < 1000 AND T1.IsOfficial = 'T' AND T1.Language = 'Dutch'
bird
CREATE TABLE world (ID integer, Name text, CountryCode text, District text, Population integer, Code text, Name text, Continent text, Region text, SurfaceArea real, IndepYear integer, Population integer, LifeExpectancy real, GNP real, GNPOld real, LocalName text, GovernmentForm text, HeadOfState text, Capital integer, Code2 text, CountryCode text, Language text, IsOfficial text, Percentage real)
What is the GNP of the country where district "Entre Rios" belongs?
SELECT T2.GNP FROM City AS T1 INNER JOIN Country AS T2 ON T1.CountryCode = T2.Code WHERE T1.District = 'Entre Rios' LIMIT 1
bird
CREATE TABLE world (ID integer, Name text, CountryCode text, District text, Population integer, Code text, Name text, Continent text, Region text, SurfaceArea real, IndepYear integer, Population integer, LifeExpectancy real, GNP real, GNPOld real, LocalName text, GovernmentForm text, HeadOfState text, Capital integer, Code2 text, CountryCode text, Language text, IsOfficial text, Percentage real)
What is the local name of the country where "The Valley" city belongs?
SELECT T2.LocalName FROM City AS T1 INNER JOIN Country AS T2 ON T1.CountryCode = T2.Code WHERE T1.Name = 'The Valley'
bird
CREATE TABLE world (ID integer, Name text, CountryCode text, District text, Population integer, Code text, Name text, Continent text, Region text, SurfaceArea real, IndepYear integer, Population integer, LifeExpectancy real, GNP real, GNPOld real, LocalName text, GovernmentForm text, HeadOfState text, Capital integer, Code2 text, CountryCode text, Language text, IsOfficial text, Percentage real)
List down the cities belongs to the country that has surface area greater than 7000000.
SELECT T2.Name, T1.Name FROM City AS T1 INNER JOIN Country AS T2 ON T1.CountryCode = T2.Code WHERE T2.SurfaceArea > 7000000
bird
CREATE TABLE world (ID integer, Name text, CountryCode text, District text, Population integer, Code text, Name text, Continent text, Region text, SurfaceArea real, IndepYear integer, Population integer, LifeExpectancy real, GNP real, GNPOld real, LocalName text, GovernmentForm text, HeadOfState text, Capital integer, Code2 text, CountryCode text, Language text, IsOfficial text, Percentage real)
What is the life expectancy of the countries that uses Japanese as their language?
SELECT AVG(T2.LifeExpectancy) FROM CountryLanguage AS T1 INNER JOIN Country AS T2 ON T1.CountryCode = T2.Code WHERE T1.Language = 'Japanese'
bird
CREATE TABLE world (ID integer, Name text, CountryCode text, District text, Population integer, Code text, Name text, Continent text, Region text, SurfaceArea real, IndepYear integer, Population integer, LifeExpectancy real, GNP real, GNPOld real, LocalName text, GovernmentForm text, HeadOfState text, Capital integer, Code2 text, CountryCode text, Language text, IsOfficial text, Percentage real)
How many cities are there in the country with the surface area of 652090?
SELECT T2.Name, COUNT(T1.Name) FROM City AS T1 INNER JOIN Country AS T2 ON T1.CountryCode = T2.Code WHERE T2.SurfaceArea = 652090 GROUP BY T2.Name
bird
CREATE TABLE world (ID integer, Name text, CountryCode text, District text, Population integer, Code text, Name text, Continent text, Region text, SurfaceArea real, IndepYear integer, Population integer, LifeExpectancy real, GNP real, GNPOld real, LocalName text, GovernmentForm text, HeadOfState text, Capital integer, Code2 text, CountryCode text, Language text, IsOfficial text, Percentage real)
List down the languages of countries with an independence year between 1980 to 1995.
SELECT T2.Name, T1.Language FROM CountryLanguage AS T1 INNER JOIN Country AS T2 ON T1.CountryCode = T2.Code WHERE T2.IndepYear BETWEEN 1980 AND 1995
bird
CREATE TABLE world (ID integer, Name text, CountryCode text, District text, Population integer, Code text, Name text, Continent text, Region text, SurfaceArea real, IndepYear integer, Population integer, LifeExpectancy real, GNP real, GNPOld real, LocalName text, GovernmentForm text, HeadOfState text, Capital integer, Code2 text, CountryCode text, Language text, IsOfficial text, Percentage real)
What is the life expectancy of the people living in Calama city?
SELECT T2.LifeExpectancy FROM City AS T1 INNER JOIN Country AS T2 ON T1.CountryCode = T2.Code WHERE T1.Name = 'Calama'
bird
CREATE TABLE world (ID integer, Name text, CountryCode text, District text, Population integer, Code text, Name text, Continent text, Region text, SurfaceArea real, IndepYear integer, Population integer, LifeExpectancy real, GNP real, GNPOld real, LocalName text, GovernmentForm text, HeadOfState text, Capital integer, Code2 text, CountryCode text, Language text, IsOfficial text, Percentage real)
Provide the language used in the country ruled by Pierre Buyoya.
SELECT T1.Language FROM CountryLanguage AS T1 INNER JOIN Country AS T2 ON T1.CountryCode = T2.Code WHERE T2.HeadOfState = 'Pierre Buyoya'
bird
CREATE TABLE world (ID integer, Name text, CountryCode text, District text, Population integer, Code text, Name text, Continent text, Region text, SurfaceArea real, IndepYear integer, Population integer, LifeExpectancy real, GNP real, GNPOld real, LocalName text, GovernmentForm text, HeadOfState text, Capital integer, Code2 text, CountryCode text, Language text, IsOfficial text, Percentage real)
In countries with constitutional monarchy, what is the percentage of cities located in the district of England?
SELECT CAST(SUM(CASE WHEN T1.District = 'England' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM City AS T1 INNER JOIN Country AS T2 ON T1.CountryCode = T2.Code WHERE T2.GovernmentForm = 'Constitutional Monarchy'
bird
CREATE TABLE world (ID integer, Name text, CountryCode text, District text, Population integer, Code text, Name text, Continent text, Region text, SurfaceArea real, IndepYear integer, Population integer, LifeExpectancy real, GNP real, GNPOld real, LocalName text, GovernmentForm text, HeadOfState text, Capital integer, Code2 text, CountryCode text, Language text, IsOfficial text, Percentage real)
Among the cities with a population between 140000 and 150000, list the country that has life expectancy greater than 80% life expectancy of all countries.
SELECT T2.Name FROM City AS T1 INNER JOIN Country AS T2 ON T1.CountryCode = T2.Code WHERE T1.Population BETWEEN 140000 AND 150000 GROUP BY T2.Name, LifeExpectancy HAVING LifeExpectancy < ( SELECT AVG(LifeExpectancy) FROM Country ) * 0.8
bird
CREATE TABLE world (ID integer, Name text, CountryCode text, District text, Population integer, Code text, Name text, Continent text, Region text, SurfaceArea real, IndepYear integer, Population integer, LifeExpectancy real, GNP real, GNPOld real, LocalName text, GovernmentForm text, HeadOfState text, Capital integer, Code2 text, CountryCode text, Language text, IsOfficial text, Percentage real)
Among the countries that use Italian as their language, what is the percentage of republic countries?
SELECT CAST(SUM(CASE WHEN T2.GovernmentForm = 'Republic' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM CountryLanguage AS T1 INNER JOIN Country AS T2 ON T1.CountryCode = T2.Code WHERE T1.Language = 'Italian'
bird
CREATE TABLE music_platform_2 (run_at text, max_rowid integer, reviews_added integer, podcast_id text, itunes_id integer, slug text, itunes_url text, title text, podcast_id text, title text, content text, rating integer, author_id text, created_at text, podcast_id text, category text)
How many podcasts are there in the category which has the most podcasts?
SELECT COUNT(podcast_id) FROM categories WHERE category = ( SELECT category FROM categories GROUP BY category ORDER BY COUNT(podcast_id) DESC LIMIT 1 )
bird
CREATE TABLE music_platform_2 (run_at text, max_rowid integer, reviews_added integer, podcast_id text, itunes_id integer, slug text, itunes_url text, title text, podcast_id text, title text, content text, rating integer, author_id text, created_at text, podcast_id text, category text)
What is the percentage of the podcast that are categorized in four or more categories?
SELECT COUNT(T1.podcast_id) FROM ( SELECT podcast_id FROM categories GROUP BY podcast_id HAVING COUNT(category) >= 4 ) AS T1
bird
CREATE TABLE music_platform_2 (run_at text, max_rowid integer, reviews_added integer, podcast_id text, itunes_id integer, slug text, itunes_url text, title text, podcast_id text, title text, content text, rating integer, author_id text, created_at text, podcast_id text, category text)
Provide the itunes id and url for podcast titled 'Brown Suga Diaries'.
SELECT itunes_id, itunes_url FROM podcasts WHERE title = 'Brown Suga Diaries'
bird
CREATE TABLE music_platform_2 (run_at text, max_rowid integer, reviews_added integer, podcast_id text, itunes_id integer, slug text, itunes_url text, title text, podcast_id text, title text, content text, rating integer, author_id text, created_at text, podcast_id text, category text)
List all podcast with its itunes url for all title containing the word 'Dream'.
SELECT itunes_url FROM podcasts WHERE title LIKE '%Dream%' GROUP BY itunes_url
bird
CREATE TABLE music_platform_2 (run_at text, max_rowid integer, reviews_added integer, podcast_id text, itunes_id integer, slug text, itunes_url text, title text, podcast_id text, title text, content text, rating integer, author_id text, created_at text, podcast_id text, category text)
Name all the categories for podcast titled 'I Heart My Life Show'.
SELECT T1.category FROM categories AS T1 INNER JOIN podcasts AS T2 ON T2.podcast_id = T1.podcast_id WHERE T2.title = 'I Heart My Life Show'
bird
CREATE TABLE music_platform_2 (run_at text, max_rowid integer, reviews_added integer, podcast_id text, itunes_id integer, slug text, itunes_url text, title text, podcast_id text, title text, content text, rating integer, author_id text, created_at text, podcast_id text, category text)
List all the podcast title and its itunes url under the 'society-culture' category.
SELECT T2.title, T2.itunes_url FROM categories AS T1 INNER JOIN podcasts AS T2 ON T2.podcast_id = T1.podcast_id WHERE T1.category = 'society-culture'
bird
CREATE TABLE music_platform_2 (run_at text, max_rowid integer, reviews_added integer, podcast_id text, itunes_id integer, slug text, itunes_url text, title text, podcast_id text, title text, content text, rating integer, author_id text, created_at text, podcast_id text, category text)
How many people rated 5 for the podcast which title contains the word 'spoiler' under the 'art' category '?
SELECT COUNT(T3.podcast_id) FROM categories AS T1 INNER JOIN podcasts AS T2 ON T2.podcast_id = T1.podcast_id INNER JOIN reviews AS T3 ON T3.podcast_id = T2.podcast_id WHERE T2.title LIKE '%spoilers%' AND T1.category = 'arts' AND T3.rating = 5
bird
CREATE TABLE music_platform_2 (run_at text, max_rowid integer, reviews_added integer, podcast_id text, itunes_id integer, slug text, itunes_url text, title text, podcast_id text, title text, content text, rating integer, author_id text, created_at text, podcast_id text, category text)
List the authors who created review for podcast titled 'Pop Rocket' in 2016 with rating less than 5.
SELECT T2.author_id FROM podcasts AS T1 INNER JOIN reviews AS T2 ON T2.podcast_id = T1.podcast_id WHERE T1.title = 'Pop Rocket' AND T2.created_at LIKE '2016-%' AND T2.rating < 5
bird