answer
stringlengths
18
557
context
stringlengths
27
489
question
stringlengths
12
244
text
stringlengths
275
1.7k
SELECT T1.Official_native_language FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country WHERE T2.College = "Maryland" OR T2.College = "Duke"
CREATE TABLE country (Official_native_language VARCHAR, Country_id VARCHAR); CREATE TABLE match_season (Country VARCHAR, College VARCHAR)
What are the official languages of the countries of players from Maryland or Duke college?
<s>[INST] Given the following SQL query and context: Query: SELECT T1.Official_native_language FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country WHERE T2.College = "Maryland" OR T2.College = "Duke" Context: CREATE TABLE country (Official_native_language VARCHAR, Country_id VARCHAR); CREATE TABLE match_season (Country VARCHAR, College VARCHAR) [/INST] Based on the provided SQL query and context, your question is: What are the official languages of the countries of players from Maryland or Duke college? The answer to your question is: SELECT T1.Official_native_language FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country WHERE T2.College = "Maryland" OR T2.College = "Duke". [/s>
SELECT COUNT(DISTINCT T1.Official_native_language) FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country WHERE T2.Position = "Defender"
CREATE TABLE country (Official_native_language VARCHAR, Country_id VARCHAR); CREATE TABLE match_season (Country VARCHAR, Position VARCHAR)
How many distinct official languages are there among countries of players whose positions are defenders.
<s>[INST] Given the following SQL query and context: Query: SELECT COUNT(DISTINCT T1.Official_native_language) FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country WHERE T2.Position = "Defender" Context: CREATE TABLE country (Official_native_language VARCHAR, Country_id VARCHAR); CREATE TABLE match_season (Country VARCHAR, Position VARCHAR) [/INST] Based on the provided SQL query and context, your question is: How many distinct official languages are there among countries of players whose positions are defenders. The answer to your question is: SELECT COUNT(DISTINCT T1.Official_native_language) FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country WHERE T2.Position = "Defender". [/s>
SELECT T1.Season, T1.Player, T2.Name FROM match_season AS T1 JOIN team AS T2 ON T1.Team = T2.Team_id
CREATE TABLE team (Name VARCHAR, Team_id VARCHAR); CREATE TABLE match_season (Season VARCHAR, Player VARCHAR, Team VARCHAR)
Show the season, the player, and the name of the team that players belong to.
<s>[INST] Given the following SQL query and context: Query: SELECT T1.Season, T1.Player, T2.Name FROM match_season AS T1 JOIN team AS T2 ON T1.Team = T2.Team_id Context: CREATE TABLE team (Name VARCHAR, Team_id VARCHAR); CREATE TABLE match_season (Season VARCHAR, Player VARCHAR, Team VARCHAR) [/INST] Based on the provided SQL query and context, your question is: Show the season, the player, and the name of the team that players belong to. The answer to your question is: SELECT T1.Season, T1.Player, T2.Name FROM match_season AS T1 JOIN team AS T2 ON T1.Team = T2.Team_id. [/s>
SELECT T1.Position FROM match_season AS T1 JOIN team AS T2 ON T1.Team = T2.Team_id WHERE T2.Name = "Ryley Goldner"
CREATE TABLE match_season (Position VARCHAR, Team VARCHAR); CREATE TABLE team (Team_id VARCHAR, Name VARCHAR)
Show the positions of the players from the team with name "Ryley Goldner".
<s>[INST] Given the following SQL query and context: Query: SELECT T1.Position FROM match_season AS T1 JOIN team AS T2 ON T1.Team = T2.Team_id WHERE T2.Name = "Ryley Goldner" Context: CREATE TABLE match_season (Position VARCHAR, Team VARCHAR); CREATE TABLE team (Team_id VARCHAR, Name VARCHAR) [/INST] Based on the provided SQL query and context, your question is: Show the positions of the players from the team with name "Ryley Goldner". The answer to your question is: SELECT T1.Position FROM match_season AS T1 JOIN team AS T2 ON T1.Team = T2.Team_id WHERE T2.Name = "Ryley Goldner". [/s>
SELECT COUNT(DISTINCT T1.College) FROM match_season AS T1 JOIN team AS T2 ON T1.Team = T2.Team_id WHERE T2.Name = "Columbus Crew"
CREATE TABLE match_season (College VARCHAR, Team VARCHAR); CREATE TABLE team (Team_id VARCHAR, Name VARCHAR)
How many distinct colleges are associated with players from the team with name "Columbus Crew".
<s>[INST] Given the following SQL query and context: Query: SELECT COUNT(DISTINCT T1.College) FROM match_season AS T1 JOIN team AS T2 ON T1.Team = T2.Team_id WHERE T2.Name = "Columbus Crew" Context: CREATE TABLE match_season (College VARCHAR, Team VARCHAR); CREATE TABLE team (Team_id VARCHAR, Name VARCHAR) [/INST] Based on the provided SQL query and context, your question is: How many distinct colleges are associated with players from the team with name "Columbus Crew". The answer to your question is: SELECT COUNT(DISTINCT T1.College) FROM match_season AS T1 JOIN team AS T2 ON T1.Team = T2.Team_id WHERE T2.Name = "Columbus Crew". [/s>
SELECT T1.Player, T1.Years_Played FROM player AS T1 JOIN team AS T2 ON T1.Team = T2.Team_id WHERE T2.Name = "Columbus Crew"
CREATE TABLE player (Player VARCHAR, Years_Played VARCHAR, Team VARCHAR); CREATE TABLE team (Team_id VARCHAR, Name VARCHAR)
Show the players and years played for players from team "Columbus Crew".
<s>[INST] Given the following SQL query and context: Query: SELECT T1.Player, T1.Years_Played FROM player AS T1 JOIN team AS T2 ON T1.Team = T2.Team_id WHERE T2.Name = "Columbus Crew" Context: CREATE TABLE player (Player VARCHAR, Years_Played VARCHAR, Team VARCHAR); CREATE TABLE team (Team_id VARCHAR, Name VARCHAR) [/INST] Based on the provided SQL query and context, your question is: Show the players and years played for players from team "Columbus Crew". The answer to your question is: SELECT T1.Player, T1.Years_Played FROM player AS T1 JOIN team AS T2 ON T1.Team = T2.Team_id WHERE T2.Name = "Columbus Crew". [/s>
SELECT POSITION, COUNT(*) FROM match_season GROUP BY POSITION
CREATE TABLE match_season (POSITION VARCHAR)
Show the position of players and the corresponding number of players.
<s>[INST] Given the following SQL query and context: Query: SELECT POSITION, COUNT(*) FROM match_season GROUP BY POSITION Context: CREATE TABLE match_season (POSITION VARCHAR) [/INST] Based on the provided SQL query and context, your question is: Show the position of players and the corresponding number of players. The answer to your question is: SELECT POSITION, COUNT(*) FROM match_season GROUP BY POSITION. [/s>
SELECT Country_name, COUNT(*) FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country GROUP BY T1.Country_name
CREATE TABLE match_season (Country VARCHAR); CREATE TABLE country (Country_name VARCHAR, Country_id VARCHAR)
Show the country names and the corresponding number of players.
<s>[INST] Given the following SQL query and context: Query: SELECT Country_name, COUNT(*) FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country GROUP BY T1.Country_name Context: CREATE TABLE match_season (Country VARCHAR); CREATE TABLE country (Country_name VARCHAR, Country_id VARCHAR) [/INST] Based on the provided SQL query and context, your question is: Show the country names and the corresponding number of players. The answer to your question is: SELECT Country_name, COUNT(*) FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country GROUP BY T1.Country_name. [/s>
SELECT player FROM match_season ORDER BY College
CREATE TABLE match_season (player VARCHAR, College VARCHAR)
Return all players sorted by college in ascending alphabetical order.
<s>[INST] Given the following SQL query and context: Query: SELECT player FROM match_season ORDER BY College Context: CREATE TABLE match_season (player VARCHAR, College VARCHAR) [/INST] Based on the provided SQL query and context, your question is: Return all players sorted by college in ascending alphabetical order. The answer to your question is: SELECT player FROM match_season ORDER BY College. [/s>
SELECT POSITION FROM match_season GROUP BY POSITION ORDER BY COUNT(*) DESC LIMIT 1
CREATE TABLE match_season (POSITION VARCHAR)
Show the most common position of players in match seasons.
<s>[INST] Given the following SQL query and context: Query: SELECT POSITION FROM match_season GROUP BY POSITION ORDER BY COUNT(*) DESC LIMIT 1 Context: CREATE TABLE match_season (POSITION VARCHAR) [/INST] Based on the provided SQL query and context, your question is: Show the most common position of players in match seasons. The answer to your question is: SELECT POSITION FROM match_season GROUP BY POSITION ORDER BY COUNT(*) DESC LIMIT 1. [/s>
SELECT College FROM match_season GROUP BY College ORDER BY COUNT(*) DESC LIMIT 3
CREATE TABLE match_season (College VARCHAR)
Show the top 3 most common colleges of players in match seasons.
<s>[INST] Given the following SQL query and context: Query: SELECT College FROM match_season GROUP BY College ORDER BY COUNT(*) DESC LIMIT 3 Context: CREATE TABLE match_season (College VARCHAR) [/INST] Based on the provided SQL query and context, your question is: Show the top 3 most common colleges of players in match seasons. The answer to your question is: SELECT College FROM match_season GROUP BY College ORDER BY COUNT(*) DESC LIMIT 3. [/s>
SELECT College FROM match_season GROUP BY College HAVING COUNT(*) >= 2
CREATE TABLE match_season (College VARCHAR)
Show the name of colleges that have at least two players.
<s>[INST] Given the following SQL query and context: Query: SELECT College FROM match_season GROUP BY College HAVING COUNT(*) >= 2 Context: CREATE TABLE match_season (College VARCHAR) [/INST] Based on the provided SQL query and context, your question is: Show the name of colleges that have at least two players. The answer to your question is: SELECT College FROM match_season GROUP BY College HAVING COUNT(*) >= 2. [/s>
SELECT College FROM match_season GROUP BY College HAVING COUNT(*) >= 2 ORDER BY College DESC
CREATE TABLE match_season (College VARCHAR)
Show the name of colleges that have at least two players in descending alphabetical order.
<s>[INST] Given the following SQL query and context: Query: SELECT College FROM match_season GROUP BY College HAVING COUNT(*) >= 2 ORDER BY College DESC Context: CREATE TABLE match_season (College VARCHAR) [/INST] Based on the provided SQL query and context, your question is: Show the name of colleges that have at least two players in descending alphabetical order. The answer to your question is: SELECT College FROM match_season GROUP BY College HAVING COUNT(*) >= 2 ORDER BY College DESC. [/s>
SELECT Name FROM team WHERE NOT Team_id IN (SELECT Team FROM match_season)
CREATE TABLE match_season (Name VARCHAR, Team_id VARCHAR, Team VARCHAR); CREATE TABLE team (Name VARCHAR, Team_id VARCHAR, Team VARCHAR)
What are the names of teams that do no have match season record?
<s>[INST] Given the following SQL query and context: Query: SELECT Name FROM team WHERE NOT Team_id IN (SELECT Team FROM match_season) Context: CREATE TABLE match_season (Name VARCHAR, Team_id VARCHAR, Team VARCHAR); CREATE TABLE team (Name VARCHAR, Team_id VARCHAR, Team VARCHAR) [/INST] Based on the provided SQL query and context, your question is: What are the names of teams that do no have match season record? The answer to your question is: SELECT Name FROM team WHERE NOT Team_id IN (SELECT Team FROM match_season). [/s>
SELECT T1.Country_name FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country WHERE T2.Position = "Forward" INTERSECT SELECT T1.Country_name FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country WHERE T2.Position = "Defender"
CREATE TABLE country (Country_name VARCHAR, Country_id VARCHAR); CREATE TABLE match_season (Country VARCHAR, Position VARCHAR)
What are the names of countries that have both players with position forward and players with position defender?
<s>[INST] Given the following SQL query and context: Query: SELECT T1.Country_name FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country WHERE T2.Position = "Forward" INTERSECT SELECT T1.Country_name FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country WHERE T2.Position = "Defender" Context: CREATE TABLE country (Country_name VARCHAR, Country_id VARCHAR); CREATE TABLE match_season (Country VARCHAR, Position VARCHAR) [/INST] Based on the provided SQL query and context, your question is: What are the names of countries that have both players with position forward and players with position defender? The answer to your question is: SELECT T1.Country_name FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country WHERE T2.Position = "Forward" INTERSECT SELECT T1.Country_name FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country WHERE T2.Position = "Defender". [/s>
SELECT College FROM match_season WHERE POSITION = "Midfielder" INTERSECT SELECT College FROM match_season WHERE POSITION = "Defender"
CREATE TABLE match_season (College VARCHAR, POSITION VARCHAR)
Which college have both players with position midfielder and players with position defender?
<s>[INST] Given the following SQL query and context: Query: SELECT College FROM match_season WHERE POSITION = "Midfielder" INTERSECT SELECT College FROM match_season WHERE POSITION = "Defender" Context: CREATE TABLE match_season (College VARCHAR, POSITION VARCHAR) [/INST] Based on the provided SQL query and context, your question is: Which college have both players with position midfielder and players with position defender? The answer to your question is: SELECT College FROM match_season WHERE POSITION = "Midfielder" INTERSECT SELECT College FROM match_season WHERE POSITION = "Defender". [/s>
SELECT COUNT(*) FROM climber
CREATE TABLE climber (Id VARCHAR)
How many climbers are there?
<s>[INST] Given the following SQL query and context: Query: SELECT COUNT(*) FROM climber Context: CREATE TABLE climber (Id VARCHAR) [/INST] Based on the provided SQL query and context, your question is: How many climbers are there? The answer to your question is: SELECT COUNT(*) FROM climber. [/s>
SELECT Name FROM climber ORDER BY Points DESC
CREATE TABLE climber (Name VARCHAR, Points VARCHAR)
List the names of climbers in descending order of points.
<s>[INST] Given the following SQL query and context: Query: SELECT Name FROM climber ORDER BY Points DESC Context: CREATE TABLE climber (Name VARCHAR, Points VARCHAR) [/INST] Based on the provided SQL query and context, your question is: List the names of climbers in descending order of points. The answer to your question is: SELECT Name FROM climber ORDER BY Points DESC. [/s>
SELECT Name FROM climber WHERE Country <> "Switzerland"
CREATE TABLE climber (Name VARCHAR, Country VARCHAR)
List the names of climbers whose country is not Switzerland.
<s>[INST] Given the following SQL query and context: Query: SELECT Name FROM climber WHERE Country <> "Switzerland" Context: CREATE TABLE climber (Name VARCHAR, Country VARCHAR) [/INST] Based on the provided SQL query and context, your question is: List the names of climbers whose country is not Switzerland. The answer to your question is: SELECT Name FROM climber WHERE Country <> "Switzerland". [/s>
SELECT MAX(Points) FROM climber WHERE Country = "United Kingdom"
CREATE TABLE climber (Points INTEGER, Country VARCHAR)
What is the maximum point for climbers whose country is United Kingdom?
<s>[INST] Given the following SQL query and context: Query: SELECT MAX(Points) FROM climber WHERE Country = "United Kingdom" Context: CREATE TABLE climber (Points INTEGER, Country VARCHAR) [/INST] Based on the provided SQL query and context, your question is: What is the maximum point for climbers whose country is United Kingdom? The answer to your question is: SELECT MAX(Points) FROM climber WHERE Country = "United Kingdom". [/s>
SELECT COUNT(DISTINCT Country) FROM climber
CREATE TABLE climber (Country VARCHAR)
How many distinct countries are the climbers from?
<s>[INST] Given the following SQL query and context: Query: SELECT COUNT(DISTINCT Country) FROM climber Context: CREATE TABLE climber (Country VARCHAR) [/INST] Based on the provided SQL query and context, your question is: How many distinct countries are the climbers from? The answer to your question is: SELECT COUNT(DISTINCT Country) FROM climber. [/s>
SELECT Name FROM mountain ORDER BY Name
CREATE TABLE mountain (Name VARCHAR)
What are the names of mountains in ascending alphabetical order?
<s>[INST] Given the following SQL query and context: Query: SELECT Name FROM mountain ORDER BY Name Context: CREATE TABLE mountain (Name VARCHAR) [/INST] Based on the provided SQL query and context, your question is: What are the names of mountains in ascending alphabetical order? The answer to your question is: SELECT Name FROM mountain ORDER BY Name. [/s>
SELECT Country FROM mountain WHERE Height > 5000
CREATE TABLE mountain (Country VARCHAR, Height INTEGER)
What are the countries of mountains with height bigger than 5000?
<s>[INST] Given the following SQL query and context: Query: SELECT Country FROM mountain WHERE Height > 5000 Context: CREATE TABLE mountain (Country VARCHAR, Height INTEGER) [/INST] Based on the provided SQL query and context, your question is: What are the countries of mountains with height bigger than 5000? The answer to your question is: SELECT Country FROM mountain WHERE Height > 5000. [/s>
SELECT Name FROM mountain ORDER BY Height DESC LIMIT 1
CREATE TABLE mountain (Name VARCHAR, Height VARCHAR)
What is the name of the highest mountain?
<s>[INST] Given the following SQL query and context: Query: SELECT Name FROM mountain ORDER BY Height DESC LIMIT 1 Context: CREATE TABLE mountain (Name VARCHAR, Height VARCHAR) [/INST] Based on the provided SQL query and context, your question is: What is the name of the highest mountain? The answer to your question is: SELECT Name FROM mountain ORDER BY Height DESC LIMIT 1. [/s>
SELECT DISTINCT Range FROM mountain ORDER BY Prominence DESC LIMIT 3
CREATE TABLE mountain (Range VARCHAR, Prominence VARCHAR)
List the distinct ranges of the mountains with the top 3 prominence.
<s>[INST] Given the following SQL query and context: Query: SELECT DISTINCT Range FROM mountain ORDER BY Prominence DESC LIMIT 3 Context: CREATE TABLE mountain (Range VARCHAR, Prominence VARCHAR) [/INST] Based on the provided SQL query and context, your question is: List the distinct ranges of the mountains with the top 3 prominence. The answer to your question is: SELECT DISTINCT Range FROM mountain ORDER BY Prominence DESC LIMIT 3. [/s>
SELECT T1.Name, T2.Name FROM climber AS T1 JOIN mountain AS T2 ON T1.Mountain_ID = T2.Mountain_ID
CREATE TABLE mountain (Name VARCHAR, Mountain_ID VARCHAR); CREATE TABLE climber (Name VARCHAR, Mountain_ID VARCHAR)
Show names of climbers and the names of mountains they climb.
<s>[INST] Given the following SQL query and context: Query: SELECT T1.Name, T2.Name FROM climber AS T1 JOIN mountain AS T2 ON T1.Mountain_ID = T2.Mountain_ID Context: CREATE TABLE mountain (Name VARCHAR, Mountain_ID VARCHAR); CREATE TABLE climber (Name VARCHAR, Mountain_ID VARCHAR) [/INST] Based on the provided SQL query and context, your question is: Show names of climbers and the names of mountains they climb. The answer to your question is: SELECT T1.Name, T2.Name FROM climber AS T1 JOIN mountain AS T2 ON T1.Mountain_ID = T2.Mountain_ID. [/s>
SELECT T1.Name, T2.Height FROM climber AS T1 JOIN mountain AS T2 ON T1.Mountain_ID = T2.Mountain_ID
CREATE TABLE mountain (Height VARCHAR, Mountain_ID VARCHAR); CREATE TABLE climber (Name VARCHAR, Mountain_ID VARCHAR)
Show the names of climbers and the heights of mountains they climb.
<s>[INST] Given the following SQL query and context: Query: SELECT T1.Name, T2.Height FROM climber AS T1 JOIN mountain AS T2 ON T1.Mountain_ID = T2.Mountain_ID Context: CREATE TABLE mountain (Height VARCHAR, Mountain_ID VARCHAR); CREATE TABLE climber (Name VARCHAR, Mountain_ID VARCHAR) [/INST] Based on the provided SQL query and context, your question is: Show the names of climbers and the heights of mountains they climb. The answer to your question is: SELECT T1.Name, T2.Height FROM climber AS T1 JOIN mountain AS T2 ON T1.Mountain_ID = T2.Mountain_ID. [/s>
SELECT T2.Height FROM climber AS T1 JOIN mountain AS T2 ON T1.Mountain_ID = T2.Mountain_ID ORDER BY T1.Points DESC LIMIT 1
CREATE TABLE climber (Mountain_ID VARCHAR, Points VARCHAR); CREATE TABLE mountain (Height VARCHAR, Mountain_ID VARCHAR)
Show the height of the mountain climbed by the climber with the maximum points.
<s>[INST] Given the following SQL query and context: Query: SELECT T2.Height FROM climber AS T1 JOIN mountain AS T2 ON T1.Mountain_ID = T2.Mountain_ID ORDER BY T1.Points DESC LIMIT 1 Context: CREATE TABLE climber (Mountain_ID VARCHAR, Points VARCHAR); CREATE TABLE mountain (Height VARCHAR, Mountain_ID VARCHAR) [/INST] Based on the provided SQL query and context, your question is: Show the height of the mountain climbed by the climber with the maximum points. The answer to your question is: SELECT T2.Height FROM climber AS T1 JOIN mountain AS T2 ON T1.Mountain_ID = T2.Mountain_ID ORDER BY T1.Points DESC LIMIT 1. [/s>
SELECT DISTINCT T2.Name FROM climber AS T1 JOIN mountain AS T2 ON T1.Mountain_ID = T2.Mountain_ID WHERE T1.Country = "West Germany"
CREATE TABLE mountain (Name VARCHAR, Mountain_ID VARCHAR); CREATE TABLE climber (Mountain_ID VARCHAR, Country VARCHAR)
Show the distinct names of mountains climbed by climbers from country "West Germany".
<s>[INST] Given the following SQL query and context: Query: SELECT DISTINCT T2.Name FROM climber AS T1 JOIN mountain AS T2 ON T1.Mountain_ID = T2.Mountain_ID WHERE T1.Country = "West Germany" Context: CREATE TABLE mountain (Name VARCHAR, Mountain_ID VARCHAR); CREATE TABLE climber (Mountain_ID VARCHAR, Country VARCHAR) [/INST] Based on the provided SQL query and context, your question is: Show the distinct names of mountains climbed by climbers from country "West Germany". The answer to your question is: SELECT DISTINCT T2.Name FROM climber AS T1 JOIN mountain AS T2 ON T1.Mountain_ID = T2.Mountain_ID WHERE T1.Country = "West Germany". [/s>
SELECT T1.Time FROM climber AS T1 JOIN mountain AS T2 ON T1.Mountain_ID = T2.Mountain_ID WHERE T2.Country = "Uganda"
CREATE TABLE mountain (Mountain_ID VARCHAR, Country VARCHAR); CREATE TABLE climber (Time VARCHAR, Mountain_ID VARCHAR)
Show the times used by climbers to climb mountains in Country Uganda.
<s>[INST] Given the following SQL query and context: Query: SELECT T1.Time FROM climber AS T1 JOIN mountain AS T2 ON T1.Mountain_ID = T2.Mountain_ID WHERE T2.Country = "Uganda" Context: CREATE TABLE mountain (Mountain_ID VARCHAR, Country VARCHAR); CREATE TABLE climber (Time VARCHAR, Mountain_ID VARCHAR) [/INST] Based on the provided SQL query and context, your question is: Show the times used by climbers to climb mountains in Country Uganda. The answer to your question is: SELECT T1.Time FROM climber AS T1 JOIN mountain AS T2 ON T1.Mountain_ID = T2.Mountain_ID WHERE T2.Country = "Uganda". [/s>
SELECT Country, COUNT(*) FROM climber GROUP BY Country
CREATE TABLE climber (Country VARCHAR)
Please show the countries and the number of climbers from each country.
<s>[INST] Given the following SQL query and context: Query: SELECT Country, COUNT(*) FROM climber GROUP BY Country Context: CREATE TABLE climber (Country VARCHAR) [/INST] Based on the provided SQL query and context, your question is: Please show the countries and the number of climbers from each country. The answer to your question is: SELECT Country, COUNT(*) FROM climber GROUP BY Country. [/s>
SELECT Country FROM mountain GROUP BY Country HAVING COUNT(*) > 1
CREATE TABLE mountain (Country VARCHAR)
List the countries that have more than one mountain.
<s>[INST] Given the following SQL query and context: Query: SELECT Country FROM mountain GROUP BY Country HAVING COUNT(*) > 1 Context: CREATE TABLE mountain (Country VARCHAR) [/INST] Based on the provided SQL query and context, your question is: List the countries that have more than one mountain. The answer to your question is: SELECT Country FROM mountain GROUP BY Country HAVING COUNT(*) > 1. [/s>
SELECT Name FROM mountain WHERE NOT Mountain_ID IN (SELECT Mountain_ID FROM climber)
CREATE TABLE mountain (Name VARCHAR, Mountain_ID VARCHAR); CREATE TABLE climber (Name VARCHAR, Mountain_ID VARCHAR)
List the names of mountains that do not have any climber.
<s>[INST] Given the following SQL query and context: Query: SELECT Name FROM mountain WHERE NOT Mountain_ID IN (SELECT Mountain_ID FROM climber) Context: CREATE TABLE mountain (Name VARCHAR, Mountain_ID VARCHAR); CREATE TABLE climber (Name VARCHAR, Mountain_ID VARCHAR) [/INST] Based on the provided SQL query and context, your question is: List the names of mountains that do not have any climber. The answer to your question is: SELECT Name FROM mountain WHERE NOT Mountain_ID IN (SELECT Mountain_ID FROM climber). [/s>
SELECT Country FROM mountain WHERE Height > 5600 INTERSECT SELECT Country FROM mountain WHERE Height < 5200
CREATE TABLE mountain (Country VARCHAR, Height INTEGER)
Show the countries that have mountains with height more than 5600 stories and mountains with height less than 5200.
<s>[INST] Given the following SQL query and context: Query: SELECT Country FROM mountain WHERE Height > 5600 INTERSECT SELECT Country FROM mountain WHERE Height < 5200 Context: CREATE TABLE mountain (Country VARCHAR, Height INTEGER) [/INST] Based on the provided SQL query and context, your question is: Show the countries that have mountains with height more than 5600 stories and mountains with height less than 5200. The answer to your question is: SELECT Country FROM mountain WHERE Height > 5600 INTERSECT SELECT Country FROM mountain WHERE Height < 5200. [/s>
SELECT Range FROM mountain GROUP BY Range ORDER BY COUNT(*) DESC LIMIT 1
CREATE TABLE mountain (Range VARCHAR)
Show the range that has the most number of mountains.
<s>[INST] Given the following SQL query and context: Query: SELECT Range FROM mountain GROUP BY Range ORDER BY COUNT(*) DESC LIMIT 1 Context: CREATE TABLE mountain (Range VARCHAR) [/INST] Based on the provided SQL query and context, your question is: Show the range that has the most number of mountains. The answer to your question is: SELECT Range FROM mountain GROUP BY Range ORDER BY COUNT(*) DESC LIMIT 1. [/s>
SELECT Name FROM mountain WHERE Height > 5000 OR Prominence > 1000
CREATE TABLE mountain (Name VARCHAR, Height VARCHAR, Prominence VARCHAR)
Show the names of mountains with height more than 5000 or prominence more than 1000.
<s>[INST] Given the following SQL query and context: Query: SELECT Name FROM mountain WHERE Height > 5000 OR Prominence > 1000 Context: CREATE TABLE mountain (Name VARCHAR, Height VARCHAR, Prominence VARCHAR) [/INST] Based on the provided SQL query and context, your question is: Show the names of mountains with height more than 5000 or prominence more than 1000. The answer to your question is: SELECT Name FROM mountain WHERE Height > 5000 OR Prominence > 1000. [/s>
SELECT COUNT(*) FROM body_builder
CREATE TABLE body_builder (Id VARCHAR)
How many body builders are there?
<s>[INST] Given the following SQL query and context: Query: SELECT COUNT(*) FROM body_builder Context: CREATE TABLE body_builder (Id VARCHAR) [/INST] Based on the provided SQL query and context, your question is: How many body builders are there? The answer to your question is: SELECT COUNT(*) FROM body_builder. [/s>
SELECT Total FROM body_builder ORDER BY Total
CREATE TABLE body_builder (Total VARCHAR)
List the total scores of body builders in ascending order.
<s>[INST] Given the following SQL query and context: Query: SELECT Total FROM body_builder ORDER BY Total Context: CREATE TABLE body_builder (Total VARCHAR) [/INST] Based on the provided SQL query and context, your question is: List the total scores of body builders in ascending order. The answer to your question is: SELECT Total FROM body_builder ORDER BY Total. [/s>
SELECT Snatch, Clean_Jerk FROM body_builder ORDER BY Snatch
CREATE TABLE body_builder (Snatch VARCHAR, Clean_Jerk VARCHAR)
List the snatch score and clean jerk score of body builders in ascending order of snatch score.
<s>[INST] Given the following SQL query and context: Query: SELECT Snatch, Clean_Jerk FROM body_builder ORDER BY Snatch Context: CREATE TABLE body_builder (Snatch VARCHAR, Clean_Jerk VARCHAR) [/INST] Based on the provided SQL query and context, your question is: List the snatch score and clean jerk score of body builders in ascending order of snatch score. The answer to your question is: SELECT Snatch, Clean_Jerk FROM body_builder ORDER BY Snatch. [/s>
SELECT AVG(Snatch) FROM body_builder
CREATE TABLE body_builder (Snatch INTEGER)
What is the average snatch score of body builders?
<s>[INST] Given the following SQL query and context: Query: SELECT AVG(Snatch) FROM body_builder Context: CREATE TABLE body_builder (Snatch INTEGER) [/INST] Based on the provided SQL query and context, your question is: What is the average snatch score of body builders? The answer to your question is: SELECT AVG(Snatch) FROM body_builder. [/s>
SELECT Clean_Jerk FROM body_builder ORDER BY Total DESC LIMIT 1
CREATE TABLE body_builder (Clean_Jerk VARCHAR, Total VARCHAR)
What are the clean and jerk score of the body builder with the highest total score?
<s>[INST] Given the following SQL query and context: Query: SELECT Clean_Jerk FROM body_builder ORDER BY Total DESC LIMIT 1 Context: CREATE TABLE body_builder (Clean_Jerk VARCHAR, Total VARCHAR) [/INST] Based on the provided SQL query and context, your question is: What are the clean and jerk score of the body builder with the highest total score? The answer to your question is: SELECT Clean_Jerk FROM body_builder ORDER BY Total DESC LIMIT 1. [/s>
SELECT Birth_Date FROM People ORDER BY Height
CREATE TABLE People (Birth_Date VARCHAR, Height VARCHAR)
What are the birthdays of people in ascending order of height?
<s>[INST] Given the following SQL query and context: Query: SELECT Birth_Date FROM People ORDER BY Height Context: CREATE TABLE People (Birth_Date VARCHAR, Height VARCHAR) [/INST] Based on the provided SQL query and context, your question is: What are the birthdays of people in ascending order of height? The answer to your question is: SELECT Birth_Date FROM People ORDER BY Height. [/s>
SELECT T2.Name FROM body_builder AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID
CREATE TABLE body_builder (People_ID VARCHAR); CREATE TABLE people (Name VARCHAR, People_ID VARCHAR)
What are the names of body builders?
<s>[INST] Given the following SQL query and context: Query: SELECT T2.Name FROM body_builder AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID Context: CREATE TABLE body_builder (People_ID VARCHAR); CREATE TABLE people (Name VARCHAR, People_ID VARCHAR) [/INST] Based on the provided SQL query and context, your question is: What are the names of body builders? The answer to your question is: SELECT T2.Name FROM body_builder AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID. [/s>
SELECT T2.Name FROM body_builder AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID WHERE T1.Total > 300
CREATE TABLE people (Name VARCHAR, People_ID VARCHAR); CREATE TABLE body_builder (People_ID VARCHAR, Total INTEGER)
What are the names of body builders whose total score is higher than 300?
<s>[INST] Given the following SQL query and context: Query: SELECT T2.Name FROM body_builder AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID WHERE T1.Total > 300 Context: CREATE TABLE people (Name VARCHAR, People_ID VARCHAR); CREATE TABLE body_builder (People_ID VARCHAR, Total INTEGER) [/INST] Based on the provided SQL query and context, your question is: What are the names of body builders whose total score is higher than 300? The answer to your question is: SELECT T2.Name FROM body_builder AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID WHERE T1.Total > 300. [/s>
SELECT T2.Name FROM body_builder AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID ORDER BY T2.Weight DESC LIMIT 1
CREATE TABLE body_builder (People_ID VARCHAR); CREATE TABLE people (Name VARCHAR, People_ID VARCHAR, Weight VARCHAR)
What is the name of the body builder with the greatest body weight?
<s>[INST] Given the following SQL query and context: Query: SELECT T2.Name FROM body_builder AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID ORDER BY T2.Weight DESC LIMIT 1 Context: CREATE TABLE body_builder (People_ID VARCHAR); CREATE TABLE people (Name VARCHAR, People_ID VARCHAR, Weight VARCHAR) [/INST] Based on the provided SQL query and context, your question is: What is the name of the body builder with the greatest body weight? The answer to your question is: SELECT T2.Name FROM body_builder AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID ORDER BY T2.Weight DESC LIMIT 1. [/s>
SELECT T2.Birth_Date, T2.Birth_Place FROM body_builder AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID ORDER BY T1.Total DESC LIMIT 1
CREATE TABLE body_builder (People_ID VARCHAR, Total VARCHAR); CREATE TABLE people (Birth_Date VARCHAR, Birth_Place VARCHAR, People_ID VARCHAR)
What are the birth date and birth place of the body builder with the highest total points?
<s>[INST] Given the following SQL query and context: Query: SELECT T2.Birth_Date, T2.Birth_Place FROM body_builder AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID ORDER BY T1.Total DESC LIMIT 1 Context: CREATE TABLE body_builder (People_ID VARCHAR, Total VARCHAR); CREATE TABLE people (Birth_Date VARCHAR, Birth_Place VARCHAR, People_ID VARCHAR) [/INST] Based on the provided SQL query and context, your question is: What are the birth date and birth place of the body builder with the highest total points? The answer to your question is: SELECT T2.Birth_Date, T2.Birth_Place FROM body_builder AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID ORDER BY T1.Total DESC LIMIT 1. [/s>
SELECT T2.Height FROM body_builder AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID WHERE T1.Total < 315
CREATE TABLE people (Height VARCHAR, People_ID VARCHAR); CREATE TABLE body_builder (People_ID VARCHAR, Total INTEGER)
What are the heights of body builders with total score smaller than 315?
<s>[INST] Given the following SQL query and context: Query: SELECT T2.Height FROM body_builder AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID WHERE T1.Total < 315 Context: CREATE TABLE people (Height VARCHAR, People_ID VARCHAR); CREATE TABLE body_builder (People_ID VARCHAR, Total INTEGER) [/INST] Based on the provided SQL query and context, your question is: What are the heights of body builders with total score smaller than 315? The answer to your question is: SELECT T2.Height FROM body_builder AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID WHERE T1.Total < 315. [/s>
SELECT AVG(T1.Total) FROM body_builder AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID WHERE T2.Height > 200
CREATE TABLE people (People_ID VARCHAR, Height INTEGER); CREATE TABLE body_builder (Total INTEGER, People_ID VARCHAR)
What is the average total score of body builders with height bigger than 200?
<s>[INST] Given the following SQL query and context: Query: SELECT AVG(T1.Total) FROM body_builder AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID WHERE T2.Height > 200 Context: CREATE TABLE people (People_ID VARCHAR, Height INTEGER); CREATE TABLE body_builder (Total INTEGER, People_ID VARCHAR) [/INST] Based on the provided SQL query and context, your question is: What is the average total score of body builders with height bigger than 200? The answer to your question is: SELECT AVG(T1.Total) FROM body_builder AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID WHERE T2.Height > 200. [/s>
SELECT T2.Name FROM body_builder AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID ORDER BY T1.Total DESC
CREATE TABLE body_builder (People_ID VARCHAR, Total VARCHAR); CREATE TABLE people (Name VARCHAR, People_ID VARCHAR)
What are the names of body builders in descending order of total scores?
<s>[INST] Given the following SQL query and context: Query: SELECT T2.Name FROM body_builder AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID ORDER BY T1.Total DESC Context: CREATE TABLE body_builder (People_ID VARCHAR, Total VARCHAR); CREATE TABLE people (Name VARCHAR, People_ID VARCHAR) [/INST] Based on the provided SQL query and context, your question is: What are the names of body builders in descending order of total scores? The answer to your question is: SELECT T2.Name FROM body_builder AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID ORDER BY T1.Total DESC. [/s>
SELECT Birth_Place, COUNT(*) FROM people GROUP BY Birth_Place
CREATE TABLE people (Birth_Place VARCHAR)
List each birth place along with the number of people from there.
<s>[INST] Given the following SQL query and context: Query: SELECT Birth_Place, COUNT(*) FROM people GROUP BY Birth_Place Context: CREATE TABLE people (Birth_Place VARCHAR) [/INST] Based on the provided SQL query and context, your question is: List each birth place along with the number of people from there. The answer to your question is: SELECT Birth_Place, COUNT(*) FROM people GROUP BY Birth_Place. [/s>
SELECT Birth_Place FROM people GROUP BY Birth_Place ORDER BY COUNT(*) DESC LIMIT 1
CREATE TABLE people (Birth_Place VARCHAR)
What is the most common birth place of people?
<s>[INST] Given the following SQL query and context: Query: SELECT Birth_Place FROM people GROUP BY Birth_Place ORDER BY COUNT(*) DESC LIMIT 1 Context: CREATE TABLE people (Birth_Place VARCHAR) [/INST] Based on the provided SQL query and context, your question is: What is the most common birth place of people? The answer to your question is: SELECT Birth_Place FROM people GROUP BY Birth_Place ORDER BY COUNT(*) DESC LIMIT 1. [/s>
SELECT Birth_Place FROM people GROUP BY Birth_Place HAVING COUNT(*) >= 2
CREATE TABLE people (Birth_Place VARCHAR)
What are the birth places that are shared by at least two people?
<s>[INST] Given the following SQL query and context: Query: SELECT Birth_Place FROM people GROUP BY Birth_Place HAVING COUNT(*) >= 2 Context: CREATE TABLE people (Birth_Place VARCHAR) [/INST] Based on the provided SQL query and context, your question is: What are the birth places that are shared by at least two people? The answer to your question is: SELECT Birth_Place FROM people GROUP BY Birth_Place HAVING COUNT(*) >= 2. [/s>
SELECT Height, Weight FROM people ORDER BY Height DESC
CREATE TABLE people (Height VARCHAR, Weight VARCHAR)
List the height and weight of people in descending order of height.
<s>[INST] Given the following SQL query and context: Query: SELECT Height, Weight FROM people ORDER BY Height DESC Context: CREATE TABLE people (Height VARCHAR, Weight VARCHAR) [/INST] Based on the provided SQL query and context, your question is: List the height and weight of people in descending order of height. The answer to your question is: SELECT Height, Weight FROM people ORDER BY Height DESC. [/s>
SELECT * FROM body_builder
CREATE TABLE body_builder (Id VARCHAR)
Show all information about each body builder.
<s>[INST] Given the following SQL query and context: Query: SELECT * FROM body_builder Context: CREATE TABLE body_builder (Id VARCHAR) [/INST] Based on the provided SQL query and context, your question is: Show all information about each body builder. The answer to your question is: SELECT * FROM body_builder. [/s>
SELECT Name, birth_place FROM people EXCEPT SELECT T1.Name, T1.birth_place FROM people AS T1 JOIN body_builder AS T2 ON T1.people_id = T2.people_id
CREATE TABLE people (Name VARCHAR, birth_place VARCHAR, people_id VARCHAR); CREATE TABLE body_builder (people_id VARCHAR); CREATE TABLE people (Name VARCHAR, birth_place VARCHAR)
List the names and origins of people who are not body builders.
<s>[INST] Given the following SQL query and context: Query: SELECT Name, birth_place FROM people EXCEPT SELECT T1.Name, T1.birth_place FROM people AS T1 JOIN body_builder AS T2 ON T1.people_id = T2.people_id Context: CREATE TABLE people (Name VARCHAR, birth_place VARCHAR, people_id VARCHAR); CREATE TABLE body_builder (people_id VARCHAR); CREATE TABLE people (Name VARCHAR, birth_place VARCHAR) [/INST] Based on the provided SQL query and context, your question is: List the names and origins of people who are not body builders. The answer to your question is: SELECT Name, birth_place FROM people EXCEPT SELECT T1.Name, T1.birth_place FROM people AS T1 JOIN body_builder AS T2 ON T1.people_id = T2.people_id. [/s>
SELECT COUNT(DISTINCT Birth_Place) FROM people
CREATE TABLE people (Birth_Place VARCHAR)
How many distinct birth places are there?
<s>[INST] Given the following SQL query and context: Query: SELECT COUNT(DISTINCT Birth_Place) FROM people Context: CREATE TABLE people (Birth_Place VARCHAR) [/INST] Based on the provided SQL query and context, your question is: How many distinct birth places are there? The answer to your question is: SELECT COUNT(DISTINCT Birth_Place) FROM people. [/s>
SELECT COUNT(*) FROM people WHERE NOT people_id IN (SELECT People_ID FROM body_builder)
CREATE TABLE body_builder (people_id VARCHAR, People_ID VARCHAR); CREATE TABLE people (people_id VARCHAR, People_ID VARCHAR)
How many persons are not body builders?
<s>[INST] Given the following SQL query and context: Query: SELECT COUNT(*) FROM people WHERE NOT people_id IN (SELECT People_ID FROM body_builder) Context: CREATE TABLE body_builder (people_id VARCHAR, People_ID VARCHAR); CREATE TABLE people (people_id VARCHAR, People_ID VARCHAR) [/INST] Based on the provided SQL query and context, your question is: How many persons are not body builders? The answer to your question is: SELECT COUNT(*) FROM people WHERE NOT people_id IN (SELECT People_ID FROM body_builder). [/s>
SELECT T2.weight FROM body_builder AS T1 JOIN people AS T2 ON T1.people_id = T2.people_id WHERE T1.snatch > 140 OR T2.height > 200
CREATE TABLE people (weight VARCHAR, people_id VARCHAR, height VARCHAR); CREATE TABLE body_builder (people_id VARCHAR, snatch VARCHAR)
List the weight of the body builders who have snatch score higher than 140 or have the height greater than 200.
<s>[INST] Given the following SQL query and context: Query: SELECT T2.weight FROM body_builder AS T1 JOIN people AS T2 ON T1.people_id = T2.people_id WHERE T1.snatch > 140 OR T2.height > 200 Context: CREATE TABLE people (weight VARCHAR, people_id VARCHAR, height VARCHAR); CREATE TABLE body_builder (people_id VARCHAR, snatch VARCHAR) [/INST] Based on the provided SQL query and context, your question is: List the weight of the body builders who have snatch score higher than 140 or have the height greater than 200. The answer to your question is: SELECT T2.weight FROM body_builder AS T1 JOIN people AS T2 ON T1.people_id = T2.people_id WHERE T1.snatch > 140 OR T2.height > 200. [/s>
SELECT T1.total FROM body_builder AS T1 JOIN people AS T2 ON T1.people_id = T2.people_id WHERE T2.Birth_Date LIKE "%January%"
CREATE TABLE people (people_id VARCHAR, Birth_Date VARCHAR); CREATE TABLE body_builder (total VARCHAR, people_id VARCHAR)
What are the total scores of the body builders whose birthday contains the string "January" ?
<s>[INST] Given the following SQL query and context: Query: SELECT T1.total FROM body_builder AS T1 JOIN people AS T2 ON T1.people_id = T2.people_id WHERE T2.Birth_Date LIKE "%January%" Context: CREATE TABLE people (people_id VARCHAR, Birth_Date VARCHAR); CREATE TABLE body_builder (total VARCHAR, people_id VARCHAR) [/INST] Based on the provided SQL query and context, your question is: What are the total scores of the body builders whose birthday contains the string "January" ? The answer to your question is: SELECT T1.total FROM body_builder AS T1 JOIN people AS T2 ON T1.people_id = T2.people_id WHERE T2.Birth_Date LIKE "%January%". [/s>
SELECT MIN(snatch) FROM body_builder
CREATE TABLE body_builder (snatch INTEGER)
What is the minimum snatch score?
<s>[INST] Given the following SQL query and context: Query: SELECT MIN(snatch) FROM body_builder Context: CREATE TABLE body_builder (snatch INTEGER) [/INST] Based on the provided SQL query and context, your question is: What is the minimum snatch score? The answer to your question is: SELECT MIN(snatch) FROM body_builder. [/s>
SELECT COUNT(*) FROM election
CREATE TABLE election (Id VARCHAR)
How many elections are there?
<s>[INST] Given the following SQL query and context: Query: SELECT COUNT(*) FROM election Context: CREATE TABLE election (Id VARCHAR) [/INST] Based on the provided SQL query and context, your question is: How many elections are there? The answer to your question is: SELECT COUNT(*) FROM election. [/s>
SELECT Votes FROM election ORDER BY Votes DESC
CREATE TABLE election (Votes VARCHAR)
List the votes of elections in descending order.
<s>[INST] Given the following SQL query and context: Query: SELECT Votes FROM election ORDER BY Votes DESC Context: CREATE TABLE election (Votes VARCHAR) [/INST] Based on the provided SQL query and context, your question is: List the votes of elections in descending order. The answer to your question is: SELECT Votes FROM election ORDER BY Votes DESC. [/s>
SELECT Date, Vote_Percent FROM election
CREATE TABLE election (Date VARCHAR, Vote_Percent VARCHAR)
List the dates and vote percents of elections.
<s>[INST] Given the following SQL query and context: Query: SELECT Date, Vote_Percent FROM election Context: CREATE TABLE election (Date VARCHAR, Vote_Percent VARCHAR) [/INST] Based on the provided SQL query and context, your question is: List the dates and vote percents of elections. The answer to your question is: SELECT Date, Vote_Percent FROM election. [/s>
SELECT MIN(Vote_Percent), MAX(Vote_Percent) FROM election
CREATE TABLE election (Vote_Percent INTEGER)
What are the minimum and maximum vote percents of elections?
<s>[INST] Given the following SQL query and context: Query: SELECT MIN(Vote_Percent), MAX(Vote_Percent) FROM election Context: CREATE TABLE election (Vote_Percent INTEGER) [/INST] Based on the provided SQL query and context, your question is: What are the minimum and maximum vote percents of elections? The answer to your question is: SELECT MIN(Vote_Percent), MAX(Vote_Percent) FROM election. [/s>
SELECT Name, Party FROM representative
CREATE TABLE representative (Name VARCHAR, Party VARCHAR)
What are the names and parties of representatives?
<s>[INST] Given the following SQL query and context: Query: SELECT Name, Party FROM representative Context: CREATE TABLE representative (Name VARCHAR, Party VARCHAR) [/INST] Based on the provided SQL query and context, your question is: What are the names and parties of representatives? The answer to your question is: SELECT Name, Party FROM representative. [/s>
SELECT Name FROM Representative WHERE Party <> "Republican"
CREATE TABLE Representative (Name VARCHAR, Party VARCHAR)
What are the names of representatives whose party is not "Republican"?
<s>[INST] Given the following SQL query and context: Query: SELECT Name FROM Representative WHERE Party <> "Republican" Context: CREATE TABLE Representative (Name VARCHAR, Party VARCHAR) [/INST] Based on the provided SQL query and context, your question is: What are the names of representatives whose party is not "Republican"? The answer to your question is: SELECT Name FROM Representative WHERE Party <> "Republican". [/s>
SELECT Lifespan FROM representative WHERE State = "New York" OR State = "Indiana"
CREATE TABLE representative (Lifespan VARCHAR, State VARCHAR)
What are the life spans of representatives from New York state or Indiana state?
<s>[INST] Given the following SQL query and context: Query: SELECT Lifespan FROM representative WHERE State = "New York" OR State = "Indiana" Context: CREATE TABLE representative (Lifespan VARCHAR, State VARCHAR) [/INST] Based on the provided SQL query and context, your question is: What are the life spans of representatives from New York state or Indiana state? The answer to your question is: SELECT Lifespan FROM representative WHERE State = "New York" OR State = "Indiana". [/s>
SELECT T2.Name, T1.Date FROM election AS T1 JOIN representative AS T2 ON T1.Representative_ID = T2.Representative_ID
CREATE TABLE election (Date VARCHAR, Representative_ID VARCHAR); CREATE TABLE representative (Name VARCHAR, Representative_ID VARCHAR)
What are the names of representatives and the dates of elections they participated in.
<s>[INST] Given the following SQL query and context: Query: SELECT T2.Name, T1.Date FROM election AS T1 JOIN representative AS T2 ON T1.Representative_ID = T2.Representative_ID Context: CREATE TABLE election (Date VARCHAR, Representative_ID VARCHAR); CREATE TABLE representative (Name VARCHAR, Representative_ID VARCHAR) [/INST] Based on the provided SQL query and context, your question is: What are the names of representatives and the dates of elections they participated in. The answer to your question is: SELECT T2.Name, T1.Date FROM election AS T1 JOIN representative AS T2 ON T1.Representative_ID = T2.Representative_ID. [/s>
SELECT T2.Name FROM election AS T1 JOIN representative AS T2 ON T1.Representative_ID = T2.Representative_ID WHERE Votes > 10000
CREATE TABLE representative (Name VARCHAR, Representative_ID VARCHAR); CREATE TABLE election (Representative_ID VARCHAR)
What are the names of representatives with more than 10000 votes in election?
<s>[INST] Given the following SQL query and context: Query: SELECT T2.Name FROM election AS T1 JOIN representative AS T2 ON T1.Representative_ID = T2.Representative_ID WHERE Votes > 10000 Context: CREATE TABLE representative (Name VARCHAR, Representative_ID VARCHAR); CREATE TABLE election (Representative_ID VARCHAR) [/INST] Based on the provided SQL query and context, your question is: What are the names of representatives with more than 10000 votes in election? The answer to your question is: SELECT T2.Name FROM election AS T1 JOIN representative AS T2 ON T1.Representative_ID = T2.Representative_ID WHERE Votes > 10000. [/s>
SELECT T2.Name FROM election AS T1 JOIN representative AS T2 ON T1.Representative_ID = T2.Representative_ID ORDER BY votes DESC
CREATE TABLE representative (Name VARCHAR, Representative_ID VARCHAR); CREATE TABLE election (Representative_ID VARCHAR)
What are the names of representatives in descending order of votes?
<s>[INST] Given the following SQL query and context: Query: SELECT T2.Name FROM election AS T1 JOIN representative AS T2 ON T1.Representative_ID = T2.Representative_ID ORDER BY votes DESC Context: CREATE TABLE representative (Name VARCHAR, Representative_ID VARCHAR); CREATE TABLE election (Representative_ID VARCHAR) [/INST] Based on the provided SQL query and context, your question is: What are the names of representatives in descending order of votes? The answer to your question is: SELECT T2.Name FROM election AS T1 JOIN representative AS T2 ON T1.Representative_ID = T2.Representative_ID ORDER BY votes DESC. [/s>
SELECT T2.Party FROM election AS T1 JOIN representative AS T2 ON T1.Representative_ID = T2.Representative_ID ORDER BY votes LIMIT 1
CREATE TABLE representative (Party VARCHAR, Representative_ID VARCHAR); CREATE TABLE election (Representative_ID VARCHAR)
What is the party of the representative that has the smallest number of votes.
<s>[INST] Given the following SQL query and context: Query: SELECT T2.Party FROM election AS T1 JOIN representative AS T2 ON T1.Representative_ID = T2.Representative_ID ORDER BY votes LIMIT 1 Context: CREATE TABLE representative (Party VARCHAR, Representative_ID VARCHAR); CREATE TABLE election (Representative_ID VARCHAR) [/INST] Based on the provided SQL query and context, your question is: What is the party of the representative that has the smallest number of votes. The answer to your question is: SELECT T2.Party FROM election AS T1 JOIN representative AS T2 ON T1.Representative_ID = T2.Representative_ID ORDER BY votes LIMIT 1. [/s>
SELECT T2.Lifespan FROM election AS T1 JOIN representative AS T2 ON T1.Representative_ID = T2.Representative_ID ORDER BY Vote_Percent DESC
CREATE TABLE election (Representative_ID VARCHAR); CREATE TABLE representative (Lifespan VARCHAR, Representative_ID VARCHAR)
What are the lifespans of representatives in descending order of vote percent?
<s>[INST] Given the following SQL query and context: Query: SELECT T2.Lifespan FROM election AS T1 JOIN representative AS T2 ON T1.Representative_ID = T2.Representative_ID ORDER BY Vote_Percent DESC Context: CREATE TABLE election (Representative_ID VARCHAR); CREATE TABLE representative (Lifespan VARCHAR, Representative_ID VARCHAR) [/INST] Based on the provided SQL query and context, your question is: What are the lifespans of representatives in descending order of vote percent? The answer to your question is: SELECT T2.Lifespan FROM election AS T1 JOIN representative AS T2 ON T1.Representative_ID = T2.Representative_ID ORDER BY Vote_Percent DESC. [/s>
SELECT AVG(T1.Votes) FROM election AS T1 JOIN representative AS T2 ON T1.Representative_ID = T2.Representative_ID WHERE T2.Party = "Republican"
CREATE TABLE election (Votes INTEGER, Representative_ID VARCHAR); CREATE TABLE representative (Representative_ID VARCHAR, Party VARCHAR)
What is the average number of votes of representatives from party "Republican"?
<s>[INST] Given the following SQL query and context: Query: SELECT AVG(T1.Votes) FROM election AS T1 JOIN representative AS T2 ON T1.Representative_ID = T2.Representative_ID WHERE T2.Party = "Republican" Context: CREATE TABLE election (Votes INTEGER, Representative_ID VARCHAR); CREATE TABLE representative (Representative_ID VARCHAR, Party VARCHAR) [/INST] Based on the provided SQL query and context, your question is: What is the average number of votes of representatives from party "Republican"? The answer to your question is: SELECT AVG(T1.Votes) FROM election AS T1 JOIN representative AS T2 ON T1.Representative_ID = T2.Representative_ID WHERE T2.Party = "Republican". [/s>
SELECT Party, COUNT(*) FROM representative GROUP BY Party
CREATE TABLE representative (Party VARCHAR)
What are the different parties of representative? Show the party name and the number of representatives in each party.
<s>[INST] Given the following SQL query and context: Query: SELECT Party, COUNT(*) FROM representative GROUP BY Party Context: CREATE TABLE representative (Party VARCHAR) [/INST] Based on the provided SQL query and context, your question is: What are the different parties of representative? Show the party name and the number of representatives in each party. The answer to your question is: SELECT Party, COUNT(*) FROM representative GROUP BY Party. [/s>
SELECT Party, COUNT(*) FROM representative GROUP BY Party ORDER BY COUNT(*) DESC LIMIT 1
CREATE TABLE representative (Party VARCHAR)
What is the party that has the largest number of representatives?
<s>[INST] Given the following SQL query and context: Query: SELECT Party, COUNT(*) FROM representative GROUP BY Party ORDER BY COUNT(*) DESC LIMIT 1 Context: CREATE TABLE representative (Party VARCHAR) [/INST] Based on the provided SQL query and context, your question is: What is the party that has the largest number of representatives? The answer to your question is: SELECT Party, COUNT(*) FROM representative GROUP BY Party ORDER BY COUNT(*) DESC LIMIT 1. [/s>
SELECT Party FROM representative GROUP BY Party HAVING COUNT(*) >= 3
CREATE TABLE representative (Party VARCHAR)
What parties have at least three representatives?
<s>[INST] Given the following SQL query and context: Query: SELECT Party FROM representative GROUP BY Party HAVING COUNT(*) >= 3 Context: CREATE TABLE representative (Party VARCHAR) [/INST] Based on the provided SQL query and context, your question is: What parties have at least three representatives? The answer to your question is: SELECT Party FROM representative GROUP BY Party HAVING COUNT(*) >= 3. [/s>
SELECT State FROM representative GROUP BY State HAVING COUNT(*) >= 2
CREATE TABLE representative (State VARCHAR)
What states have at least two representatives?
<s>[INST] Given the following SQL query and context: Query: SELECT State FROM representative GROUP BY State HAVING COUNT(*) >= 2 Context: CREATE TABLE representative (State VARCHAR) [/INST] Based on the provided SQL query and context, your question is: What states have at least two representatives? The answer to your question is: SELECT State FROM representative GROUP BY State HAVING COUNT(*) >= 2. [/s>
SELECT Name FROM representative WHERE NOT Representative_ID IN (SELECT Representative_ID FROM election)
CREATE TABLE election (Name VARCHAR, Representative_ID VARCHAR); CREATE TABLE representative (Name VARCHAR, Representative_ID VARCHAR)
List the names of representatives that have not participated in elections listed here.
<s>[INST] Given the following SQL query and context: Query: SELECT Name FROM representative WHERE NOT Representative_ID IN (SELECT Representative_ID FROM election) Context: CREATE TABLE election (Name VARCHAR, Representative_ID VARCHAR); CREATE TABLE representative (Name VARCHAR, Representative_ID VARCHAR) [/INST] Based on the provided SQL query and context, your question is: List the names of representatives that have not participated in elections listed here. The answer to your question is: SELECT Name FROM representative WHERE NOT Representative_ID IN (SELECT Representative_ID FROM election). [/s>
SELECT Party FROM representative WHERE State = "New York" INTERSECT SELECT Party FROM representative WHERE State = "Pennsylvania"
CREATE TABLE representative (Party VARCHAR, State VARCHAR)
Show the parties that have both representatives in New York state and representatives in Pennsylvania state.
<s>[INST] Given the following SQL query and context: Query: SELECT Party FROM representative WHERE State = "New York" INTERSECT SELECT Party FROM representative WHERE State = "Pennsylvania" Context: CREATE TABLE representative (Party VARCHAR, State VARCHAR) [/INST] Based on the provided SQL query and context, your question is: Show the parties that have both representatives in New York state and representatives in Pennsylvania state. The answer to your question is: SELECT Party FROM representative WHERE State = "New York" INTERSECT SELECT Party FROM representative WHERE State = "Pennsylvania". [/s>
SELECT COUNT(DISTINCT Party) FROM representative
CREATE TABLE representative (Party VARCHAR)
How many distinct parties are there for representatives?
<s>[INST] Given the following SQL query and context: Query: SELECT COUNT(DISTINCT Party) FROM representative Context: CREATE TABLE representative (Party VARCHAR) [/INST] Based on the provided SQL query and context, your question is: How many distinct parties are there for representatives? The answer to your question is: SELECT COUNT(DISTINCT Party) FROM representative. [/s>
SELECT COUNT(*) FROM Apartment_Bookings
CREATE TABLE Apartment_Bookings (Id VARCHAR)
How many apartment bookings are there in total?
<s>[INST] Given the following SQL query and context: Query: SELECT COUNT(*) FROM Apartment_Bookings Context: CREATE TABLE Apartment_Bookings (Id VARCHAR) [/INST] Based on the provided SQL query and context, your question is: How many apartment bookings are there in total? The answer to your question is: SELECT COUNT(*) FROM Apartment_Bookings. [/s>
SELECT booking_start_date, booking_end_date FROM Apartment_Bookings
CREATE TABLE Apartment_Bookings (booking_start_date VARCHAR, booking_end_date VARCHAR)
Show the start dates and end dates of all the apartment bookings.
<s>[INST] Given the following SQL query and context: Query: SELECT booking_start_date, booking_end_date FROM Apartment_Bookings Context: CREATE TABLE Apartment_Bookings (booking_start_date VARCHAR, booking_end_date VARCHAR) [/INST] Based on the provided SQL query and context, your question is: Show the start dates and end dates of all the apartment bookings. The answer to your question is: SELECT booking_start_date, booking_end_date FROM Apartment_Bookings. [/s>
SELECT DISTINCT building_description FROM Apartment_Buildings
CREATE TABLE Apartment_Buildings (building_description VARCHAR)
Show all distinct building descriptions.
<s>[INST] Given the following SQL query and context: Query: SELECT DISTINCT building_description FROM Apartment_Buildings Context: CREATE TABLE Apartment_Buildings (building_description VARCHAR) [/INST] Based on the provided SQL query and context, your question is: Show all distinct building descriptions. The answer to your question is: SELECT DISTINCT building_description FROM Apartment_Buildings. [/s>
SELECT building_short_name FROM Apartment_Buildings WHERE building_manager = "Emma"
CREATE TABLE Apartment_Buildings (building_short_name VARCHAR, building_manager VARCHAR)
Show the short names of the buildings managed by "Emma".
<s>[INST] Given the following SQL query and context: Query: SELECT building_short_name FROM Apartment_Buildings WHERE building_manager = "Emma" Context: CREATE TABLE Apartment_Buildings (building_short_name VARCHAR, building_manager VARCHAR) [/INST] Based on the provided SQL query and context, your question is: Show the short names of the buildings managed by "Emma". The answer to your question is: SELECT building_short_name FROM Apartment_Buildings WHERE building_manager = "Emma". [/s>
SELECT building_address, building_phone FROM Apartment_Buildings WHERE building_manager = "Brenden"
CREATE TABLE Apartment_Buildings (building_address VARCHAR, building_phone VARCHAR, building_manager VARCHAR)
Show the addresses and phones of all the buildings managed by "Brenden".
<s>[INST] Given the following SQL query and context: Query: SELECT building_address, building_phone FROM Apartment_Buildings WHERE building_manager = "Brenden" Context: CREATE TABLE Apartment_Buildings (building_address VARCHAR, building_phone VARCHAR, building_manager VARCHAR) [/INST] Based on the provided SQL query and context, your question is: Show the addresses and phones of all the buildings managed by "Brenden". The answer to your question is: SELECT building_address, building_phone FROM Apartment_Buildings WHERE building_manager = "Brenden". [/s>
SELECT building_full_name FROM Apartment_Buildings WHERE building_full_name LIKE "%court%"
CREATE TABLE Apartment_Buildings (building_full_name VARCHAR)
What are the building full names that contain the word "court"?
<s>[INST] Given the following SQL query and context: Query: SELECT building_full_name FROM Apartment_Buildings WHERE building_full_name LIKE "%court%" Context: CREATE TABLE Apartment_Buildings (building_full_name VARCHAR) [/INST] Based on the provided SQL query and context, your question is: What are the building full names that contain the word "court"? The answer to your question is: SELECT building_full_name FROM Apartment_Buildings WHERE building_full_name LIKE "%court%". [/s>
SELECT MIN(bathroom_count), MAX(bathroom_count) FROM Apartments
CREATE TABLE Apartments (bathroom_count INTEGER)
What is the minimum and maximum number of bathrooms of all the apartments?
<s>[INST] Given the following SQL query and context: Query: SELECT MIN(bathroom_count), MAX(bathroom_count) FROM Apartments Context: CREATE TABLE Apartments (bathroom_count INTEGER) [/INST] Based on the provided SQL query and context, your question is: What is the minimum and maximum number of bathrooms of all the apartments? The answer to your question is: SELECT MIN(bathroom_count), MAX(bathroom_count) FROM Apartments. [/s>
SELECT AVG(bedroom_count) FROM Apartments
CREATE TABLE Apartments (bedroom_count INTEGER)
What is the average number of bedrooms of all apartments?
<s>[INST] Given the following SQL query and context: Query: SELECT AVG(bedroom_count) FROM Apartments Context: CREATE TABLE Apartments (bedroom_count INTEGER) [/INST] Based on the provided SQL query and context, your question is: What is the average number of bedrooms of all apartments? The answer to your question is: SELECT AVG(bedroom_count) FROM Apartments. [/s>
SELECT apt_number, room_count FROM Apartments
CREATE TABLE Apartments (apt_number VARCHAR, room_count VARCHAR)
Return the apartment number and the number of rooms for each apartment.
<s>[INST] Given the following SQL query and context: Query: SELECT apt_number, room_count FROM Apartments Context: CREATE TABLE Apartments (apt_number VARCHAR, room_count VARCHAR) [/INST] Based on the provided SQL query and context, your question is: Return the apartment number and the number of rooms for each apartment. The answer to your question is: SELECT apt_number, room_count FROM Apartments. [/s>
SELECT AVG(room_count) FROM Apartments WHERE apt_type_code = "Studio"
CREATE TABLE Apartments (room_count INTEGER, apt_type_code VARCHAR)
What is the average number of rooms of apartments with type code "Studio"?
<s>[INST] Given the following SQL query and context: Query: SELECT AVG(room_count) FROM Apartments WHERE apt_type_code = "Studio" Context: CREATE TABLE Apartments (room_count INTEGER, apt_type_code VARCHAR) [/INST] Based on the provided SQL query and context, your question is: What is the average number of rooms of apartments with type code "Studio"? The answer to your question is: SELECT AVG(room_count) FROM Apartments WHERE apt_type_code = "Studio". [/s>
SELECT apt_number FROM Apartments WHERE apt_type_code = "Flat"
CREATE TABLE Apartments (apt_number VARCHAR, apt_type_code VARCHAR)
Return the apartment numbers of the apartments with type code "Flat".
<s>[INST] Given the following SQL query and context: Query: SELECT apt_number FROM Apartments WHERE apt_type_code = "Flat" Context: CREATE TABLE Apartments (apt_number VARCHAR, apt_type_code VARCHAR) [/INST] Based on the provided SQL query and context, your question is: Return the apartment numbers of the apartments with type code "Flat". The answer to your question is: SELECT apt_number FROM Apartments WHERE apt_type_code = "Flat". [/s>
SELECT guest_first_name, guest_last_name FROM Guests
CREATE TABLE Guests (guest_first_name VARCHAR, guest_last_name VARCHAR)
Return the first names and last names of all guests
<s>[INST] Given the following SQL query and context: Query: SELECT guest_first_name, guest_last_name FROM Guests Context: CREATE TABLE Guests (guest_first_name VARCHAR, guest_last_name VARCHAR) [/INST] Based on the provided SQL query and context, your question is: Return the first names and last names of all guests The answer to your question is: SELECT guest_first_name, guest_last_name FROM Guests. [/s>
SELECT date_of_birth FROM Guests WHERE gender_code = "Male"
CREATE TABLE Guests (date_of_birth VARCHAR, gender_code VARCHAR)
Return the date of birth for all the guests with gender code "Male".
<s>[INST] Given the following SQL query and context: Query: SELECT date_of_birth FROM Guests WHERE gender_code = "Male" Context: CREATE TABLE Guests (date_of_birth VARCHAR, gender_code VARCHAR) [/INST] Based on the provided SQL query and context, your question is: Return the date of birth for all the guests with gender code "Male". The answer to your question is: SELECT date_of_birth FROM Guests WHERE gender_code = "Male". [/s>
SELECT T2.apt_number, T1.booking_start_date, T1.booking_start_date FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id
CREATE TABLE Apartment_Bookings (booking_start_date VARCHAR, apt_id VARCHAR); CREATE TABLE Apartments (apt_number VARCHAR, apt_id VARCHAR)
Show the apartment numbers, start dates, and end dates of all the apartment bookings.
<s>[INST] Given the following SQL query and context: Query: SELECT T2.apt_number, T1.booking_start_date, T1.booking_start_date FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id Context: CREATE TABLE Apartment_Bookings (booking_start_date VARCHAR, apt_id VARCHAR); CREATE TABLE Apartments (apt_number VARCHAR, apt_id VARCHAR) [/INST] Based on the provided SQL query and context, your question is: Show the apartment numbers, start dates, and end dates of all the apartment bookings. The answer to your question is: SELECT T2.apt_number, T1.booking_start_date, T1.booking_start_date FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id. [/s>
SELECT T1.booking_start_date, T1.booking_start_date FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T2.apt_type_code = "Duplex"
CREATE TABLE Apartments (apt_id VARCHAR, apt_type_code VARCHAR); CREATE TABLE Apartment_Bookings (booking_start_date VARCHAR, apt_id VARCHAR)
What are the booking start and end dates of the apartments with type code "Duplex"?
<s>[INST] Given the following SQL query and context: Query: SELECT T1.booking_start_date, T1.booking_start_date FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T2.apt_type_code = "Duplex" Context: CREATE TABLE Apartments (apt_id VARCHAR, apt_type_code VARCHAR); CREATE TABLE Apartment_Bookings (booking_start_date VARCHAR, apt_id VARCHAR) [/INST] Based on the provided SQL query and context, your question is: What are the booking start and end dates of the apartments with type code "Duplex"? The answer to your question is: SELECT T1.booking_start_date, T1.booking_start_date FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T2.apt_type_code = "Duplex". [/s>
SELECT T1.booking_start_date, T1.booking_start_date FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T2.bedroom_count > 2
CREATE TABLE Apartment_Bookings (booking_start_date VARCHAR, apt_id VARCHAR); CREATE TABLE Apartments (apt_id VARCHAR, bedroom_count INTEGER)
What are the booking start and end dates of the apartments with more than 2 bedrooms?
<s>[INST] Given the following SQL query and context: Query: SELECT T1.booking_start_date, T1.booking_start_date FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T2.bedroom_count > 2 Context: CREATE TABLE Apartment_Bookings (booking_start_date VARCHAR, apt_id VARCHAR); CREATE TABLE Apartments (apt_id VARCHAR, bedroom_count INTEGER) [/INST] Based on the provided SQL query and context, your question is: What are the booking start and end dates of the apartments with more than 2 bedrooms? The answer to your question is: SELECT T1.booking_start_date, T1.booking_start_date FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T2.bedroom_count > 2. [/s>
SELECT T1.booking_status_code FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T2.apt_number = "Suite 634"
CREATE TABLE Apartments (apt_id VARCHAR, apt_number VARCHAR); CREATE TABLE Apartment_Bookings (booking_status_code VARCHAR, apt_id VARCHAR)
What is the booking status code of the apartment with apartment number "Suite 634"?
<s>[INST] Given the following SQL query and context: Query: SELECT T1.booking_status_code FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T2.apt_number = "Suite 634" Context: CREATE TABLE Apartments (apt_id VARCHAR, apt_number VARCHAR); CREATE TABLE Apartment_Bookings (booking_status_code VARCHAR, apt_id VARCHAR) [/INST] Based on the provided SQL query and context, your question is: What is the booking status code of the apartment with apartment number "Suite 634"? The answer to your question is: SELECT T1.booking_status_code FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T2.apt_number = "Suite 634". [/s>
SELECT DISTINCT T2.apt_number FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T1.booking_status_code = "Confirmed"
CREATE TABLE Apartments (apt_number VARCHAR, apt_id VARCHAR); CREATE TABLE Apartment_Bookings (apt_id VARCHAR, booking_status_code VARCHAR)
Show the distinct apartment numbers of the apartments that have bookings with status code "Confirmed".
<s>[INST] Given the following SQL query and context: Query: SELECT DISTINCT T2.apt_number FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T1.booking_status_code = "Confirmed" Context: CREATE TABLE Apartments (apt_number VARCHAR, apt_id VARCHAR); CREATE TABLE Apartment_Bookings (apt_id VARCHAR, booking_status_code VARCHAR) [/INST] Based on the provided SQL query and context, your question is: Show the distinct apartment numbers of the apartments that have bookings with status code "Confirmed". The answer to your question is: SELECT DISTINCT T2.apt_number FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T1.booking_status_code = "Confirmed". [/s>
SELECT AVG(room_count) FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T1.booking_status_code = "Provisional"
CREATE TABLE Apartment_Bookings (apt_id VARCHAR, booking_status_code VARCHAR); CREATE TABLE Apartments (apt_id VARCHAR)
Show the average room count of the apartments that have booking status code "Provisional".
<s>[INST] Given the following SQL query and context: Query: SELECT AVG(room_count) FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T1.booking_status_code = "Provisional" Context: CREATE TABLE Apartment_Bookings (apt_id VARCHAR, booking_status_code VARCHAR); CREATE TABLE Apartments (apt_id VARCHAR) [/INST] Based on the provided SQL query and context, your question is: Show the average room count of the apartments that have booking status code "Provisional". The answer to your question is: SELECT AVG(room_count) FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T1.booking_status_code = "Provisional". [/s>
SELECT T2.guest_first_name, T1.booking_start_date, T1.booking_start_date FROM Apartment_Bookings AS T1 JOIN Guests AS T2 ON T1.guest_id = T2.guest_id
CREATE TABLE Apartment_Bookings (booking_start_date VARCHAR, guest_id VARCHAR); CREATE TABLE Guests (guest_first_name VARCHAR, guest_id VARCHAR)
Show the guest first names, start dates, and end dates of all the apartment bookings.
<s>[INST] Given the following SQL query and context: Query: SELECT T2.guest_first_name, T1.booking_start_date, T1.booking_start_date FROM Apartment_Bookings AS T1 JOIN Guests AS T2 ON T1.guest_id = T2.guest_id Context: CREATE TABLE Apartment_Bookings (booking_start_date VARCHAR, guest_id VARCHAR); CREATE TABLE Guests (guest_first_name VARCHAR, guest_id VARCHAR) [/INST] Based on the provided SQL query and context, your question is: Show the guest first names, start dates, and end dates of all the apartment bookings. The answer to your question is: SELECT T2.guest_first_name, T1.booking_start_date, T1.booking_start_date FROM Apartment_Bookings AS T1 JOIN Guests AS T2 ON T1.guest_id = T2.guest_id. [/s>