answer
stringlengths
18
557
index
int64
1
78.6k
question
stringlengths
12
244
context
stringlengths
27
489
SELECT T2.Episode FROM TV_Channel AS T1 JOIN TV_series AS T2 ON T1.id = T2.Channel WHERE T1.series_name = "Sky Radio"
4,301
List the Episode of all TV series showed on TV Channel with series name "Sky Radio".
CREATE TABLE TV_Channel (id VARCHAR, series_name VARCHAR); CREATE TABLE TV_series (Episode VARCHAR, Channel VARCHAR)
SELECT COUNT(*), Directed_by FROM cartoon GROUP BY Directed_by
4,302
Find the number of cartoons directed by each of the listed directors.
CREATE TABLE cartoon (Directed_by VARCHAR)
SELECT production_code, channel FROM cartoon ORDER BY original_air_date DESC LIMIT 1
4,303
Find the production code and channel of the most recently aired cartoon .
CREATE TABLE cartoon (production_code VARCHAR, channel VARCHAR, original_air_date VARCHAR)
SELECT package_option, series_name FROM TV_Channel WHERE hight_definition_TV = "yes"
4,304
Find the package choice and series name of the TV channel that has high definition TV.
CREATE TABLE TV_Channel (package_option VARCHAR, series_name VARCHAR, hight_definition_TV VARCHAR)
SELECT T1.country FROM TV_Channel AS T1 JOIN cartoon AS T2 ON T1.id = T2.Channel WHERE T2.written_by = 'Todd Casey'
4,305
which countries' tv channels are playing some cartoon written by Todd Casey?
CREATE TABLE TV_Channel (country VARCHAR, id VARCHAR); CREATE TABLE cartoon (Channel VARCHAR, written_by VARCHAR)
SELECT country FROM TV_Channel EXCEPT SELECT T1.country FROM TV_Channel AS T1 JOIN cartoon AS T2 ON T1.id = T2.Channel WHERE T2.written_by = 'Todd Casey'
4,306
which countries' tv channels are not playing any cartoon written by Todd Casey?
CREATE TABLE TV_Channel (country VARCHAR, id VARCHAR); CREATE TABLE TV_Channel (country VARCHAR); CREATE TABLE cartoon (Channel VARCHAR, written_by VARCHAR)
SELECT T1.series_name, T1.country FROM TV_Channel AS T1 JOIN cartoon AS T2 ON T1.id = T2.Channel WHERE T2.directed_by = 'Michael Chang' INTERSECT SELECT T1.series_name, T1.country FROM TV_Channel AS T1 JOIN cartoon AS T2 ON T1.id = T2.Channel WHERE T2.directed_by = 'Ben Jones'
4,307
Find the series name and country of the tv channel that is playing some cartoons directed by Ben Jones and Michael Chang?
CREATE TABLE TV_Channel (series_name VARCHAR, country VARCHAR, id VARCHAR); CREATE TABLE cartoon (Channel VARCHAR, directed_by VARCHAR)
SELECT Pixel_aspect_ratio_PAR, country FROM tv_channel WHERE LANGUAGE <> 'English'
4,308
find the pixel aspect ratio and nation of the tv channels that do not use English.
CREATE TABLE tv_channel (Pixel_aspect_ratio_PAR VARCHAR, country VARCHAR, LANGUAGE VARCHAR)
SELECT id FROM tv_channel GROUP BY country HAVING COUNT(*) > 2
4,309
find id of the tv channels that from the countries where have more than two tv channels.
CREATE TABLE tv_channel (id VARCHAR, country VARCHAR)
SELECT id FROM TV_Channel EXCEPT SELECT channel FROM cartoon WHERE directed_by = 'Ben Jones'
4,310
find the id of tv channels that do not play any cartoon directed by Ben Jones.
CREATE TABLE TV_Channel (id VARCHAR, channel VARCHAR, directed_by VARCHAR); CREATE TABLE cartoon (id VARCHAR, channel VARCHAR, directed_by VARCHAR)
SELECT package_option FROM TV_Channel WHERE NOT id IN (SELECT channel FROM cartoon WHERE directed_by = 'Ben Jones')
4,311
find the package option of the tv channel that do not have any cartoon directed by Ben Jones.
CREATE TABLE cartoon (package_option VARCHAR, id VARCHAR, channel VARCHAR, directed_by VARCHAR); CREATE TABLE TV_Channel (package_option VARCHAR, id VARCHAR, channel VARCHAR, directed_by VARCHAR)
SELECT COUNT(*) FROM poker_player
4,312
How many poker players are there?
CREATE TABLE poker_player (Id VARCHAR)
SELECT Earnings FROM poker_player ORDER BY Earnings DESC
4,313
List the earnings of poker players in descending order.
CREATE TABLE poker_player (Earnings VARCHAR)
SELECT Final_Table_Made, Best_Finish FROM poker_player
4,314
List the final tables made and the best finishes of poker players.
CREATE TABLE poker_player (Final_Table_Made VARCHAR, Best_Finish VARCHAR)
SELECT AVG(Earnings) FROM poker_player
4,315
What is the average earnings of poker players?
CREATE TABLE poker_player (Earnings INTEGER)
SELECT Money_Rank FROM poker_player ORDER BY Earnings DESC LIMIT 1
4,316
What is the money rank of the poker player with the highest earnings?
CREATE TABLE poker_player (Money_Rank VARCHAR, Earnings VARCHAR)
SELECT MAX(Final_Table_Made) FROM poker_player WHERE Earnings < 200000
4,317
What is the maximum number of final tables made among poker players with earnings less than 200000?
CREATE TABLE poker_player (Final_Table_Made INTEGER, Earnings INTEGER)
SELECT T1.Name FROM people AS T1 JOIN poker_player AS T2 ON T1.People_ID = T2.People_ID
4,318
What are the names of poker players?
CREATE TABLE poker_player (People_ID VARCHAR); CREATE TABLE people (Name VARCHAR, People_ID VARCHAR)
SELECT T1.Name FROM people AS T1 JOIN poker_player AS T2 ON T1.People_ID = T2.People_ID WHERE T2.Earnings > 300000
4,319
What are the names of poker players whose earnings is higher than 300000?
CREATE TABLE poker_player (People_ID VARCHAR, Earnings INTEGER); CREATE TABLE people (Name VARCHAR, People_ID VARCHAR)
SELECT T1.Name FROM people AS T1 JOIN poker_player AS T2 ON T1.People_ID = T2.People_ID ORDER BY T2.Final_Table_Made
4,320
List the names of poker players ordered by the final tables made in ascending order.
CREATE TABLE poker_player (People_ID VARCHAR, Final_Table_Made VARCHAR); CREATE TABLE people (Name VARCHAR, People_ID VARCHAR)
SELECT T1.Birth_Date FROM people AS T1 JOIN poker_player AS T2 ON T1.People_ID = T2.People_ID ORDER BY T2.Earnings LIMIT 1
4,321
What is the birth date of the poker player with the lowest earnings?
CREATE TABLE poker_player (People_ID VARCHAR, Earnings VARCHAR); CREATE TABLE people (Birth_Date VARCHAR, People_ID VARCHAR)
SELECT T2.Money_Rank FROM people AS T1 JOIN poker_player AS T2 ON T1.People_ID = T2.People_ID ORDER BY T1.Height DESC LIMIT 1
4,322
What is the money rank of the tallest poker player?
CREATE TABLE people (People_ID VARCHAR, Height VARCHAR); CREATE TABLE poker_player (Money_Rank VARCHAR, People_ID VARCHAR)
SELECT AVG(T2.Earnings) FROM people AS T1 JOIN poker_player AS T2 ON T1.People_ID = T2.People_ID WHERE T1.Height > 200
4,323
What is the average earnings of poker players with height higher than 200?
CREATE TABLE people (People_ID VARCHAR, Height INTEGER); CREATE TABLE poker_player (Earnings INTEGER, People_ID VARCHAR)
SELECT T1.Name FROM people AS T1 JOIN poker_player AS T2 ON T1.People_ID = T2.People_ID ORDER BY T2.Earnings DESC
4,324
What are the names of poker players in descending order of earnings?
CREATE TABLE poker_player (People_ID VARCHAR, Earnings VARCHAR); CREATE TABLE people (Name VARCHAR, People_ID VARCHAR)
SELECT Nationality, COUNT(*) FROM people GROUP BY Nationality
4,325
What are different nationalities of people and the corresponding number of people from each nation?
CREATE TABLE people (Nationality VARCHAR)
SELECT Nationality FROM people GROUP BY Nationality ORDER BY COUNT(*) DESC LIMIT 1
4,326
What is the most common nationality of people?
CREATE TABLE people (Nationality VARCHAR)
SELECT Nationality FROM people GROUP BY Nationality HAVING COUNT(*) >= 2
4,327
What are the nationalities that are shared by at least two people?
CREATE TABLE people (Nationality VARCHAR)
SELECT Name, Birth_Date FROM people ORDER BY Name
4,328
List the names and birth dates of people in ascending alphabetical order of name.
CREATE TABLE people (Name VARCHAR, Birth_Date VARCHAR)
SELECT Name FROM people WHERE Nationality <> "Russia"
4,329
Show names of people whose nationality is not "Russia".
CREATE TABLE people (Name VARCHAR, Nationality VARCHAR)
SELECT Name FROM people WHERE NOT People_ID IN (SELECT People_ID FROM poker_player)
4,330
List the names of people that are not poker players.
CREATE TABLE poker_player (Name VARCHAR, People_ID VARCHAR); CREATE TABLE people (Name VARCHAR, People_ID VARCHAR)
SELECT COUNT(DISTINCT Nationality) FROM people
4,331
How many distinct nationalities are there?
CREATE TABLE people (Nationality VARCHAR)
SELECT COUNT(*) FROM area_code_state
4,332
How many states are there?
CREATE TABLE area_code_state (Id VARCHAR)
SELECT contestant_number, contestant_name FROM contestants ORDER BY contestant_name DESC
4,333
List the contestant numbers and names, ordered by contestant name descending.
CREATE TABLE contestants (contestant_number VARCHAR, contestant_name VARCHAR)
SELECT vote_id, phone_number, state FROM votes
4,334
List the vote ids, phone numbers and states of all votes.
CREATE TABLE votes (vote_id VARCHAR, phone_number VARCHAR, state VARCHAR)
SELECT MAX(area_code), MIN(area_code) FROM area_code_state
4,335
What are the maximum and minimum values of area codes?
CREATE TABLE area_code_state (area_code INTEGER)
SELECT MAX(created) FROM votes WHERE state = 'CA'
4,336
What is last date created of votes from the state 'CA'?
CREATE TABLE votes (created INTEGER, state VARCHAR)
SELECT contestant_name FROM contestants WHERE contestant_name <> 'Jessie Alloway'
4,337
What are the names of the contestants whose names are not 'Jessie Alloway'
CREATE TABLE contestants (contestant_name VARCHAR)
SELECT DISTINCT state, created FROM votes
4,338
What are the distinct states and create time of all votes?
CREATE TABLE votes (state VARCHAR, created VARCHAR)
SELECT T1.contestant_number, T1.contestant_name FROM contestants AS T1 JOIN votes AS T2 ON T1.contestant_number = T2.contestant_number GROUP BY T1.contestant_number HAVING COUNT(*) >= 2
4,339
What are the contestant numbers and names of the contestants who had at least two votes?
CREATE TABLE votes (contestant_number VARCHAR); CREATE TABLE contestants (contestant_number VARCHAR, contestant_name VARCHAR)
SELECT T1.contestant_number, T1.contestant_name FROM contestants AS T1 JOIN votes AS T2 ON T1.contestant_number = T2.contestant_number GROUP BY T1.contestant_number ORDER BY COUNT(*) LIMIT 1
4,340
Of all the contestants who got voted, what is the contestant number and name of the contestant who got least votes?
CREATE TABLE votes (contestant_number VARCHAR); CREATE TABLE contestants (contestant_number VARCHAR, contestant_name VARCHAR)
SELECT COUNT(*) FROM votes WHERE state = 'NY' OR state = 'CA'
4,341
What are the number of votes from state 'NY' or 'CA'?
CREATE TABLE votes (state VARCHAR)
SELECT COUNT(*) FROM contestants WHERE NOT contestant_number IN (SELECT contestant_number FROM votes)
4,342
How many contestants did not get voted?
CREATE TABLE contestants (contestant_number VARCHAR); CREATE TABLE votes (contestant_number VARCHAR)
SELECT T1.area_code FROM area_code_state AS T1 JOIN votes AS T2 ON T1.state = T2.state GROUP BY T1.area_code ORDER BY COUNT(*) DESC LIMIT 1
4,343
What is the area code in which the most voters voted?
CREATE TABLE area_code_state (area_code VARCHAR, state VARCHAR); CREATE TABLE votes (state VARCHAR)
SELECT T2.created, T2.state, T2.phone_number FROM contestants AS T1 JOIN votes AS T2 ON T1.contestant_number = T2.contestant_number WHERE T1.contestant_name = 'Tabatha Gehling'
4,344
What are the create dates, states, and phone numbers of the votes that were for the contestant named 'Tabatha Gehling'?
CREATE TABLE contestants (contestant_number VARCHAR, contestant_name VARCHAR); CREATE TABLE votes (created VARCHAR, state VARCHAR, phone_number VARCHAR, contestant_number VARCHAR)
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 J...
4,345
List the area codes in which voters voted both for the contestant 'Tabatha Gehling' and the contestant 'Kelly Clauss'.
CREATE TABLE votes (contestant_number VARCHAR, state VARCHAR); CREATE TABLE contestants (contestant_number VARCHAR, contestant_name VARCHAR); CREATE TABLE area_code_state (area_code VARCHAR, state VARCHAR)
SELECT contestant_name FROM contestants WHERE contestant_name LIKE "%al%"
4,346
Return the names of the contestants whose names contain the substring 'Al' .
CREATE TABLE contestants (contestant_name VARCHAR)
SELECT Name FROM country WHERE IndepYear > 1950
4,347
What are the names of all the countries that became independent after 1950?
CREATE TABLE country (Name VARCHAR, IndepYear INTEGER)
SELECT COUNT(*) FROM country WHERE GovernmentForm = "Republic"
4,348
How many countries have a republic as their form of government?
CREATE TABLE country (GovernmentForm VARCHAR)
SELECT SUM(SurfaceArea) FROM country WHERE Region = "Caribbean"
4,349
What is the total surface area of the countries in the Caribbean region?
CREATE TABLE country (SurfaceArea INTEGER, Region VARCHAR)
SELECT Continent FROM country WHERE Name = "Anguilla"
4,350
Which continent is Anguilla in?
CREATE TABLE country (Continent VARCHAR, Name VARCHAR)
SELECT Region FROM country AS T1 JOIN city AS T2 ON T1.Code = T2.CountryCode WHERE T2.Name = "Kabul"
4,351
Which region is the city Kabul located in?
CREATE TABLE country (Code VARCHAR); CREATE TABLE city (CountryCode VARCHAR, Name VARCHAR)
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
4,352
Which language is the most popular in Aruba?
CREATE TABLE country (Code VARCHAR, Name VARCHAR); CREATE TABLE countrylanguage (Language VARCHAR, CountryCode VARCHAR)
SELECT Population, LifeExpectancy FROM country WHERE Name = "Brazil"
4,353
What are the population and life expectancies in Brazil?
CREATE TABLE country (Population VARCHAR, LifeExpectancy VARCHAR, Name VARCHAR)
SELECT Population, Region FROM country WHERE Name = "Angola"
4,354
What are the region and population of Angola?
CREATE TABLE country (Population VARCHAR, Region VARCHAR, Name VARCHAR)
SELECT AVG(LifeExpectancy) FROM country WHERE Region = "Central Africa"
4,355
What is the average expected life expectancy for countries in the region of Central Africa?
CREATE TABLE country (LifeExpectancy INTEGER, Region VARCHAR)
SELECT Name FROM country WHERE Continent = "Asia" ORDER BY LifeExpectancy LIMIT 1
4,356
What is the name of country that has the shortest life expectancy in Asia?
CREATE TABLE country (Name VARCHAR, Continent VARCHAR, LifeExpectancy VARCHAR)
SELECT SUM(Population), MAX(GNP) FROM country WHERE Continent = "Asia"
4,357
What is the total population and maximum GNP in Asia?
CREATE TABLE country (Population INTEGER, GNP INTEGER, Continent VARCHAR)
SELECT AVG(LifeExpectancy) FROM country WHERE Continent = "Africa" AND GovernmentForm = "Republic"
4,358
What is the average life expectancy in African countries that are republics?
CREATE TABLE country (LifeExpectancy INTEGER, Continent VARCHAR, GovernmentForm VARCHAR)
SELECT SUM(SurfaceArea) FROM country WHERE Continent = "Asia" OR Continent = "Europe"
4,359
What is the total surface area of the continents Asia and Europe?
CREATE TABLE country (SurfaceArea INTEGER, Continent VARCHAR)
SELECT SUM(Population) FROM city WHERE District = "Gelderland"
4,360
How many people live in Gelderland district?
CREATE TABLE city (Population INTEGER, District VARCHAR)
SELECT AVG(GNP), SUM(population) FROM country WHERE GovernmentForm = "US Territory"
4,361
What is the average GNP and total population in all nations whose government is US territory?
CREATE TABLE country (GNP INTEGER, population INTEGER, GovernmentForm VARCHAR)
SELECT COUNT(DISTINCT LANGUAGE) FROM countrylanguage
4,362
How many unique languages are spoken in the world?
CREATE TABLE countrylanguage (LANGUAGE VARCHAR)
SELECT COUNT(DISTINCT GovernmentForm) FROM country WHERE Continent = "Africa"
4,363
How many type of governments are in Africa?
CREATE TABLE country (GovernmentForm VARCHAR, Continent VARCHAR)
SELECT COUNT(T2.Language) FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.Name = "Aruba"
4,364
What is the total number of languages used in Aruba?
CREATE TABLE country (Code VARCHAR, Name VARCHAR); CREATE TABLE countrylanguage (Language VARCHAR, CountryCode VARCHAR)
SELECT COUNT(*) FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.Name = "Afghanistan" AND IsOfficial = "T"
4,365
How many official languages does Afghanistan have?
CREATE TABLE country (Code VARCHAR, Name VARCHAR); CREATE TABLE countrylanguage (CountryCode VARCHAR)
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
4,366
What is name of the country that speaks the largest number of languages?
CREATE TABLE countrylanguage (CountryCode VARCHAR); CREATE TABLE country (Name VARCHAR, Code VARCHAR)
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
4,367
Which continent has the most diverse languages?
CREATE TABLE countrylanguage (CountryCode VARCHAR); CREATE TABLE country (Continent VARCHAR, Code VARCHAR)
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")
4,368
How many countries speak both English and Dutch?
CREATE TABLE country (Name VARCHAR, Code VARCHAR); CREATE TABLE countrylanguage (CountryCode VARCHAR, Language VARCHAR)
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"
4,369
What are the names of nations speak both English and French?
CREATE TABLE country (Name VARCHAR, Code VARCHAR); CREATE TABLE countrylanguage (CountryCode VARCHAR, Language VARCHAR)
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"
4,370
What are the names of nations where both English and French are official languages?
CREATE TABLE countrylanguage (CountryCode VARCHAR, Language VARCHAR, IsOfficial VARCHAR); CREATE TABLE country (Name VARCHAR, Code VARCHAR)
SELECT COUNT(DISTINCT Continent) FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = "Chinese"
4,371
What is the number of distinct continents where Chinese is spoken?
CREATE TABLE country (Code VARCHAR); CREATE TABLE countrylanguage (CountryCode VARCHAR, Language VARCHAR)
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"
4,372
What are the regions that use English or Dutch?
CREATE TABLE countrylanguage (CountryCode VARCHAR, Language VARCHAR); CREATE TABLE country (Region VARCHAR, Code VARCHAR)
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"
4,373
What are the countries where either English or Dutch is the official language ?
CREATE TABLE countrylanguage (countrycode VARCHAR, language VARCHAR); CREATE TABLE country (name VARCHAR, code VARCHAR)
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"
4,374
Which countries have either English or Dutch as an official language?
CREATE TABLE country (Code VARCHAR); CREATE TABLE countrylanguage (CountryCode VARCHAR, Language VARCHAR)
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
4,375
Which language is the most popular on the Asian continent?
CREATE TABLE country (Code VARCHAR, Continent VARCHAR); CREATE TABLE countrylanguage (Language VARCHAR, CountryCode VARCHAR)
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
4,376
Which languages are spoken by only one country in republic governments?
CREATE TABLE countrylanguage (Language VARCHAR, CountryCode VARCHAR); CREATE TABLE country (Code VARCHAR, GovernmentForm VARCHAR)
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
4,377
Find the city with the largest population that uses English.
CREATE TABLE city (Name VARCHAR, Population VARCHAR, CountryCode VARCHAR); CREATE TABLE countrylanguage (CountryCode VARCHAR, Language VARCHAR)
SELECT Name, Population, LifeExpectancy FROM country WHERE Continent = "Asia" ORDER BY SurfaceArea DESC LIMIT 1
4,378
Find the name, population and expected life length of asian country with the largest area?
CREATE TABLE country (Name VARCHAR, Population VARCHAR, LifeExpectancy VARCHAR, Continent VARCHAR, SurfaceArea VARCHAR)
SELECT AVG(LifeExpectancy) FROM country WHERE NOT Name 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")
4,379
What is average life expectancy in the countries where English is not the official language?
CREATE TABLE countrylanguage (CountryCode VARCHAR, Language VARCHAR, IsOfficial VARCHAR); CREATE TABLE country (LifeExpectancy INTEGER, Name VARCHAR); CREATE TABLE country (Name VARCHAR, Code VARCHAR)
SELECT SUM(Population) FROM country WHERE NOT Name IN (SELECT T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = "English")
4,380
What is the total number of people living in the nations that do not use English?
CREATE TABLE country (Name VARCHAR, Code VARCHAR); CREATE TABLE countrylanguage (CountryCode VARCHAR, Language VARCHAR); CREATE TABLE country (Population INTEGER, Name VARCHAR)
SELECT T2.Language FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.HeadOfState = "Beatrix" AND T2.IsOfficial = "T"
4,381
What is the official language spoken in the country whose head of state is Beatrix?
CREATE TABLE country (Code VARCHAR, HeadOfState VARCHAR); CREATE TABLE countrylanguage (Language VARCHAR, CountryCode VARCHAR, IsOfficial VARCHAR)
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"
4,382
What is the total number of unique official languages spoken in the countries that are founded before 1930?
CREATE TABLE country (Code VARCHAR); CREATE TABLE countrylanguage (Language VARCHAR, CountryCode VARCHAR, IsOfficial VARCHAR)
SELECT Name FROM country WHERE SurfaceArea > (SELECT MIN(SurfaceArea) FROM country WHERE Continent = "Europe")
4,383
What are the countries that have greater surface area than any country in Europe?
CREATE TABLE country (Name VARCHAR, SurfaceArea INTEGER, Continent VARCHAR)
SELECT Name FROM country WHERE Continent = "Africa" AND population < (SELECT MAX(population) FROM country WHERE Continent = "Asia")
4,384
What are the African countries that have a population less than any country in Asia?
CREATE TABLE country (Name VARCHAR, Continent VARCHAR, population INTEGER)
SELECT Name FROM country WHERE Continent = "Africa" AND population < (SELECT MIN(population) FROM country WHERE Continent = "Asia")
4,385
Which African countries have a smaller population than that of any country in Asia?
CREATE TABLE country (Name VARCHAR, Continent VARCHAR, population INTEGER)
SELECT Name FROM country WHERE Continent = "Asia" AND population > (SELECT MAX(population) FROM country WHERE Continent = "Africa")
4,386
Which Asian countries have a population that is larger than any country in Africa?
CREATE TABLE country (Name VARCHAR, Continent VARCHAR, population INTEGER)
SELECT Name FROM country WHERE Continent = "Asia" AND population > (SELECT MIN(population) FROM country WHERE Continent = "Africa")
4,387
What are the Asian countries which have a population larger than that of any country in Africa?
CREATE TABLE country (Name VARCHAR, Continent VARCHAR, population INTEGER)
SELECT CountryCode FROM countrylanguage EXCEPT SELECT CountryCode FROM countrylanguage WHERE LANGUAGE = "English"
4,388
What are the country codes for countries that do not speak English?
CREATE TABLE countrylanguage (CountryCode VARCHAR, LANGUAGE VARCHAR)
SELECT DISTINCT CountryCode FROM countrylanguage WHERE LANGUAGE <> "English"
4,389
What are the country codes of countries where people use languages other than English?
CREATE TABLE countrylanguage (CountryCode VARCHAR, LANGUAGE VARCHAR)
SELECT Code FROM country WHERE GovernmentForm <> "Republic" EXCEPT SELECT CountryCode FROM countrylanguage WHERE LANGUAGE = "English"
4,390
What are the codes of the countries that do not speak English and whose government forms are not Republic?
CREATE TABLE countrylanguage (Code VARCHAR, CountryCode VARCHAR, GovernmentForm VARCHAR, LANGUAGE VARCHAR); CREATE TABLE country (Code VARCHAR, CountryCode VARCHAR, GovernmentForm VARCHAR, LANGUAGE VARCHAR)
SELECT DISTINCT T2.Name FROM country AS T1 JOIN city AS T2 ON T2.CountryCode = T1.Code WHERE T1.Continent = 'Europe' AND NOT T1.Name 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')
4,391
Which cities are in European countries where English is not the official language?
CREATE TABLE city (Name VARCHAR, CountryCode VARCHAR); CREATE TABLE country (Name VARCHAR, Code VARCHAR); CREATE TABLE countrylanguage (CountryCode VARCHAR, IsOfficial VARCHAR, Language VARCHAR); CREATE TABLE country (Code VARCHAR, Continent VARCHAR, Name VARCHAR)
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"
4,392
Which unique cities are in Asian countries where Chinese is the official language ?
CREATE TABLE city (name VARCHAR, countrycode VARCHAR); CREATE TABLE countrylanguage (countrycode VARCHAR, isofficial VARCHAR, language VARCHAR); CREATE TABLE country (code VARCHAR, continent VARCHAR)
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"
4,393
Return the different names of cities that are in Asia and for which Chinese is the official language.
CREATE TABLE country (Code VARCHAR, Continent VARCHAR); CREATE TABLE countrylanguage (CountryCode VARCHAR, IsOfficial VARCHAR, Language VARCHAR); CREATE TABLE city (Name VARCHAR, CountryCode VARCHAR)
SELECT Name, SurfaceArea, IndepYear FROM country ORDER BY Population LIMIT 1
4,394
What are the name, independence year, and surface area of the country with the smallest population?
CREATE TABLE country (Name VARCHAR, SurfaceArea VARCHAR, IndepYear VARCHAR, Population VARCHAR)
SELECT Name, population, HeadOfState FROM country ORDER BY SurfaceArea DESC LIMIT 1
4,395
What are the population, name and leader of the country with the largest area?
CREATE TABLE country (Name VARCHAR, population VARCHAR, HeadOfState VARCHAR, SurfaceArea VARCHAR)
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
4,396
Return the country name and the numbers of languages spoken for each country that speaks at least 3 languages.
CREATE TABLE country (Name VARCHAR, Code VARCHAR); CREATE TABLE countrylanguage (Language VARCHAR, CountryCode VARCHAR)
SELECT COUNT(*), District FROM city WHERE Population > (SELECT AVG(Population) FROM city) GROUP BY District
4,397
Find the number of cities in each district whose population is greater than the average population of cities?
CREATE TABLE city (District VARCHAR, Population INTEGER)
SELECT SUM(Population), GovernmentForm FROM country GROUP BY GovernmentForm HAVING AVG(LifeExpectancy) > 72
4,398
Find the government form name and total population for each government form whose average life expectancy is longer than 72.
CREATE TABLE country (GovernmentForm VARCHAR, Population INTEGER, LifeExpectancy INTEGER)
SELECT SUM(Population), AVG(LifeExpectancy), Continent FROM country GROUP BY Continent HAVING AVG(LifeExpectancy) < 72
4,399
Find the average life expectancy and total population for each continent where the average life expectancy is shorter than 72?
CREATE TABLE country (Continent VARCHAR, Population INTEGER, LifeExpectancy INTEGER)
SELECT Name, SurfaceArea FROM country ORDER BY SurfaceArea DESC LIMIT 5
4,400
What are the names and areas of countries with the top 5 largest area?
CREATE TABLE country (Name VARCHAR, SurfaceArea VARCHAR)