query_id
int64 0
1.03k
| database_id
stringclasses 20
values | table_id
listlengths 1
4
| query
stringlengths 18
174
| answer
stringlengths 20
422
| difficulty
stringclasses 4
values |
---|---|---|---|---|---|
700 |
voter_1
|
[
"contestants",
"votes",
"area_code_state"
] |
List the area codes in which voters voted both for the contestant 'Tabatha Gehling' and the contestant 'Kelly Clauss'.
|
SELECT T3.area_code FROM contestants AS T1 JOIN votes AS T2 ON T1.contestant_number = T2.contestant_number JOIN area_code_state AS T3 ON T2.state = T3.state WHERE T1.contestant_name = 'Tabatha Gehling' INTERSECT SELECT T3.area_code FROM contestants AS T1 JOIN votes AS T2 ON T1.contestant_number = T2.contestant_number JOIN area_code_state AS T3 ON T2.state = T3.state WHERE T1.contestant_name = 'Kelly Clauss'
|
extra
|
701 |
voter_1
|
[
"contestants"
] |
Return the names of the contestants whose names contain the substring 'Al' .
|
select contestant_name from contestants where contestant_name like "%al%"
|
medium
|
702 |
world_1
|
[
"country"
] |
What are the names of all the countries that became independent after 1950?
|
SELECT Name FROM country WHERE IndepYear > 1950
|
easy
|
703 |
world_1
|
[
"country"
] |
Give the names of the nations that were founded after 1950.
|
SELECT Name FROM country WHERE IndepYear > 1950
|
easy
|
704 |
world_1
|
[
"country"
] |
How many countries have a republic as their form of government?
|
SELECT count(*) FROM country WHERE GovernmentForm = "Republic"
|
easy
|
705 |
world_1
|
[
"country"
] |
How many countries have governments that are republics?
|
SELECT count(*) FROM country WHERE GovernmentForm = "Republic"
|
easy
|
706 |
world_1
|
[
"country"
] |
What is the total surface area of the countries in the Caribbean region?
|
SELECT sum(SurfaceArea) FROM country WHERE Region = "Caribbean"
|
easy
|
707 |
world_1
|
[
"country"
] |
How much surface area do the countires in the Carribean cover together?
|
SELECT sum(SurfaceArea) FROM country WHERE Region = "Caribbean"
|
easy
|
708 |
world_1
|
[
"country"
] |
Which continent is Anguilla in?
|
SELECT Continent FROM country WHERE Name = "Anguilla"
|
easy
|
709 |
world_1
|
[
"country"
] |
What is the continent name which Anguilla belongs to?
|
SELECT Continent FROM country WHERE Name = "Anguilla"
|
easy
|
710 |
world_1
|
[
"city",
"country"
] |
Which region is the city Kabul located in?
|
SELECT Region FROM country AS T1 JOIN city AS T2 ON T1.Code = T2.CountryCode WHERE T2.Name = "Kabul"
|
medium
|
711 |
world_1
|
[
"city",
"country"
] |
What region is Kabul in?
|
SELECT Region FROM country AS T1 JOIN city AS T2 ON T1.Code = T2.CountryCode WHERE T2.Name = "Kabul"
|
medium
|
712 |
world_1
|
[
"country",
"countrylanguage"
] |
Which language is the most popular in Aruba?
|
SELECT T2.Language FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.Name = "Aruba" ORDER BY Percentage DESC LIMIT 1
|
extra
|
713 |
world_1
|
[
"country",
"countrylanguage"
] |
What language is predominantly spoken in Aruba?
|
SELECT T2.Language FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.Name = "Aruba" ORDER BY Percentage DESC LIMIT 1
|
extra
|
714 |
world_1
|
[
"country"
] |
What are the population and life expectancies in Brazil?
|
SELECT Population , LifeExpectancy FROM country WHERE Name = "Brazil"
|
medium
|
715 |
world_1
|
[
"country"
] |
Give me Brazil’s population and life expectancies.
|
SELECT Population , LifeExpectancy FROM country WHERE Name = "Brazil"
|
medium
|
716 |
world_1
|
[
"country"
] |
What are the region and population of Angola?
|
SELECT Population , Region FROM country WHERE Name = "Angola"
|
medium
|
717 |
world_1
|
[
"country"
] |
What region does Angola belong to and what is its population?
|
SELECT Population , Region FROM country WHERE Name = "Angola"
|
medium
|
718 |
world_1
|
[
"country"
] |
What is the average expected life expectancy for countries in the region of Central Africa?
|
SELECT avg(LifeExpectancy) FROM country WHERE Region = "Central Africa"
|
easy
|
719 |
world_1
|
[
"country"
] |
How long is the people’s average life expectancy in Central Africa?
|
SELECT avg(LifeExpectancy) FROM country WHERE Region = "Central Africa"
|
easy
|
720 |
world_1
|
[
"country"
] |
What is the name of country that has the shortest life expectancy in Asia?
|
SELECT Name FROM country WHERE Continent = "Asia" ORDER BY LifeExpectancy LIMIT 1
|
hard
|
721 |
world_1
|
[
"country"
] |
Give the name of the country in Asia with the lowest life expectancy.
|
SELECT Name FROM country WHERE Continent = "Asia" ORDER BY LifeExpectancy LIMIT 1
|
hard
|
722 |
world_1
|
[
"country"
] |
What is the total population and maximum GNP in Asia?
|
SELECT sum(Population) , max(GNP) FROM country WHERE Continent = "Asia"
|
medium
|
723 |
world_1
|
[
"country"
] |
How many people live in Asia, and what is the largest GNP among them?
|
SELECT sum(Population) , max(GNP) FROM country WHERE Continent = "Asia"
|
medium
|
724 |
world_1
|
[
"country"
] |
What is the average life expectancy in African countries that are republics?
|
SELECT avg(LifeExpectancy) FROM country WHERE Continent = "Africa" AND GovernmentForm = "Republic"
|
medium
|
725 |
world_1
|
[
"country"
] |
Give the average life expectancy for countries in Africa which are republics?
|
SELECT avg(LifeExpectancy) FROM country WHERE Continent = "Africa" AND GovernmentForm = "Republic"
|
medium
|
726 |
world_1
|
[
"country"
] |
What is the total surface area of the continents Asia and Europe?
|
SELECT sum(SurfaceArea) FROM country WHERE Continent = "Asia" OR Continent = "Europe"
|
medium
|
727 |
world_1
|
[
"country"
] |
Give the total surface area covered by countries in Asia or Europe.
|
SELECT sum(SurfaceArea) FROM country WHERE Continent = "Asia" OR Continent = "Europe"
|
medium
|
728 |
world_1
|
[
"city"
] |
How many people live in Gelderland district?
|
SELECT sum(Population) FROM city WHERE District = "Gelderland"
|
easy
|
729 |
world_1
|
[
"city"
] |
What is the total population of Gelderland district?
|
SELECT sum(Population) FROM city WHERE District = "Gelderland"
|
easy
|
730 |
world_1
|
[
"country"
] |
What is the average GNP and total population in all nations whose government is US territory?
|
SELECT avg(GNP) , sum(population) FROM country WHERE GovernmentForm = "US Territory"
|
medium
|
731 |
world_1
|
[
"country"
] |
Give the mean GNP and total population of nations which are considered US territory.
|
SELECT avg(GNP) , sum(population) FROM country WHERE GovernmentForm = "US Territory"
|
medium
|
732 |
world_1
|
[
"countrylanguage"
] |
How many unique languages are spoken in the world?
|
SELECT count(DISTINCT LANGUAGE) FROM countrylanguage
|
easy
|
733 |
world_1
|
[
"countrylanguage"
] |
What is the number of distinct languages used around the world?
|
SELECT count(DISTINCT LANGUAGE) FROM countrylanguage
|
easy
|
734 |
world_1
|
[
"country"
] |
How many type of governments are in Africa?
|
SELECT count(DISTINCT GovernmentForm) FROM country WHERE Continent = "Africa"
|
easy
|
735 |
world_1
|
[
"country"
] |
How many different forms of governments are there in Africa?
|
SELECT count(DISTINCT GovernmentForm) FROM country WHERE Continent = "Africa"
|
easy
|
736 |
world_1
|
[
"country",
"countrylanguage"
] |
What is the total number of languages used in Aruba?
|
SELECT COUNT(T2.Language) FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.Name = "Aruba"
|
medium
|
737 |
world_1
|
[
"country",
"countrylanguage"
] |
How many languages are spoken in Aruba?
|
SELECT COUNT(T2.Language) FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.Name = "Aruba"
|
medium
|
738 |
world_1
|
[
"country",
"countrylanguage"
] |
How many official languages does Afghanistan have?
|
SELECT COUNT(*) FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.Name = "Afghanistan" AND IsOfficial = "T"
|
medium
|
739 |
world_1
|
[
"country",
"countrylanguage"
] |
How many official languages are spoken in Afghanistan?
|
SELECT COUNT(*) FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.Name = "Afghanistan" AND IsOfficial = "T"
|
medium
|
740 |
world_1
|
[
"country",
"countrylanguage"
] |
What is name of the country that speaks the largest number of languages?
|
SELECT T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode GROUP BY T1.Name ORDER BY COUNT(*) DESC LIMIT 1
|
extra
|
741 |
world_1
|
[
"country",
"countrylanguage"
] |
Give the name of the nation that uses the greatest amount of languages.
|
SELECT T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode GROUP BY T1.Name ORDER BY COUNT(*) DESC LIMIT 1
|
extra
|
742 |
world_1
|
[
"country",
"countrylanguage"
] |
Which continent has the most diverse languages?
|
SELECT T1.Continent FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode GROUP BY T1.Continent ORDER BY COUNT(*) DESC LIMIT 1
|
extra
|
743 |
world_1
|
[
"country",
"countrylanguage"
] |
Which continent speaks the most languages?
|
SELECT T1.Continent FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode GROUP BY T1.Continent ORDER BY COUNT(*) DESC LIMIT 1
|
extra
|
744 |
world_1
|
[
"country",
"countrylanguage"
] |
How many countries speak both English and Dutch?
|
SELECT COUNT(*) FROM (SELECT T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = "English" INTERSECT SELECT T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = "Dutch")
|
easy
|
745 |
world_1
|
[
"country",
"countrylanguage"
] |
What is the number of nations that use English and Dutch?
|
SELECT COUNT(*) FROM (SELECT T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = "English" INTERSECT SELECT T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = "Dutch")
|
easy
|
746 |
world_1
|
[
"country",
"countrylanguage"
] |
What are the names of nations speak both English and French?
|
SELECT T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = "English" INTERSECT SELECT T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = "French"
|
extra
|
747 |
world_1
|
[
"country",
"countrylanguage"
] |
Give the names of nations that speak both English and French.
|
SELECT T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = "English" INTERSECT SELECT T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = "French"
|
extra
|
748 |
world_1
|
[
"country",
"countrylanguage"
] |
What are the names of nations where both English and French are official languages?
|
SELECT T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = "English" AND T2.IsOfficial = "T" INTERSECT SELECT T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = "French" AND T2.IsOfficial = "T"
|
extra
|
749 |
world_1
|
[
"country",
"countrylanguage"
] |
Give the names of countries with English and French as official languages.
|
SELECT T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = "English" AND T2.IsOfficial = "T" INTERSECT SELECT T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = "French" AND T2.IsOfficial = "T"
|
extra
|
750 |
world_1
|
[
"country",
"countrylanguage"
] |
What is the number of distinct continents where Chinese is spoken?
|
SELECT COUNT( DISTINCT Continent) FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = "Chinese"
|
medium
|
751 |
world_1
|
[
"country",
"countrylanguage"
] |
How many continents speak Chinese?
|
SELECT COUNT( DISTINCT Continent) FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = "Chinese"
|
medium
|
752 |
world_1
|
[
"country",
"countrylanguage"
] |
What are the regions that use English or Dutch?
|
SELECT DISTINCT T1.Region FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = "English" OR T2.Language = "Dutch"
|
hard
|
753 |
world_1
|
[
"country",
"countrylanguage"
] |
Which regions speak Dutch or English?
|
SELECT DISTINCT T1.Region FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = "English" OR T2.Language = "Dutch"
|
hard
|
754 |
world_1
|
[
"country",
"countrylanguage"
] |
What are the countries where either English or Dutch is the official language ?
|
select t1.name from country as t1 join countrylanguage as t2 on t1.code = t2.countrycode where t2.language = "english" and isofficial = "t" union select t1.name from country as t1 join countrylanguage as t2 on t1.code = t2.countrycode where t2.language = "dutch" and isofficial = "t"
|
extra
|
755 |
world_1
|
[
"country",
"countrylanguage"
] |
Which countries have either English or Dutch as an official language?
|
SELECT * FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = "English" AND IsOfficial = "T" UNION SELECT * FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = "Dutch" AND IsOfficial = "T"
|
extra
|
756 |
world_1
|
[
"country",
"countrylanguage"
] |
Which language is the most popular on the Asian continent?
|
SELECT T2.Language FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.Continent = "Asia" GROUP BY T2.Language ORDER BY COUNT (*) DESC LIMIT 1
|
extra
|
757 |
world_1
|
[
"country",
"countrylanguage"
] |
What is the language that is used by the largest number of Asian nations?
|
SELECT T2.Language FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.Continent = "Asia" GROUP BY T2.Language ORDER BY COUNT (*) DESC LIMIT 1
|
extra
|
758 |
world_1
|
[
"country",
"countrylanguage"
] |
Which languages are spoken by only one country in republic governments?
|
SELECT T2.Language FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.GovernmentForm = "Republic" GROUP BY T2.Language HAVING COUNT(*) = 1
|
hard
|
759 |
world_1
|
[
"country",
"countrylanguage"
] |
What languages are only used by a single country with a republic government?
|
SELECT T2.Language FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.GovernmentForm = "Republic" GROUP BY T2.Language HAVING COUNT(*) = 1
|
hard
|
760 |
world_1
|
[
"city",
"countrylanguage"
] |
Find the city with the largest population that uses English.
|
SELECT T1.Name , T1.Population FROM city AS T1 JOIN countrylanguage AS T2 ON T1.CountryCode = T2.CountryCode WHERE T2.Language = "English" ORDER BY T1.Population DESC LIMIT 1
|
extra
|
761 |
world_1
|
[
"city",
"countrylanguage"
] |
What is the most populace city that speaks English?
|
SELECT T1.Name , T1.Population FROM city AS T1 JOIN countrylanguage AS T2 ON T1.CountryCode = T2.CountryCode WHERE T2.Language = "English" ORDER BY T1.Population DESC LIMIT 1
|
extra
|
762 |
world_1
|
[
"country"
] |
Find the name, population and expected life length of asian country with the largest area?
|
SELECT Name , Population , LifeExpectancy FROM country WHERE Continent = "Asia" ORDER BY SurfaceArea DESC LIMIT 1
|
hard
|
763 |
world_1
|
[
"country"
] |
What are the name, population, and life expectancy of the largest Asian country by land?
|
SELECT Name , Population , LifeExpectancy FROM country WHERE Continent = "Asia" ORDER BY SurfaceArea DESC LIMIT 1
|
hard
|
764 |
world_1
|
[
"country",
"countrylanguage"
] |
What is average life expectancy in the countries where English is not the official language?
|
SELECT avg(LifeExpectancy) FROM country WHERE Name NOT IN (SELECT T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = "English" AND T2.IsOfficial = "T")
|
extra
|
765 |
world_1
|
[
"country",
"countrylanguage"
] |
Give the mean life expectancy of countries in which English is not the official language.
|
SELECT avg(LifeExpectancy) FROM country WHERE Name NOT IN (SELECT T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = "English" AND T2.IsOfficial = "T")
|
extra
|
766 |
world_1
|
[
"country",
"countrylanguage"
] |
What is the total number of people living in the nations that do not use English?
|
SELECT sum(Population) FROM country WHERE Name NOT IN (SELECT T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = "English")
|
extra
|
767 |
world_1
|
[
"country",
"countrylanguage"
] |
How many people live in countries that do not speak English?
|
SELECT sum(Population) FROM country WHERE Name NOT IN (SELECT T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = "English")
|
extra
|
768 |
world_1
|
[
"country",
"countrylanguage"
] |
What is the official language spoken in the country whose head of state is Beatrix?
|
SELECT T2.Language FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.HeadOfState = "Beatrix" AND T2.IsOfficial = "T"
|
medium
|
769 |
world_1
|
[
"country",
"countrylanguage"
] |
What is the official language used in the country the name of whose head of state is Beatrix.
|
SELECT T2.Language FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.HeadOfState = "Beatrix" AND T2.IsOfficial = "T"
|
medium
|
770 |
world_1
|
[
"country",
"countrylanguage"
] |
What is the total number of unique official languages spoken in the countries that are founded before 1930?
|
SELECT count(DISTINCT T2.Language) FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE IndepYear < 1930 AND T2.IsOfficial = "T"
|
medium
|
771 |
world_1
|
[
"country",
"countrylanguage"
] |
For the countries founded before 1930, what is the total number of distinct official languages?
|
SELECT count(DISTINCT T2.Language) FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE IndepYear < 1930 AND T2.IsOfficial = "T"
|
medium
|
772 |
world_1
|
[
"country"
] |
What are the countries that have greater surface area than any country in Europe?
|
SELECT Name FROM country WHERE SurfaceArea > (SELECT min(SurfaceArea) FROM country WHERE Continent = "Europe")
|
hard
|
773 |
world_1
|
[
"country"
] |
Which countries have greater area than that of any country in Europe?
|
SELECT Name FROM country WHERE SurfaceArea > (SELECT min(SurfaceArea) FROM country WHERE Continent = "Europe")
|
hard
|
774 |
world_1
|
[
"country"
] |
What are the African countries that have a population less than any country in Asia?
|
SELECT Name FROM country WHERE Continent = "Africa" AND population < (SELECT max(population) FROM country WHERE Continent = "Asia")
|
extra
|
775 |
world_1
|
[
"country"
] |
Which African countries have a smaller population than that of any country in Asia?
|
SELECT Name FROM country WHERE Continent = "Africa" AND population < (SELECT min(population) FROM country WHERE Continent = "Asia")
|
extra
|
776 |
world_1
|
[
"country"
] |
Which Asian countries have a population that is larger than any country in Africa?
|
SELECT Name FROM country WHERE Continent = "Asia" AND population > (SELECT max(population) FROM country WHERE Continent = "Africa")
|
extra
|
777 |
world_1
|
[
"country"
] |
What are the Asian countries which have a population larger than that of any country in Africa?
|
SELECT Name FROM country WHERE Continent = "Asia" AND population > (SELECT min(population) FROM country WHERE Continent = "Africa")
|
extra
|
778 |
world_1
|
[
"countrylanguage"
] |
What are the country codes for countries that do not speak English?
|
SELECT CountryCode FROM countrylanguage EXCEPT SELECT CountryCode FROM countrylanguage WHERE LANGUAGE = "English"
|
hard
|
779 |
world_1
|
[
"countrylanguage"
] |
Return the country codes for countries that do not speak English.
|
SELECT CountryCode FROM countrylanguage EXCEPT SELECT CountryCode FROM countrylanguage WHERE LANGUAGE = "English"
|
hard
|
780 |
world_1
|
[
"countrylanguage"
] |
What are the country codes of countries where people use languages other than English?
|
SELECT DISTINCT CountryCode FROM countrylanguage WHERE LANGUAGE != "English"
|
easy
|
781 |
world_1
|
[
"countrylanguage"
] |
Give the country codes for countries in which people speak langauges that are not English.
|
SELECT DISTINCT CountryCode FROM countrylanguage WHERE LANGUAGE != "English"
|
easy
|
782 |
world_1
|
[
"country",
"countrylanguage"
] |
What are the codes of the countries that do not speak English and whose government forms are not Republic?
|
SELECT Code FROM country WHERE GovernmentForm != "Republic" EXCEPT SELECT CountryCode FROM countrylanguage WHERE LANGUAGE = "English"
|
hard
|
783 |
world_1
|
[
"country",
"countrylanguage"
] |
Return the codes of countries that do not speak English and do not have Republics for governments.
|
SELECT Code FROM country WHERE GovernmentForm != "Republic" EXCEPT SELECT CountryCode FROM countrylanguage WHERE LANGUAGE = "English"
|
hard
|
784 |
world_1
|
[
"city",
"country",
"countrylanguage"
] |
Which cities are in European countries where English is not the official language?
|
SELECT DISTINCT T2.Name FROM country AS T1 JOIN city AS T2 ON T2.CountryCode = T1.Code WHERE T1.Continent = 'Europe' AND T1.Name NOT IN (SELECT T3.Name FROM country AS T3 JOIN countrylanguage AS T4 ON T3.Code = T4.CountryCode WHERE T4.IsOfficial = 'T' AND T4.Language = 'English')
|
extra
|
785 |
world_1
|
[
"city",
"country",
"countrylanguage"
] |
What are the names of cities in Europe for which English is not the official language?
|
SELECT DISTINCT T2.Name FROM country AS T1 JOIN city AS T2 ON T2.CountryCode = T1.Code WHERE T1.Continent = 'Europe' AND T1.Name NOT IN (SELECT T3.Name FROM country AS T3 JOIN countrylanguage AS T4 ON T3.Code = T4.CountryCode WHERE T4.IsOfficial = 'T' AND T4.Language = 'English')
|
extra
|
786 |
world_1
|
[
"city",
"country",
"countrylanguage"
] |
Which unique cities are in Asian countries where Chinese is the official language ?
|
select distinct t3.name from country as t1 join countrylanguage as t2 on t1.code = t2.countrycode join city as t3 on t1.code = t3.countrycode where t2.isofficial = 't' and t2.language = 'chinese' and t1.continent = "asia"
|
hard
|
787 |
world_1
|
[
"city",
"country",
"countrylanguage"
] |
Return the different names of cities that are in Asia and for which Chinese is the official language.
|
SELECT DISTINCT T3.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode JOIN city AS T3 ON T1.Code = T3.CountryCode WHERE T2.IsOfficial = 'T' AND T2.Language = 'Chinese' AND T1.Continent = "Asia"
|
hard
|
788 |
world_1
|
[
"country"
] |
What are the name, independence year, and surface area of the country with the smallest population?
|
SELECT Name , SurfaceArea , IndepYear FROM country ORDER BY Population LIMIT 1
|
medium
|
789 |
world_1
|
[
"country"
] |
Give the name, year of independence, and surface area of the country that has the lowest population.
|
SELECT Name , SurfaceArea , IndepYear FROM country ORDER BY Population LIMIT 1
|
medium
|
790 |
world_1
|
[
"country"
] |
What are the population, name and leader of the country with the largest area?
|
SELECT Name , population , HeadOfState FROM country ORDER BY SurfaceArea DESC LIMIT 1
|
medium
|
791 |
world_1
|
[
"country"
] |
Give the name, population, and head of state for the country that has the largest area.
|
SELECT Name , population , HeadOfState FROM country ORDER BY SurfaceArea DESC LIMIT 1
|
medium
|
792 |
world_1
|
[
"country",
"countrylanguage"
] |
Return the country name and the numbers of languages spoken for each country that speaks at least 3 languages.
|
SELECT COUNT(T2.Language) , T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode GROUP BY T1.Name HAVING COUNT(*) > 2
|
medium
|
793 |
world_1
|
[
"country",
"countrylanguage"
] |
What are the names of countries that speak more than 2 languages, as well as how many languages they speak?
|
SELECT COUNT(T2.Language) , T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode GROUP BY T1.Name HAVING COUNT(*) > 2
|
medium
|
794 |
world_1
|
[
"city"
] |
Find the number of cities in each district whose population is greater than the average population of cities?
|
SELECT count(*) , District FROM city WHERE Population > (SELECT avg(Population) FROM city) GROUP BY District
|
extra
|
795 |
world_1
|
[
"city"
] |
How many cities in each district have a population that is above the average population across all cities?
|
SELECT count(*) , District FROM city WHERE Population > (SELECT avg(Population) FROM city) GROUP BY District
|
extra
|
796 |
world_1
|
[
"country"
] |
Find the government form name and total population for each government form whose average life expectancy is longer than 72.
|
SELECT sum(Population) , GovernmentForm FROM country GROUP BY GovernmentForm HAVING avg(LifeExpectancy) > 72
|
medium
|
797 |
world_1
|
[
"country"
] |
What are the different government forms and what is the total population of each for government forms that have an average life expectancy greater than 72?
|
SELECT sum(Population) , GovernmentForm FROM country GROUP BY GovernmentForm HAVING avg(LifeExpectancy) > 72
|
medium
|
798 |
world_1
|
[
"country"
] |
Find the average life expectancy and total population for each continent where the average life expectancy is shorter than 72?
|
SELECT sum(Population) , avg(LifeExpectancy) , Continent FROM country GROUP BY Continent HAVING avg(LifeExpectancy) < 72
|
medium
|
799 |
world_1
|
[
"country"
] |
What are the different continents and the total popuation and average life expectancy corresponding to each, for continents that have an average life expectancy less than 72?
|
SELECT sum(Population) , avg(LifeExpectancy) , Continent FROM country GROUP BY Continent HAVING avg(LifeExpectancy) < 72
|
medium
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.