answer
stringlengths
18
557
context
stringlengths
27
489
question
stringlengths
12
244
text
stringlengths
275
1.7k
SELECT T2.Episode FROM TV_Channel AS T1 JOIN TV_series AS T2 ON T1.id = T2.Channel WHERE T1.series_name = "Sky Radio"
CREATE TABLE TV_Channel (id VARCHAR, series_name VARCHAR); CREATE TABLE TV_series (Episode VARCHAR, Channel VARCHAR)
List the Episode of all TV series showed on TV Channel with series name "Sky Radio".
<s>[INST] Given the following SQL query and context: Query: SELECT T2.Episode FROM TV_Channel AS T1 JOIN TV_series AS T2 ON T1.id = T2.Channel WHERE T1.series_name = "Sky Radio" Context: CREATE TABLE TV_Channel (id VARCHAR, series_name VARCHAR); CREATE TABLE TV_series (Episode VARCHAR, Channel VARCHAR) [/INST] Based on...
SELECT COUNT(*), Directed_by FROM cartoon GROUP BY Directed_by
CREATE TABLE cartoon (Directed_by VARCHAR)
Find the number of cartoons directed by each of the listed directors.
<s>[INST] Given the following SQL query and context: Query: SELECT COUNT(*), Directed_by FROM cartoon GROUP BY Directed_by Context: CREATE TABLE cartoon (Directed_by VARCHAR) [/INST] Based on the provided SQL query and context, your question is: Find the number of cartoons directed by each of the listed directors. The ...
SELECT production_code, channel FROM cartoon ORDER BY original_air_date DESC LIMIT 1
CREATE TABLE cartoon (production_code VARCHAR, channel VARCHAR, original_air_date VARCHAR)
Find the production code and channel of the most recently aired cartoon .
<s>[INST] Given the following SQL query and context: Query: SELECT production_code, channel FROM cartoon ORDER BY original_air_date DESC LIMIT 1 Context: CREATE TABLE cartoon (production_code VARCHAR, channel VARCHAR, original_air_date VARCHAR) [/INST] Based on the provided SQL query and context, your question is: Find...
SELECT package_option, series_name FROM TV_Channel WHERE hight_definition_TV = "yes"
CREATE TABLE TV_Channel (package_option VARCHAR, series_name VARCHAR, hight_definition_TV VARCHAR)
Find the package choice and series name of the TV channel that has high definition TV.
<s>[INST] Given the following SQL query and context: Query: SELECT package_option, series_name FROM TV_Channel WHERE hight_definition_TV = "yes" Context: CREATE TABLE TV_Channel (package_option VARCHAR, series_name VARCHAR, hight_definition_TV VARCHAR) [/INST] Based on the provided SQL query and context, your question ...
SELECT T1.country FROM TV_Channel AS T1 JOIN cartoon AS T2 ON T1.id = T2.Channel WHERE T2.written_by = 'Todd Casey'
CREATE TABLE TV_Channel (country VARCHAR, id VARCHAR); CREATE TABLE cartoon (Channel VARCHAR, written_by VARCHAR)
which countries' tv channels are playing some cartoon written by Todd Casey?
<s>[INST] Given the following SQL query and context: Query: SELECT T1.country FROM TV_Channel AS T1 JOIN cartoon AS T2 ON T1.id = T2.Channel WHERE T2.written_by = 'Todd Casey' Context: CREATE TABLE TV_Channel (country VARCHAR, id VARCHAR); CREATE TABLE cartoon (Channel VARCHAR, written_by VARCHAR) [/INST] Based on the ...
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'
CREATE TABLE TV_Channel (country VARCHAR, id VARCHAR); CREATE TABLE TV_Channel (country VARCHAR); CREATE TABLE cartoon (Channel VARCHAR, written_by VARCHAR)
which countries' tv channels are not playing any cartoon written by Todd Casey?
<s>[INST] Given the following SQL query and context: Query: 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' Context: CREATE TABLE TV_Channel (country VARCHAR, id VARCHAR); CREATE TABLE TV_Channel (country 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'
CREATE TABLE TV_Channel (series_name VARCHAR, country VARCHAR, id VARCHAR); CREATE TABLE cartoon (Channel VARCHAR, directed_by VARCHAR)
Find the series name and country of the tv channel that is playing some cartoons directed by Ben Jones and Michael Chang?
<s>[INST] Given the following SQL query and context: Query: 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...
SELECT Pixel_aspect_ratio_PAR, country FROM tv_channel WHERE LANGUAGE <> 'English'
CREATE TABLE tv_channel (Pixel_aspect_ratio_PAR VARCHAR, country VARCHAR, LANGUAGE VARCHAR)
find the pixel aspect ratio and nation of the tv channels that do not use English.
<s>[INST] Given the following SQL query and context: Query: SELECT Pixel_aspect_ratio_PAR, country FROM tv_channel WHERE LANGUAGE <> 'English' Context: CREATE TABLE tv_channel (Pixel_aspect_ratio_PAR VARCHAR, country VARCHAR, LANGUAGE VARCHAR) [/INST] Based on the provided SQL query and context, your question is: find ...
SELECT id FROM tv_channel GROUP BY country HAVING COUNT(*) > 2
CREATE TABLE tv_channel (id VARCHAR, country VARCHAR)
find id of the tv channels that from the countries where have more than two tv channels.
<s>[INST] Given the following SQL query and context: Query: SELECT id FROM tv_channel GROUP BY country HAVING COUNT(*) > 2 Context: CREATE TABLE tv_channel (id VARCHAR, country VARCHAR) [/INST] Based on the provided SQL query and context, your question is: find id of the tv channels that from the countries where have m...
SELECT id FROM TV_Channel EXCEPT SELECT channel FROM cartoon WHERE 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)
find the id of tv channels that do not play any cartoon directed by Ben Jones.
<s>[INST] Given the following SQL query and context: Query: SELECT id FROM TV_Channel EXCEPT SELECT channel FROM cartoon WHERE 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) [/INST] Ba...
SELECT package_option FROM TV_Channel WHERE NOT id IN (SELECT channel FROM cartoon WHERE 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)
find the package option of the tv channel that do not have any cartoon directed by Ben Jones.
<s>[INST] Given the following SQL query and context: Query: SELECT package_option FROM TV_Channel WHERE NOT id IN (SELECT channel FROM cartoon WHERE directed_by = 'Ben Jones') Context: CREATE TABLE cartoon (package_option VARCHAR, id VARCHAR, channel VARCHAR, directed_by VARCHAR); CREATE TABLE TV_Channel (package_optio...
SELECT COUNT(*) FROM poker_player
CREATE TABLE poker_player (Id VARCHAR)
How many poker players are there?
<s>[INST] Given the following SQL query and context: Query: SELECT COUNT(*) FROM poker_player Context: CREATE TABLE poker_player (Id VARCHAR) [/INST] Based on the provided SQL query and context, your question is: How many poker players are there? The answer to your question is: SELECT COUNT(*) FROM poker_player. [/s>
SELECT Earnings FROM poker_player ORDER BY Earnings DESC
CREATE TABLE poker_player (Earnings VARCHAR)
List the earnings of poker players in descending order.
<s>[INST] Given the following SQL query and context: Query: SELECT Earnings FROM poker_player ORDER BY Earnings DESC Context: CREATE TABLE poker_player (Earnings VARCHAR) [/INST] Based on the provided SQL query and context, your question is: List the earnings of poker players in descending order. The answer to your que...
SELECT Final_Table_Made, Best_Finish FROM poker_player
CREATE TABLE poker_player (Final_Table_Made VARCHAR, Best_Finish VARCHAR)
List the final tables made and the best finishes of poker players.
<s>[INST] Given the following SQL query and context: Query: SELECT Final_Table_Made, Best_Finish FROM poker_player Context: CREATE TABLE poker_player (Final_Table_Made VARCHAR, Best_Finish VARCHAR) [/INST] Based on the provided SQL query and context, your question is: List the final tables made and the best finishes of...
SELECT AVG(Earnings) FROM poker_player
CREATE TABLE poker_player (Earnings INTEGER)
What is the average earnings of poker players?
<s>[INST] Given the following SQL query and context: Query: SELECT AVG(Earnings) FROM poker_player Context: CREATE TABLE poker_player (Earnings INTEGER) [/INST] Based on the provided SQL query and context, your question is: What is the average earnings of poker players? The answer to your question is: SELECT AVG(Earnin...
SELECT Money_Rank FROM poker_player ORDER BY Earnings DESC LIMIT 1
CREATE TABLE poker_player (Money_Rank VARCHAR, Earnings VARCHAR)
What is the money rank of the poker player with the highest earnings?
<s>[INST] Given the following SQL query and context: Query: SELECT Money_Rank FROM poker_player ORDER BY Earnings DESC LIMIT 1 Context: CREATE TABLE poker_player (Money_Rank VARCHAR, Earnings VARCHAR) [/INST] Based on the provided SQL query and context, your question is: What is the money rank of the poker player with ...
SELECT MAX(Final_Table_Made) FROM poker_player WHERE Earnings < 200000
CREATE TABLE poker_player (Final_Table_Made INTEGER, Earnings INTEGER)
What is the maximum number of final tables made among poker players with earnings less than 200000?
<s>[INST] Given the following SQL query and context: Query: SELECT MAX(Final_Table_Made) FROM poker_player WHERE Earnings < 200000 Context: CREATE TABLE poker_player (Final_Table_Made INTEGER, Earnings INTEGER) [/INST] Based on the provided SQL query and context, your question is: What is the maximum number of final ta...
SELECT T1.Name FROM people AS T1 JOIN poker_player AS T2 ON T1.People_ID = T2.People_ID
CREATE TABLE poker_player (People_ID VARCHAR); CREATE TABLE people (Name VARCHAR, People_ID VARCHAR)
What are the names of poker players?
<s>[INST] Given the following SQL query and context: Query: SELECT T1.Name FROM people AS T1 JOIN poker_player AS T2 ON T1.People_ID = T2.People_ID Context: CREATE TABLE poker_player (People_ID VARCHAR); CREATE TABLE people (Name VARCHAR, People_ID VARCHAR) [/INST] Based on the provided SQL query and context, your ques...
SELECT T1.Name FROM people AS T1 JOIN poker_player AS T2 ON T1.People_ID = T2.People_ID WHERE T2.Earnings > 300000
CREATE TABLE poker_player (People_ID VARCHAR, Earnings INTEGER); CREATE TABLE people (Name VARCHAR, People_ID VARCHAR)
What are the names of poker players whose earnings is higher than 300000?
<s>[INST] Given the following SQL query and context: Query: SELECT T1.Name FROM people AS T1 JOIN poker_player AS T2 ON T1.People_ID = T2.People_ID WHERE T2.Earnings > 300000 Context: CREATE TABLE poker_player (People_ID VARCHAR, Earnings INTEGER); CREATE TABLE people (Name VARCHAR, People_ID VARCHAR) [/INST] Based on ...
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
CREATE TABLE poker_player (People_ID VARCHAR, Final_Table_Made VARCHAR); CREATE TABLE people (Name VARCHAR, People_ID VARCHAR)
List the names of poker players ordered by the final tables made in ascending order.
<s>[INST] Given the following SQL query and context: Query: 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 Context: CREATE TABLE poker_player (People_ID VARCHAR, Final_Table_Made VARCHAR); CREATE TABLE people (Name VARCHAR, People_ID VARCHAR) [/INST]...
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
CREATE TABLE poker_player (People_ID VARCHAR, Earnings VARCHAR); CREATE TABLE people (Birth_Date VARCHAR, People_ID VARCHAR)
What is the birth date of the poker player with the lowest earnings?
<s>[INST] Given the following SQL query and context: Query: 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 Context: CREATE TABLE poker_player (People_ID VARCHAR, Earnings VARCHAR); CREATE TABLE people (Birth_Date VARCHAR, People_ID VARCHAR) [/I...
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
CREATE TABLE people (People_ID VARCHAR, Height VARCHAR); CREATE TABLE poker_player (Money_Rank VARCHAR, People_ID VARCHAR)
What is the money rank of the tallest poker player?
<s>[INST] Given the following SQL query and context: Query: 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 Context: 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
CREATE TABLE people (People_ID VARCHAR, Height INTEGER); CREATE TABLE poker_player (Earnings INTEGER, People_ID VARCHAR)
What is the average earnings of poker players with height higher than 200?
<s>[INST] Given the following SQL query and context: Query: SELECT AVG(T2.Earnings) FROM people AS T1 JOIN poker_player AS T2 ON T1.People_ID = T2.People_ID WHERE T1.Height > 200 Context: CREATE TABLE people (People_ID VARCHAR, Height INTEGER); CREATE TABLE poker_player (Earnings INTEGER, People_ID VARCHAR) [/INST] Bas...
SELECT T1.Name FROM people AS T1 JOIN poker_player AS T2 ON T1.People_ID = T2.People_ID ORDER BY T2.Earnings DESC
CREATE TABLE poker_player (People_ID VARCHAR, Earnings VARCHAR); CREATE TABLE people (Name VARCHAR, People_ID VARCHAR)
What are the names of poker players in descending order of earnings?
<s>[INST] Given the following SQL query and context: Query: SELECT T1.Name FROM people AS T1 JOIN poker_player AS T2 ON T1.People_ID = T2.People_ID ORDER BY T2.Earnings DESC Context: CREATE TABLE poker_player (People_ID VARCHAR, Earnings VARCHAR); CREATE TABLE people (Name VARCHAR, People_ID VARCHAR) [/INST] Based on t...
SELECT Nationality, COUNT(*) FROM people GROUP BY Nationality
CREATE TABLE people (Nationality VARCHAR)
What are different nationalities of people and the corresponding number of people from each nation?
<s>[INST] Given the following SQL query and context: Query: SELECT Nationality, COUNT(*) FROM people GROUP BY Nationality Context: CREATE TABLE people (Nationality VARCHAR) [/INST] Based on the provided SQL query and context, your question is: What are different nationalities of people and the corresponding number of p...
SELECT Nationality FROM people GROUP BY Nationality ORDER BY COUNT(*) DESC LIMIT 1
CREATE TABLE people (Nationality VARCHAR)
What is the most common nationality of people?
<s>[INST] Given the following SQL query and context: Query: SELECT Nationality FROM people GROUP BY Nationality ORDER BY COUNT(*) DESC LIMIT 1 Context: CREATE TABLE people (Nationality VARCHAR) [/INST] Based on the provided SQL query and context, your question is: What is the most common nationality of people? The answ...
SELECT Nationality FROM people GROUP BY Nationality HAVING COUNT(*) >= 2
CREATE TABLE people (Nationality VARCHAR)
What are the nationalities that are shared by at least two people?
<s>[INST] Given the following SQL query and context: Query: SELECT Nationality FROM people GROUP BY Nationality HAVING COUNT(*) >= 2 Context: CREATE TABLE people (Nationality VARCHAR) [/INST] Based on the provided SQL query and context, your question is: What are the nationalities that are shared by at least two people...
SELECT Name, Birth_Date FROM people ORDER BY Name
CREATE TABLE people (Name VARCHAR, Birth_Date VARCHAR)
List the names and birth dates of people in ascending alphabetical order of name.
<s>[INST] Given the following SQL query and context: Query: SELECT Name, Birth_Date FROM people ORDER BY Name Context: CREATE TABLE people (Name VARCHAR, Birth_Date VARCHAR) [/INST] Based on the provided SQL query and context, your question is: List the names and birth dates of people in ascending alphabetical order of...
SELECT Name FROM people WHERE Nationality <> "Russia"
CREATE TABLE people (Name VARCHAR, Nationality VARCHAR)
Show names of people whose nationality is not "Russia".
<s>[INST] Given the following SQL query and context: Query: SELECT Name FROM people WHERE Nationality <> "Russia" Context: CREATE TABLE people (Name VARCHAR, Nationality VARCHAR) [/INST] Based on the provided SQL query and context, your question is: Show names of people whose nationality is not "Russia". The answer to ...
SELECT Name FROM people WHERE NOT People_ID IN (SELECT People_ID FROM poker_player)
CREATE TABLE poker_player (Name VARCHAR, People_ID VARCHAR); CREATE TABLE people (Name VARCHAR, People_ID VARCHAR)
List the names of people that are not poker players.
<s>[INST] Given the following SQL query and context: Query: SELECT Name FROM people WHERE NOT People_ID IN (SELECT People_ID FROM poker_player) Context: CREATE TABLE poker_player (Name VARCHAR, People_ID VARCHAR); CREATE TABLE people (Name VARCHAR, People_ID VARCHAR) [/INST] Based on the provided SQL query and context,...
SELECT COUNT(DISTINCT Nationality) FROM people
CREATE TABLE people (Nationality VARCHAR)
How many distinct nationalities are there?
<s>[INST] Given the following SQL query and context: Query: SELECT COUNT(DISTINCT Nationality) FROM people Context: CREATE TABLE people (Nationality VARCHAR) [/INST] Based on the provided SQL query and context, your question is: How many distinct nationalities are there? The answer to your question is: SELECT COUNT(DIS...
SELECT COUNT(*) FROM area_code_state
CREATE TABLE area_code_state (Id VARCHAR)
How many states are there?
<s>[INST] Given the following SQL query and context: Query: SELECT COUNT(*) FROM area_code_state Context: CREATE TABLE area_code_state (Id VARCHAR) [/INST] Based on the provided SQL query and context, your question is: How many states are there? The answer to your question is: SELECT COUNT(*) FROM area_code_state. [/s>
SELECT contestant_number, contestant_name FROM contestants ORDER BY contestant_name DESC
CREATE TABLE contestants (contestant_number VARCHAR, contestant_name VARCHAR)
List the contestant numbers and names, ordered by contestant name descending.
<s>[INST] Given the following SQL query and context: Query: SELECT contestant_number, contestant_name FROM contestants ORDER BY contestant_name DESC Context: CREATE TABLE contestants (contestant_number VARCHAR, contestant_name VARCHAR) [/INST] Based on the provided SQL query and context, your question is: List the cont...
SELECT vote_id, phone_number, state FROM votes
CREATE TABLE votes (vote_id VARCHAR, phone_number VARCHAR, state VARCHAR)
List the vote ids, phone numbers and states of all votes.
<s>[INST] Given the following SQL query and context: Query: SELECT vote_id, phone_number, state FROM votes Context: CREATE TABLE votes (vote_id VARCHAR, phone_number VARCHAR, state VARCHAR) [/INST] Based on the provided SQL query and context, your question is: List the vote ids, phone numbers and states of all votes. T...
SELECT MAX(area_code), MIN(area_code) FROM area_code_state
CREATE TABLE area_code_state (area_code INTEGER)
What are the maximum and minimum values of area codes?
<s>[INST] Given the following SQL query and context: Query: SELECT MAX(area_code), MIN(area_code) FROM area_code_state Context: CREATE TABLE area_code_state (area_code INTEGER) [/INST] Based on the provided SQL query and context, your question is: What are the maximum and minimum values of area codes? The answer to you...
SELECT MAX(created) FROM votes WHERE state = 'CA'
CREATE TABLE votes (created INTEGER, state VARCHAR)
What is last date created of votes from the state 'CA'?
<s>[INST] Given the following SQL query and context: Query: SELECT MAX(created) FROM votes WHERE state = 'CA' Context: CREATE TABLE votes (created INTEGER, state VARCHAR) [/INST] Based on the provided SQL query and context, your question is: What is last date created of votes from the state 'CA'? The answer to your que...
SELECT contestant_name FROM contestants WHERE contestant_name <> 'Jessie Alloway'
CREATE TABLE contestants (contestant_name VARCHAR)
What are the names of the contestants whose names are not 'Jessie Alloway'
<s>[INST] Given the following SQL query and context: Query: SELECT contestant_name FROM contestants WHERE contestant_name <> 'Jessie Alloway' Context: CREATE TABLE contestants (contestant_name VARCHAR) [/INST] Based on the provided SQL query and context, your question is: What are the names of the contestants whose nam...
SELECT DISTINCT state, created FROM votes
CREATE TABLE votes (state VARCHAR, created VARCHAR)
What are the distinct states and create time of all votes?
<s>[INST] Given the following SQL query and context: Query: SELECT DISTINCT state, created FROM votes Context: CREATE TABLE votes (state VARCHAR, created VARCHAR) [/INST] Based on the provided SQL query and context, your question is: What are the distinct states and create time of all votes? The answer to your question...
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
CREATE TABLE votes (contestant_number VARCHAR); CREATE TABLE contestants (contestant_number VARCHAR, contestant_name VARCHAR)
What are the contestant numbers and names of the contestants who had at least two votes?
<s>[INST] Given the following SQL query and context: Query: 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 Context: CREATE TABLE votes (contestant_number VARCHAR); CREATE TABLE cont...
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
CREATE TABLE votes (contestant_number VARCHAR); CREATE TABLE contestants (contestant_number VARCHAR, contestant_name VARCHAR)
Of all the contestants who got voted, what is the contestant number and name of the contestant who got least votes?
<s>[INST] Given the following SQL query and context: Query: 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 Context: CREATE TABLE votes (contestant_number VARCHAR); CREATE TABLE...
SELECT COUNT(*) FROM votes WHERE state = 'NY' OR state = 'CA'
CREATE TABLE votes (state VARCHAR)
What are the number of votes from state 'NY' or 'CA'?
<s>[INST] Given the following SQL query and context: Query: SELECT COUNT(*) FROM votes WHERE state = 'NY' OR state = 'CA' Context: CREATE TABLE votes (state VARCHAR) [/INST] Based on the provided SQL query and context, your question is: What are the number of votes from state 'NY' or 'CA'? The answer to your question i...
SELECT COUNT(*) FROM contestants WHERE NOT contestant_number IN (SELECT contestant_number FROM votes)
CREATE TABLE contestants (contestant_number VARCHAR); CREATE TABLE votes (contestant_number VARCHAR)
How many contestants did not get voted?
<s>[INST] Given the following SQL query and context: Query: SELECT COUNT(*) FROM contestants WHERE NOT contestant_number IN (SELECT contestant_number FROM votes) Context: CREATE TABLE contestants (contestant_number VARCHAR); CREATE TABLE votes (contestant_number VARCHAR) [/INST] Based on the provided SQL query and cont...
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
CREATE TABLE area_code_state (area_code VARCHAR, state VARCHAR); CREATE TABLE votes (state VARCHAR)
What is the area code in which the most voters voted?
<s>[INST] Given the following SQL query and context: Query: 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 Context: CREATE TABLE area_code_state (area_code VARCHAR, state VARCHAR); CREATE TABLE votes (state VARCHAR) [/INST] Bas...
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'
CREATE TABLE contestants (contestant_number VARCHAR, contestant_name VARCHAR); CREATE TABLE votes (created VARCHAR, state VARCHAR, phone_number VARCHAR, contestant_number VARCHAR)
What are the create dates, states, and phone numbers of the votes that were for the contestant named 'Tabatha Gehling'?
<s>[INST] Given the following SQL query and context: Query: 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' Context: CREATE TABLE contestants (contestant_number VARCHAR, contestant_name VARCH...
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...
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)
List the area codes in which voters voted both for the contestant 'Tabatha Gehling' and the contestant 'Kelly Clauss'.
<s>[INST] Given the following SQL query and context: Query: 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 ...
SELECT contestant_name FROM contestants WHERE contestant_name LIKE "%al%"
CREATE TABLE contestants (contestant_name VARCHAR)
Return the names of the contestants whose names contain the substring 'Al' .
<s>[INST] Given the following SQL query and context: Query: SELECT contestant_name FROM contestants WHERE contestant_name LIKE "%al%" Context: CREATE TABLE contestants (contestant_name VARCHAR) [/INST] Based on the provided SQL query and context, your question is: Return the names of the contestants whose names contain...
SELECT Name FROM country WHERE IndepYear > 1950
CREATE TABLE country (Name VARCHAR, IndepYear INTEGER)
What are the names of all the countries that became independent after 1950?
<s>[INST] Given the following SQL query and context: Query: SELECT Name FROM country WHERE IndepYear > 1950 Context: CREATE TABLE country (Name VARCHAR, IndepYear INTEGER) [/INST] Based on the provided SQL query and context, your question is: What are the names of all the countries that became independent after 1950? T...
SELECT COUNT(*) FROM country WHERE GovernmentForm = "Republic"
CREATE TABLE country (GovernmentForm VARCHAR)
How many countries have a republic as their form of government?
<s>[INST] Given the following SQL query and context: Query: SELECT COUNT(*) FROM country WHERE GovernmentForm = "Republic" Context: CREATE TABLE country (GovernmentForm VARCHAR) [/INST] Based on the provided SQL query and context, your question is: How many countries have a republic as their form of government? The ans...
SELECT SUM(SurfaceArea) FROM country WHERE Region = "Caribbean"
CREATE TABLE country (SurfaceArea INTEGER, Region VARCHAR)
What is the total surface area of the countries in the Caribbean region?
<s>[INST] Given the following SQL query and context: Query: SELECT SUM(SurfaceArea) FROM country WHERE Region = "Caribbean" Context: CREATE TABLE country (SurfaceArea INTEGER, Region VARCHAR) [/INST] Based on the provided SQL query and context, your question is: What is the total surface area of the countries in the Ca...
SELECT Continent FROM country WHERE Name = "Anguilla"
CREATE TABLE country (Continent VARCHAR, Name VARCHAR)
Which continent is Anguilla in?
<s>[INST] Given the following SQL query and context: Query: SELECT Continent FROM country WHERE Name = "Anguilla" Context: CREATE TABLE country (Continent VARCHAR, Name VARCHAR) [/INST] Based on the provided SQL query and context, your question is: Which continent is Anguilla in? The answer to your question is: SELECT ...
SELECT Region FROM country AS T1 JOIN city AS T2 ON T1.Code = T2.CountryCode WHERE T2.Name = "Kabul"
CREATE TABLE country (Code VARCHAR); CREATE TABLE city (CountryCode VARCHAR, Name VARCHAR)
Which region is the city Kabul located in?
<s>[INST] Given the following SQL query and context: Query: SELECT Region FROM country AS T1 JOIN city AS T2 ON T1.Code = T2.CountryCode WHERE T2.Name = "Kabul" Context: CREATE TABLE country (Code VARCHAR); CREATE TABLE city (CountryCode VARCHAR, Name VARCHAR) [/INST] Based on the provided SQL query and context, your q...
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
CREATE TABLE country (Code VARCHAR, Name VARCHAR); CREATE TABLE countrylanguage (Language VARCHAR, CountryCode VARCHAR)
Which language is the most popular in Aruba?
<s>[INST] Given the following SQL query and context: Query: 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 Context: CREATE TABLE country (Code VARCHAR, Name VARCHAR); CREATE TABLE countrylanguage (Language VARCHAR, Co...
SELECT Population, LifeExpectancy FROM country WHERE Name = "Brazil"
CREATE TABLE country (Population VARCHAR, LifeExpectancy VARCHAR, Name VARCHAR)
What are the population and life expectancies in Brazil?
<s>[INST] Given the following SQL query and context: Query: SELECT Population, LifeExpectancy FROM country WHERE Name = "Brazil" Context: CREATE TABLE country (Population VARCHAR, LifeExpectancy VARCHAR, Name VARCHAR) [/INST] Based on the provided SQL query and context, your question is: What are the population and lif...
SELECT Population, Region FROM country WHERE Name = "Angola"
CREATE TABLE country (Population VARCHAR, Region VARCHAR, Name VARCHAR)
What are the region and population of Angola?
<s>[INST] Given the following SQL query and context: Query: SELECT Population, Region FROM country WHERE Name = "Angola" Context: CREATE TABLE country (Population VARCHAR, Region VARCHAR, Name VARCHAR) [/INST] Based on the provided SQL query and context, your question is: What are the region and population of Angola? T...
SELECT AVG(LifeExpectancy) FROM country WHERE Region = "Central Africa"
CREATE TABLE country (LifeExpectancy INTEGER, Region VARCHAR)
What is the average expected life expectancy for countries in the region of Central Africa?
<s>[INST] Given the following SQL query and context: Query: SELECT AVG(LifeExpectancy) FROM country WHERE Region = "Central Africa" Context: CREATE TABLE country (LifeExpectancy INTEGER, Region VARCHAR) [/INST] Based on the provided SQL query and context, your question is: What is the average expected life expectancy f...
SELECT Name FROM country WHERE Continent = "Asia" ORDER BY LifeExpectancy LIMIT 1
CREATE TABLE country (Name VARCHAR, Continent VARCHAR, LifeExpectancy VARCHAR)
What is the name of country that has the shortest life expectancy in Asia?
<s>[INST] Given the following SQL query and context: Query: SELECT Name FROM country WHERE Continent = "Asia" ORDER BY LifeExpectancy LIMIT 1 Context: CREATE TABLE country (Name VARCHAR, Continent VARCHAR, LifeExpectancy VARCHAR) [/INST] Based on the provided SQL query and context, your question is: What is the name of...
SELECT SUM(Population), MAX(GNP) FROM country WHERE Continent = "Asia"
CREATE TABLE country (Population INTEGER, GNP INTEGER, Continent VARCHAR)
What is the total population and maximum GNP in Asia?
<s>[INST] Given the following SQL query and context: Query: SELECT SUM(Population), MAX(GNP) FROM country WHERE Continent = "Asia" Context: CREATE TABLE country (Population INTEGER, GNP INTEGER, Continent VARCHAR) [/INST] Based on the provided SQL query and context, your question is: What is the total population and ma...
SELECT AVG(LifeExpectancy) FROM country WHERE Continent = "Africa" AND GovernmentForm = "Republic"
CREATE TABLE country (LifeExpectancy INTEGER, Continent VARCHAR, GovernmentForm VARCHAR)
What is the average life expectancy in African countries that are republics?
<s>[INST] Given the following SQL query and context: Query: SELECT AVG(LifeExpectancy) FROM country WHERE Continent = "Africa" AND GovernmentForm = "Republic" Context: CREATE TABLE country (LifeExpectancy INTEGER, Continent VARCHAR, GovernmentForm VARCHAR) [/INST] Based on the provided SQL query and context, your quest...
SELECT SUM(SurfaceArea) FROM country WHERE Continent = "Asia" OR Continent = "Europe"
CREATE TABLE country (SurfaceArea INTEGER, Continent VARCHAR)
What is the total surface area of the continents Asia and Europe?
<s>[INST] Given the following SQL query and context: Query: SELECT SUM(SurfaceArea) FROM country WHERE Continent = "Asia" OR Continent = "Europe" Context: CREATE TABLE country (SurfaceArea INTEGER, Continent VARCHAR) [/INST] Based on the provided SQL query and context, your question is: What is the total surface area o...
SELECT SUM(Population) FROM city WHERE District = "Gelderland"
CREATE TABLE city (Population INTEGER, District VARCHAR)
How many people live in Gelderland district?
<s>[INST] Given the following SQL query and context: Query: SELECT SUM(Population) FROM city WHERE District = "Gelderland" Context: CREATE TABLE city (Population INTEGER, District VARCHAR) [/INST] Based on the provided SQL query and context, your question is: How many people live in Gelderland district? The answer to y...
SELECT AVG(GNP), SUM(population) FROM country WHERE GovernmentForm = "US Territory"
CREATE TABLE country (GNP INTEGER, population INTEGER, GovernmentForm VARCHAR)
What is the average GNP and total population in all nations whose government is US territory?
<s>[INST] Given the following SQL query and context: Query: SELECT AVG(GNP), SUM(population) FROM country WHERE GovernmentForm = "US Territory" Context: CREATE TABLE country (GNP INTEGER, population INTEGER, GovernmentForm VARCHAR) [/INST] Based on the provided SQL query and context, your question is: What is the avera...
SELECT COUNT(DISTINCT LANGUAGE) FROM countrylanguage
CREATE TABLE countrylanguage (LANGUAGE VARCHAR)
How many unique languages are spoken in the world?
<s>[INST] Given the following SQL query and context: Query: SELECT COUNT(DISTINCT LANGUAGE) FROM countrylanguage Context: CREATE TABLE countrylanguage (LANGUAGE VARCHAR) [/INST] Based on the provided SQL query and context, your question is: How many unique languages are spoken in the world? The answer to your question ...
SELECT COUNT(DISTINCT GovernmentForm) FROM country WHERE Continent = "Africa"
CREATE TABLE country (GovernmentForm VARCHAR, Continent VARCHAR)
How many type of governments are in Africa?
<s>[INST] Given the following SQL query and context: Query: SELECT COUNT(DISTINCT GovernmentForm) FROM country WHERE Continent = "Africa" Context: CREATE TABLE country (GovernmentForm VARCHAR, Continent VARCHAR) [/INST] Based on the provided SQL query and context, your question is: How many type of governments are in A...
SELECT COUNT(T2.Language) FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.Name = "Aruba"
CREATE TABLE country (Code VARCHAR, Name VARCHAR); CREATE TABLE countrylanguage (Language VARCHAR, CountryCode VARCHAR)
What is the total number of languages used in Aruba?
<s>[INST] Given the following SQL query and context: Query: SELECT COUNT(T2.Language) FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.Name = "Aruba" Context: CREATE TABLE country (Code VARCHAR, Name VARCHAR); CREATE TABLE countrylanguage (Language VARCHAR, CountryCode VARCHAR) [/INST]...
SELECT COUNT(*) FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.Name = "Afghanistan" AND IsOfficial = "T"
CREATE TABLE country (Code VARCHAR, Name VARCHAR); CREATE TABLE countrylanguage (CountryCode VARCHAR)
How many official languages does Afghanistan have?
<s>[INST] Given the following SQL query and context: Query: SELECT COUNT(*) FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.Name = "Afghanistan" AND IsOfficial = "T" Context: CREATE TABLE country (Code VARCHAR, Name VARCHAR); CREATE TABLE countrylanguage (CountryCode VARCHAR) [/INST] ...
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
CREATE TABLE countrylanguage (CountryCode VARCHAR); CREATE TABLE country (Name VARCHAR, Code VARCHAR)
What is name of the country that speaks the largest number of languages?
<s>[INST] Given the following SQL query and context: Query: 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 Context: CREATE TABLE countrylanguage (CountryCode VARCHAR); CREATE TABLE country (Name VARCHAR, Code VARCHAR) [/INST] Base...
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
CREATE TABLE countrylanguage (CountryCode VARCHAR); CREATE TABLE country (Continent VARCHAR, Code VARCHAR)
Which continent has the most diverse languages?
<s>[INST] Given the following SQL query and context: Query: 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 Context: CREATE TABLE countrylanguage (CountryCode VARCHAR); CREATE TABLE country (Continent VARCHAR, Code VARCHA...
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")
CREATE TABLE country (Name VARCHAR, Code VARCHAR); CREATE TABLE countrylanguage (CountryCode VARCHAR, Language VARCHAR)
How many countries speak both English and Dutch?
<s>[INST] Given the following SQL query and context: Query: 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 = ...
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"
CREATE TABLE country (Name VARCHAR, Code VARCHAR); CREATE TABLE countrylanguage (CountryCode VARCHAR, Language VARCHAR)
What are the names of nations speak both English and French?
<s>[INST] Given the following SQL query and context: Query: 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" Context: CREA...
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"
CREATE TABLE countrylanguage (CountryCode VARCHAR, Language VARCHAR, IsOfficial VARCHAR); CREATE TABLE country (Name VARCHAR, Code VARCHAR)
What are the names of nations where both English and French are official languages?
<s>[INST] Given the following SQL query and context: Query: 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 ...
SELECT COUNT(DISTINCT Continent) FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = "Chinese"
CREATE TABLE country (Code VARCHAR); CREATE TABLE countrylanguage (CountryCode VARCHAR, Language VARCHAR)
What is the number of distinct continents where Chinese is spoken?
<s>[INST] Given the following SQL query and context: Query: SELECT COUNT(DISTINCT Continent) FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = "Chinese" Context: CREATE TABLE country (Code VARCHAR); CREATE TABLE countrylanguage (CountryCode VARCHAR, Language VARCHAR) [/INST] ...
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"
CREATE TABLE countrylanguage (CountryCode VARCHAR, Language VARCHAR); CREATE TABLE country (Region VARCHAR, Code VARCHAR)
What are the regions that use English or Dutch?
<s>[INST] Given the following SQL query and context: Query: 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" Context: CREATE TABLE countrylanguage (CountryCode VARCHAR, Language VARCHAR); CREATE TABLE country (Regi...
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"
CREATE TABLE countrylanguage (countrycode VARCHAR, language VARCHAR); CREATE TABLE country (name VARCHAR, code VARCHAR)
What are the countries where either English or Dutch is the official language ?
<s>[INST] Given the following SQL query and context: Query: 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 = "dutc...
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"
CREATE TABLE country (Code VARCHAR); CREATE TABLE countrylanguage (CountryCode VARCHAR, Language VARCHAR)
Which countries have either English or Dutch as an official language?
<s>[INST] Given the following SQL query and context: Query: 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 IsOff...
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
CREATE TABLE country (Code VARCHAR, Continent VARCHAR); CREATE TABLE countrylanguage (Language VARCHAR, CountryCode VARCHAR)
Which language is the most popular on the Asian continent?
<s>[INST] Given the following SQL query and context: Query: 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 Context: CREATE TABLE country (Code VARCHAR, Continent VARCHAR); CREATE TABLE countryla...
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
CREATE TABLE countrylanguage (Language VARCHAR, CountryCode VARCHAR); CREATE TABLE country (Code VARCHAR, GovernmentForm VARCHAR)
Which languages are spoken by only one country in republic governments?
<s>[INST] Given the following SQL query and context: Query: 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 Context: CREATE TABLE countrylanguage (Language VARCHAR, CountryCode VARCHAR); CREATE TAB...
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
CREATE TABLE city (Name VARCHAR, Population VARCHAR, CountryCode VARCHAR); CREATE TABLE countrylanguage (CountryCode VARCHAR, Language VARCHAR)
Find the city with the largest population that uses English.
<s>[INST] Given the following SQL query and context: Query: 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 Context: CREATE TABLE city (Name VARCHAR, Population VARCHAR, CountryCode VARCHAR); CR...
SELECT Name, Population, LifeExpectancy FROM country WHERE Continent = "Asia" ORDER BY SurfaceArea DESC LIMIT 1
CREATE TABLE country (Name VARCHAR, Population VARCHAR, LifeExpectancy VARCHAR, Continent VARCHAR, SurfaceArea VARCHAR)
Find the name, population and expected life length of asian country with the largest area?
<s>[INST] Given the following SQL query and context: Query: SELECT Name, Population, LifeExpectancy FROM country WHERE Continent = "Asia" ORDER BY SurfaceArea DESC LIMIT 1 Context: CREATE TABLE country (Name VARCHAR, Population VARCHAR, LifeExpectancy VARCHAR, Continent VARCHAR, SurfaceArea VARCHAR) [/INST] Based on th...
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")
CREATE TABLE countrylanguage (CountryCode VARCHAR, Language VARCHAR, IsOfficial VARCHAR); CREATE TABLE country (LifeExpectancy INTEGER, Name VARCHAR); CREATE TABLE country (Name VARCHAR, Code VARCHAR)
What is average life expectancy in the countries where English is not the official language?
<s>[INST] Given the following SQL query and context: Query: 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") Context: CREATE TABLE countrylanguage (CountryCode VARCHA...
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")
CREATE TABLE country (Name VARCHAR, Code VARCHAR); CREATE TABLE countrylanguage (CountryCode VARCHAR, Language VARCHAR); CREATE TABLE country (Population INTEGER, Name VARCHAR)
What is the total number of people living in the nations that do not use English?
<s>[INST] Given the following SQL query and context: Query: 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") Context: CREATE TABLE country (Name VARCHAR, Code VARCHAR); CREATE TABLE countrylangu...
SELECT T2.Language FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.HeadOfState = "Beatrix" AND T2.IsOfficial = "T"
CREATE TABLE country (Code VARCHAR, HeadOfState VARCHAR); CREATE TABLE countrylanguage (Language VARCHAR, CountryCode VARCHAR, IsOfficial VARCHAR)
What is the official language spoken in the country whose head of state is Beatrix?
<s>[INST] Given the following SQL query and context: Query: SELECT T2.Language FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.HeadOfState = "Beatrix" AND T2.IsOfficial = "T" Context: CREATE TABLE country (Code VARCHAR, HeadOfState VARCHAR); CREATE TABLE countrylanguage (Language VARC...
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"
CREATE TABLE country (Code VARCHAR); CREATE TABLE countrylanguage (Language VARCHAR, CountryCode VARCHAR, IsOfficial VARCHAR)
What is the total number of unique official languages spoken in the countries that are founded before 1930?
<s>[INST] Given the following SQL query and context: Query: 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" Context: CREATE TABLE country (Code VARCHAR); CREATE TABLE countrylanguage (Language VARCHAR, CountryCod...
SELECT Name FROM country WHERE SurfaceArea > (SELECT MIN(SurfaceArea) FROM country WHERE Continent = "Europe")
CREATE TABLE country (Name VARCHAR, SurfaceArea INTEGER, Continent VARCHAR)
What are the countries that have greater surface area than any country in Europe?
<s>[INST] Given the following SQL query and context: Query: SELECT Name FROM country WHERE SurfaceArea > (SELECT MIN(SurfaceArea) FROM country WHERE Continent = "Europe") Context: CREATE TABLE country (Name VARCHAR, SurfaceArea INTEGER, Continent VARCHAR) [/INST] Based on the provided SQL query and context, your questi...
SELECT Name FROM country WHERE Continent = "Africa" AND population < (SELECT MAX(population) FROM country WHERE Continent = "Asia")
CREATE TABLE country (Name VARCHAR, Continent VARCHAR, population INTEGER)
What are the African countries that have a population less than any country in Asia?
<s>[INST] Given the following SQL query and context: Query: SELECT Name FROM country WHERE Continent = "Africa" AND population < (SELECT MAX(population) FROM country WHERE Continent = "Asia") Context: CREATE TABLE country (Name VARCHAR, Continent VARCHAR, population INTEGER) [/INST] Based on the provided SQL query and ...
SELECT Name FROM country WHERE Continent = "Africa" AND population < (SELECT MIN(population) FROM country WHERE Continent = "Asia")
CREATE TABLE country (Name VARCHAR, Continent VARCHAR, population INTEGER)
Which African countries have a smaller population than that of any country in Asia?
<s>[INST] Given the following SQL query and context: Query: SELECT Name FROM country WHERE Continent = "Africa" AND population < (SELECT MIN(population) FROM country WHERE Continent = "Asia") Context: CREATE TABLE country (Name VARCHAR, Continent VARCHAR, population INTEGER) [/INST] Based on the provided SQL query and ...
SELECT Name FROM country WHERE Continent = "Asia" AND population > (SELECT MAX(population) FROM country WHERE Continent = "Africa")
CREATE TABLE country (Name VARCHAR, Continent VARCHAR, population INTEGER)
Which Asian countries have a population that is larger than any country in Africa?
<s>[INST] Given the following SQL query and context: Query: SELECT Name FROM country WHERE Continent = "Asia" AND population > (SELECT MAX(population) FROM country WHERE Continent = "Africa") Context: CREATE TABLE country (Name VARCHAR, Continent VARCHAR, population INTEGER) [/INST] Based on the provided SQL query and ...
SELECT Name FROM country WHERE Continent = "Asia" AND population > (SELECT MIN(population) FROM country WHERE Continent = "Africa")
CREATE TABLE country (Name VARCHAR, Continent VARCHAR, population INTEGER)
What are the Asian countries which have a population larger than that of any country in Africa?
<s>[INST] Given the following SQL query and context: Query: SELECT Name FROM country WHERE Continent = "Asia" AND population > (SELECT MIN(population) FROM country WHERE Continent = "Africa") Context: CREATE TABLE country (Name VARCHAR, Continent VARCHAR, population INTEGER) [/INST] Based on the provided SQL query and ...
SELECT CountryCode FROM countrylanguage EXCEPT SELECT CountryCode FROM countrylanguage WHERE LANGUAGE = "English"
CREATE TABLE countrylanguage (CountryCode VARCHAR, LANGUAGE VARCHAR)
What are the country codes for countries that do not speak English?
<s>[INST] Given the following SQL query and context: Query: SELECT CountryCode FROM countrylanguage EXCEPT SELECT CountryCode FROM countrylanguage WHERE LANGUAGE = "English" Context: CREATE TABLE countrylanguage (CountryCode VARCHAR, LANGUAGE VARCHAR) [/INST] Based on the provided SQL query and context, your question i...
SELECT DISTINCT CountryCode FROM countrylanguage WHERE LANGUAGE <> "English"
CREATE TABLE countrylanguage (CountryCode VARCHAR, LANGUAGE VARCHAR)
What are the country codes of countries where people use languages other than English?
<s>[INST] Given the following SQL query and context: Query: SELECT DISTINCT CountryCode FROM countrylanguage WHERE LANGUAGE <> "English" Context: CREATE TABLE countrylanguage (CountryCode VARCHAR, LANGUAGE VARCHAR) [/INST] Based on the provided SQL query and context, your question is: What are the country codes of coun...
SELECT Code FROM country WHERE GovernmentForm <> "Republic" EXCEPT SELECT CountryCode FROM countrylanguage WHERE LANGUAGE = "English"
CREATE TABLE countrylanguage (Code VARCHAR, CountryCode VARCHAR, GovernmentForm VARCHAR, LANGUAGE VARCHAR); CREATE TABLE country (Code VARCHAR, CountryCode VARCHAR, GovernmentForm VARCHAR, LANGUAGE VARCHAR)
What are the codes of the countries that do not speak English and whose government forms are not Republic?
<s>[INST] Given the following SQL query and context: Query: SELECT Code FROM country WHERE GovernmentForm <> "Republic" EXCEPT SELECT CountryCode FROM countrylanguage WHERE LANGUAGE = "English" Context: CREATE TABLE countrylanguage (Code VARCHAR, CountryCode VARCHAR, GovernmentForm VARCHAR, LANGUAGE VARCHAR); CREATE TA...
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')
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)
Which cities are in European countries where English is not the official language?
<s>[INST] Given the following SQL query and context: Query: 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.L...
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"
CREATE TABLE city (name VARCHAR, countrycode VARCHAR); CREATE TABLE countrylanguage (countrycode VARCHAR, isofficial VARCHAR, language VARCHAR); CREATE TABLE country (code VARCHAR, continent VARCHAR)
Which unique cities are in Asian countries where Chinese is the official language ?
<s>[INST] Given the following SQL query and context: Query: 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" Context: CREATE TABLE city (name VARCH...
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"
CREATE TABLE country (Code VARCHAR, Continent VARCHAR); CREATE TABLE countrylanguage (CountryCode VARCHAR, IsOfficial VARCHAR, Language VARCHAR); CREATE TABLE city (Name VARCHAR, CountryCode VARCHAR)
Return the different names of cities that are in Asia and for which Chinese is the official language.
<s>[INST] Given the following SQL query and context: Query: 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" Context: CREATE TABLE country (Code VA...
SELECT Name, SurfaceArea, IndepYear FROM country ORDER BY Population LIMIT 1
CREATE TABLE country (Name VARCHAR, SurfaceArea VARCHAR, IndepYear VARCHAR, Population VARCHAR)
What are the name, independence year, and surface area of the country with the smallest population?
<s>[INST] Given the following SQL query and context: Query: SELECT Name, SurfaceArea, IndepYear FROM country ORDER BY Population LIMIT 1 Context: CREATE TABLE country (Name VARCHAR, SurfaceArea VARCHAR, IndepYear VARCHAR, Population VARCHAR) [/INST] Based on the provided SQL query and context, your question is: What ar...
SELECT Name, population, HeadOfState FROM country ORDER BY SurfaceArea DESC LIMIT 1
CREATE TABLE country (Name VARCHAR, population VARCHAR, HeadOfState VARCHAR, SurfaceArea VARCHAR)
What are the population, name and leader of the country with the largest area?
<s>[INST] Given the following SQL query and context: Query: SELECT Name, population, HeadOfState FROM country ORDER BY SurfaceArea DESC LIMIT 1 Context: CREATE TABLE country (Name VARCHAR, population VARCHAR, HeadOfState VARCHAR, SurfaceArea VARCHAR) [/INST] Based on the provided SQL query and context, your question is...
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
CREATE TABLE country (Name VARCHAR, Code VARCHAR); CREATE TABLE countrylanguage (Language VARCHAR, CountryCode VARCHAR)
Return the country name and the numbers of languages spoken for each country that speaks at least 3 languages.
<s>[INST] Given the following SQL query and context: Query: 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 Context: CREATE TABLE country (Name VARCHAR, Code VARCHAR); CREATE TABLE countrylanguage (Language VARCHAR, Countr...
SELECT COUNT(*), District FROM city WHERE Population > (SELECT AVG(Population) FROM city) GROUP BY District
CREATE TABLE city (District VARCHAR, Population INTEGER)
Find the number of cities in each district whose population is greater than the average population of cities?
<s>[INST] Given the following SQL query and context: Query: SELECT COUNT(*), District FROM city WHERE Population > (SELECT AVG(Population) FROM city) GROUP BY District Context: CREATE TABLE city (District VARCHAR, Population INTEGER) [/INST] Based on the provided SQL query and context, your question is: Find the number...
SELECT SUM(Population), GovernmentForm FROM country GROUP BY GovernmentForm HAVING AVG(LifeExpectancy) > 72
CREATE TABLE country (GovernmentForm VARCHAR, Population INTEGER, LifeExpectancy INTEGER)
Find the government form name and total population for each government form whose average life expectancy is longer than 72.
<s>[INST] Given the following SQL query and context: Query: SELECT SUM(Population), GovernmentForm FROM country GROUP BY GovernmentForm HAVING AVG(LifeExpectancy) > 72 Context: CREATE TABLE country (GovernmentForm VARCHAR, Population INTEGER, LifeExpectancy INTEGER) [/INST] Based on the provided SQL query and context, ...
SELECT SUM(Population), AVG(LifeExpectancy), Continent FROM country GROUP BY Continent HAVING AVG(LifeExpectancy) < 72
CREATE TABLE country (Continent VARCHAR, Population INTEGER, LifeExpectancy INTEGER)
Find the average life expectancy and total population for each continent where the average life expectancy is shorter than 72?
<s>[INST] Given the following SQL query and context: Query: SELECT SUM(Population), AVG(LifeExpectancy), Continent FROM country GROUP BY Continent HAVING AVG(LifeExpectancy) < 72 Context: CREATE TABLE country (Continent VARCHAR, Population INTEGER, LifeExpectancy INTEGER) [/INST] Based on the provided SQL query and con...
SELECT Name, SurfaceArea FROM country ORDER BY SurfaceArea DESC LIMIT 5
CREATE TABLE country (Name VARCHAR, SurfaceArea VARCHAR)
What are the names and areas of countries with the top 5 largest area?
<s>[INST] Given the following SQL query and context: Query: SELECT Name, SurfaceArea FROM country ORDER BY SurfaceArea DESC LIMIT 5 Context: CREATE TABLE country (Name VARCHAR, SurfaceArea VARCHAR) [/INST] Based on the provided SQL query and context, your question is: What are the names and areas of countries with the ...