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