answer
stringlengths
18
557
context
stringlengths
27
489
question
stringlengths
12
244
text
stringlengths
275
1.7k
SELECT tourney_name FROM matches GROUP BY tourney_name HAVING COUNT(*) > 10
CREATE TABLE matches (tourney_name VARCHAR)
Find the name of tourney that has more than 10 matches.
<s>[INST] Given the following SQL query and context: Query: SELECT tourney_name FROM matches GROUP BY tourney_name HAVING COUNT(*) > 10 Context: CREATE TABLE matches (tourney_name VARCHAR) [/INST] Based on the provided SQL query and context, your question is: Find the name of tourney that has more than 10 matches. The ...
SELECT winner_name FROM matches WHERE YEAR = 2013 INTERSECT SELECT winner_name FROM matches WHERE YEAR = 2016
CREATE TABLE matches (winner_name VARCHAR, YEAR VARCHAR)
List the names of all winners who played in both 2013 and 2016.
<s>[INST] Given the following SQL query and context: Query: SELECT winner_name FROM matches WHERE YEAR = 2013 INTERSECT SELECT winner_name FROM matches WHERE YEAR = 2016 Context: CREATE TABLE matches (winner_name VARCHAR, YEAR VARCHAR) [/INST] Based on the provided SQL query and context, your question is: List the name...
SELECT COUNT(*) FROM matches WHERE YEAR = 2013 OR YEAR = 2016
CREATE TABLE matches (YEAR VARCHAR)
List the number of all matches who played in years of 2013 or 2016.
<s>[INST] Given the following SQL query and context: Query: SELECT COUNT(*) FROM matches WHERE YEAR = 2013 OR YEAR = 2016 Context: CREATE TABLE matches (YEAR VARCHAR) [/INST] Based on the provided SQL query and context, your question is: List the number of all matches who played in years of 2013 or 2016. The answer to ...
SELECT T1.country_code, T1.first_name FROM players AS T1 JOIN matches AS T2 ON T1.player_id = T2.winner_id WHERE T2.tourney_name = 'WTA Championships' INTERSECT SELECT T1.country_code, T1.first_name FROM players AS T1 JOIN matches AS T2 ON T1.player_id = T2.winner_id WHERE T2.tourney_name = 'Australian Open'
CREATE TABLE matches (winner_id VARCHAR, tourney_name VARCHAR); CREATE TABLE players (country_code VARCHAR, first_name VARCHAR, player_id VARCHAR)
What are the country code and first name of the players who won in both tourney WTA Championships and Australian Open?
<s>[INST] Given the following SQL query and context: Query: SELECT T1.country_code, T1.first_name FROM players AS T1 JOIN matches AS T2 ON T1.player_id = T2.winner_id WHERE T2.tourney_name = 'WTA Championships' INTERSECT SELECT T1.country_code, T1.first_name FROM players AS T1 JOIN matches AS T2 ON T1.player_id = T2.wi...
SELECT first_name, country_code FROM players ORDER BY birth_date LIMIT 1
CREATE TABLE players (first_name VARCHAR, country_code VARCHAR, birth_date VARCHAR)
Find the first name and country code of the oldest player.
<s>[INST] Given the following SQL query and context: Query: SELECT first_name, country_code FROM players ORDER BY birth_date LIMIT 1 Context: CREATE TABLE players (first_name VARCHAR, country_code VARCHAR, birth_date VARCHAR) [/INST] Based on the provided SQL query and context, your question is: Find the first name and...
SELECT first_name, last_name FROM players ORDER BY birth_date
CREATE TABLE players (first_name VARCHAR, last_name VARCHAR, birth_date VARCHAR)
List the first and last name of all players in the order of birth date.
<s>[INST] Given the following SQL query and context: Query: SELECT first_name, last_name FROM players ORDER BY birth_date Context: CREATE TABLE players (first_name VARCHAR, last_name VARCHAR, birth_date VARCHAR) [/INST] Based on the provided SQL query and context, your question is: List the first and last name of all p...
SELECT first_name, last_name FROM players WHERE hand = 'L' ORDER BY birth_date
CREATE TABLE players (first_name VARCHAR, last_name VARCHAR, hand VARCHAR, birth_date VARCHAR)
List the first and last name of all players who are left / L hand in the order of birth date.
<s>[INST] Given the following SQL query and context: Query: SELECT first_name, last_name FROM players WHERE hand = 'L' ORDER BY birth_date Context: CREATE TABLE players (first_name VARCHAR, last_name VARCHAR, hand VARCHAR, birth_date VARCHAR) [/INST] Based on the provided SQL query and context, your question is: List t...
SELECT T1.country_code, T1.first_name FROM players AS T1 JOIN rankings AS T2 ON T1.player_id = T2.player_id ORDER BY T2.tours DESC LIMIT 1
CREATE TABLE players (country_code VARCHAR, first_name VARCHAR, player_id VARCHAR); CREATE TABLE rankings (player_id VARCHAR, tours VARCHAR)
Find the first name and country code of the player who did the most number of tours.
<s>[INST] Given the following SQL query and context: Query: SELECT T1.country_code, T1.first_name FROM players AS T1 JOIN rankings AS T2 ON T1.player_id = T2.player_id ORDER BY T2.tours DESC LIMIT 1 Context: CREATE TABLE players (country_code VARCHAR, first_name VARCHAR, player_id VARCHAR); CREATE TABLE rankings (playe...
SELECT YEAR FROM matches GROUP BY YEAR ORDER BY COUNT(*) DESC LIMIT 1
CREATE TABLE matches (YEAR VARCHAR)
Find the year that has the most number of matches.
<s>[INST] Given the following SQL query and context: Query: SELECT YEAR FROM matches GROUP BY YEAR ORDER BY COUNT(*) DESC LIMIT 1 Context: CREATE TABLE matches (YEAR VARCHAR) [/INST] Based on the provided SQL query and context, your question is: Find the year that has the most number of matches. The answer to your ques...
SELECT winner_name, winner_rank_points FROM matches GROUP BY winner_name ORDER BY COUNT(*) DESC LIMIT 1
CREATE TABLE matches (winner_name VARCHAR, winner_rank_points VARCHAR)
Find the name and rank points of the winner who won the most times.
<s>[INST] Given the following SQL query and context: Query: SELECT winner_name, winner_rank_points FROM matches GROUP BY winner_name ORDER BY COUNT(*) DESC LIMIT 1 Context: CREATE TABLE matches (winner_name VARCHAR, winner_rank_points VARCHAR) [/INST] Based on the provided SQL query and context, your question is: Find ...
SELECT winner_name FROM matches WHERE tourney_name = 'Australian Open' ORDER BY winner_rank_points DESC LIMIT 1
CREATE TABLE matches (winner_name VARCHAR, tourney_name VARCHAR, winner_rank_points VARCHAR)
Find the name of the winner who has the highest rank points and participated in the Australian Open tourney.
<s>[INST] Given the following SQL query and context: Query: SELECT winner_name FROM matches WHERE tourney_name = 'Australian Open' ORDER BY winner_rank_points DESC LIMIT 1 Context: CREATE TABLE matches (winner_name VARCHAR, tourney_name VARCHAR, winner_rank_points VARCHAR) [/INST] Based on the provided SQL query and co...
SELECT winner_name, loser_name FROM matches ORDER BY minutes DESC LIMIT 1
CREATE TABLE matches (winner_name VARCHAR, loser_name VARCHAR, minutes VARCHAR)
find the names of loser and winner who played in the match with greatest number of minutes.
<s>[INST] Given the following SQL query and context: Query: SELECT winner_name, loser_name FROM matches ORDER BY minutes DESC LIMIT 1 Context: CREATE TABLE matches (winner_name VARCHAR, loser_name VARCHAR, minutes VARCHAR) [/INST] Based on the provided SQL query and context, your question is: find the names of loser an...
SELECT AVG(ranking), T1.first_name FROM players AS T1 JOIN rankings AS T2 ON T1.player_id = T2.player_id GROUP BY T1.first_name
CREATE TABLE players (first_name VARCHAR, player_id VARCHAR); CREATE TABLE rankings (player_id VARCHAR)
Find the average ranking for each player and their first name.
<s>[INST] Given the following SQL query and context: Query: SELECT AVG(ranking), T1.first_name FROM players AS T1 JOIN rankings AS T2 ON T1.player_id = T2.player_id GROUP BY T1.first_name Context: CREATE TABLE players (first_name VARCHAR, player_id VARCHAR); CREATE TABLE rankings (player_id VARCHAR) [/INST] Based on th...
SELECT SUM(ranking_points), T1.first_name FROM players AS T1 JOIN rankings AS T2 ON T1.player_id = T2.player_id GROUP BY T1.first_name
CREATE TABLE players (first_name VARCHAR, player_id VARCHAR); CREATE TABLE rankings (player_id VARCHAR)
Find the total ranking points for each player and their first name.
<s>[INST] Given the following SQL query and context: Query: SELECT SUM(ranking_points), T1.first_name FROM players AS T1 JOIN rankings AS T2 ON T1.player_id = T2.player_id GROUP BY T1.first_name Context: CREATE TABLE players (first_name VARCHAR, player_id VARCHAR); CREATE TABLE rankings (player_id VARCHAR) [/INST] Base...
SELECT COUNT(*), country_code FROM players GROUP BY country_code
CREATE TABLE players (country_code VARCHAR)
find the number of players for each country.
<s>[INST] Given the following SQL query and context: Query: SELECT COUNT(*), country_code FROM players GROUP BY country_code Context: CREATE TABLE players (country_code VARCHAR) [/INST] Based on the provided SQL query and context, your question is: find the number of players for each country. The answer to your questio...
SELECT country_code FROM players GROUP BY country_code ORDER BY COUNT(*) DESC LIMIT 1
CREATE TABLE players (country_code VARCHAR)
find the code of the country where has the greatest number of players.
<s>[INST] Given the following SQL query and context: Query: SELECT country_code FROM players GROUP BY country_code ORDER BY COUNT(*) DESC LIMIT 1 Context: CREATE TABLE players (country_code VARCHAR) [/INST] Based on the provided SQL query and context, your question is: find the code of the country where has the greates...
SELECT country_code FROM players GROUP BY country_code HAVING COUNT(*) > 50
CREATE TABLE players (country_code VARCHAR)
Find the codes of countries that have more than 50 players.
<s>[INST] Given the following SQL query and context: Query: SELECT country_code FROM players GROUP BY country_code HAVING COUNT(*) > 50 Context: CREATE TABLE players (country_code VARCHAR) [/INST] Based on the provided SQL query and context, your question is: Find the codes of countries that have more than 50 players. ...
SELECT SUM(tours), ranking_date FROM rankings GROUP BY ranking_date
CREATE TABLE rankings (ranking_date VARCHAR, tours INTEGER)
Find the total number of tours for each ranking date.
<s>[INST] Given the following SQL query and context: Query: SELECT SUM(tours), ranking_date FROM rankings GROUP BY ranking_date Context: CREATE TABLE rankings (ranking_date VARCHAR, tours INTEGER) [/INST] Based on the provided SQL query and context, your question is: Find the total number of tours for each ranking date...
SELECT COUNT(*), YEAR FROM matches GROUP BY YEAR
CREATE TABLE matches (YEAR VARCHAR)
Find the number of matches happened in each year.
<s>[INST] Given the following SQL query and context: Query: SELECT COUNT(*), YEAR FROM matches GROUP BY YEAR Context: CREATE TABLE matches (YEAR VARCHAR) [/INST] Based on the provided SQL query and context, your question is: Find the number of matches happened in each year. The answer to your question is: SELECT COUNT(...
SELECT DISTINCT winner_name, winner_rank FROM matches ORDER BY winner_age LIMIT 3
CREATE TABLE matches (winner_name VARCHAR, winner_rank VARCHAR, winner_age VARCHAR)
Find the name and rank of the 3 youngest winners across all matches.
<s>[INST] Given the following SQL query and context: Query: SELECT DISTINCT winner_name, winner_rank FROM matches ORDER BY winner_age LIMIT 3 Context: CREATE TABLE matches (winner_name VARCHAR, winner_rank VARCHAR, winner_age VARCHAR) [/INST] Based on the provided SQL query and context, your question is: Find the name ...
SELECT COUNT(DISTINCT winner_name) FROM matches WHERE tourney_name = 'WTA Championships' AND winner_hand = 'L'
CREATE TABLE matches (winner_name VARCHAR, tourney_name VARCHAR, winner_hand VARCHAR)
How many different winners both participated in the WTA Championships and were left handed?
<s>[INST] Given the following SQL query and context: Query: SELECT COUNT(DISTINCT winner_name) FROM matches WHERE tourney_name = 'WTA Championships' AND winner_hand = 'L' Context: CREATE TABLE matches (winner_name VARCHAR, tourney_name VARCHAR, winner_hand VARCHAR) [/INST] Based on the provided SQL query and context, y...
SELECT T1.first_name, T1.country_code, T1.birth_date FROM players AS T1 JOIN matches AS T2 ON T1.player_id = T2.winner_id ORDER BY T2.winner_rank_points DESC LIMIT 1
CREATE TABLE players (first_name VARCHAR, country_code VARCHAR, birth_date VARCHAR, player_id VARCHAR); CREATE TABLE matches (winner_id VARCHAR, winner_rank_points VARCHAR)
Find the first name, country code and birth date of the winner who has the highest rank points in all matches.
<s>[INST] Given the following SQL query and context: Query: SELECT T1.first_name, T1.country_code, T1.birth_date FROM players AS T1 JOIN matches AS T2 ON T1.player_id = T2.winner_id ORDER BY T2.winner_rank_points DESC LIMIT 1 Context: CREATE TABLE players (first_name VARCHAR, country_code VARCHAR, birth_date VARCHAR, p...
SELECT COUNT(*), hand FROM players GROUP BY hand
CREATE TABLE players (hand VARCHAR)
Find the number of players for each hand type.
<s>[INST] Given the following SQL query and context: Query: SELECT COUNT(*), hand FROM players GROUP BY hand Context: CREATE TABLE players (hand VARCHAR) [/INST] Based on the provided SQL query and context, your question is: Find the number of players for each hand type. The answer to your question is: SELECT COUNT(*),...
SELECT COUNT(*) FROM ship WHERE disposition_of_ship = 'Captured'
CREATE TABLE ship (disposition_of_ship VARCHAR)
How many ships ended up being 'Captured'?
<s>[INST] Given the following SQL query and context: Query: SELECT COUNT(*) FROM ship WHERE disposition_of_ship = 'Captured' Context: CREATE TABLE ship (disposition_of_ship VARCHAR) [/INST] Based on the provided SQL query and context, your question is: How many ships ended up being 'Captured'? The answer to your questi...
SELECT name, tonnage FROM ship ORDER BY name DESC
CREATE TABLE ship (name VARCHAR, tonnage VARCHAR)
List the name and tonnage ordered by in descending alphaetical order for the names.
<s>[INST] Given the following SQL query and context: Query: SELECT name, tonnage FROM ship ORDER BY name DESC Context: CREATE TABLE ship (name VARCHAR, tonnage VARCHAR) [/INST] Based on the provided SQL query and context, your question is: List the name and tonnage ordered by in descending alphaetical order for the nam...
SELECT name, date FROM battle
CREATE TABLE battle (name VARCHAR, date VARCHAR)
List the name, date and result of each battle.
<s>[INST] Given the following SQL query and context: Query: SELECT name, date FROM battle Context: CREATE TABLE battle (name VARCHAR, date VARCHAR) [/INST] Based on the provided SQL query and context, your question is: List the name, date and result of each battle. The answer to your question is: SELECT name, date FROM...
SELECT MAX(killed), MIN(killed) FROM death
CREATE TABLE death (killed INTEGER)
What is maximum and minimum death toll caused each time?
<s>[INST] Given the following SQL query and context: Query: SELECT MAX(killed), MIN(killed) FROM death Context: CREATE TABLE death (killed INTEGER) [/INST] Based on the provided SQL query and context, your question is: What is maximum and minimum death toll caused each time? The answer to your question is: SELECT MAX(k...
SELECT AVG(injured) FROM death
CREATE TABLE death (injured INTEGER)
What is the average number of injuries caused each time?
<s>[INST] Given the following SQL query and context: Query: SELECT AVG(injured) FROM death Context: CREATE TABLE death (injured INTEGER) [/INST] Based on the provided SQL query and context, your question is: What is the average number of injuries caused each time? The answer to your question is: SELECT AVG(injured) FRO...
SELECT T1.killed, T1.injured FROM death AS T1 JOIN ship AS t2 ON T1.caused_by_ship_id = T2.id WHERE T2.tonnage = 't'
CREATE TABLE ship (Id VARCHAR); CREATE TABLE death (killed VARCHAR, injured VARCHAR, caused_by_ship_id VARCHAR)
What are the death and injury situations caused by the ship with tonnage 't'?
<s>[INST] Given the following SQL query and context: Query: SELECT T1.killed, T1.injured FROM death AS T1 JOIN ship AS t2 ON T1.caused_by_ship_id = T2.id WHERE T2.tonnage = 't' Context: CREATE TABLE ship (Id VARCHAR); CREATE TABLE death (killed VARCHAR, injured VARCHAR, caused_by_ship_id VARCHAR) [/INST] Based on the p...
SELECT name, RESULT FROM battle WHERE bulgarian_commander <> 'Boril'
CREATE TABLE battle (name VARCHAR, RESULT VARCHAR, bulgarian_commander VARCHAR)
What are the name and results of the battles when the bulgarian commander is not 'Boril'
<s>[INST] Given the following SQL query and context: Query: SELECT name, RESULT FROM battle WHERE bulgarian_commander <> 'Boril' Context: CREATE TABLE battle (name VARCHAR, RESULT VARCHAR, bulgarian_commander VARCHAR) [/INST] Based on the provided SQL query and context, your question is: What are the name and results o...
SELECT DISTINCT T1.id, T1.name FROM battle AS T1 JOIN ship AS T2 ON T1.id = T2.lost_in_battle WHERE T2.ship_type = 'Brig'
CREATE TABLE ship (lost_in_battle VARCHAR, ship_type VARCHAR); CREATE TABLE battle (id VARCHAR, name VARCHAR)
What are the different ids and names of the battles that lost any 'Brig' type shipes?
<s>[INST] Given the following SQL query and context: Query: SELECT DISTINCT T1.id, T1.name FROM battle AS T1 JOIN ship AS T2 ON T1.id = T2.lost_in_battle WHERE T2.ship_type = 'Brig' Context: CREATE TABLE ship (lost_in_battle VARCHAR, ship_type VARCHAR); CREATE TABLE battle (id VARCHAR, name VARCHAR) [/INST] Based on th...
SELECT T1.id, T1.name FROM battle AS T1 JOIN ship AS T2 ON T1.id = T2.lost_in_battle JOIN death AS T3 ON T2.id = T3.caused_by_ship_id GROUP BY T1.id HAVING SUM(T3.killed) > 10
CREATE TABLE death (caused_by_ship_id VARCHAR, killed INTEGER); CREATE TABLE battle (id VARCHAR, name VARCHAR); CREATE TABLE ship (lost_in_battle VARCHAR, id VARCHAR)
What are the ids and names of the battles that led to more than 10 people killed in total.
<s>[INST] Given the following SQL query and context: Query: SELECT T1.id, T1.name FROM battle AS T1 JOIN ship AS T2 ON T1.id = T2.lost_in_battle JOIN death AS T3 ON T2.id = T3.caused_by_ship_id GROUP BY T1.id HAVING SUM(T3.killed) > 10 Context: CREATE TABLE death (caused_by_ship_id VARCHAR, killed INTEGER); CREATE TABL...
SELECT T2.id, T2.name FROM death AS T1 JOIN ship AS t2 ON T1.caused_by_ship_id = T2.id GROUP BY T2.id ORDER BY COUNT(*) DESC LIMIT 1
CREATE TABLE death (caused_by_ship_id VARCHAR); CREATE TABLE ship (Id VARCHAR)
What is the ship id and name that caused most total injuries?
<s>[INST] Given the following SQL query and context: Query: SELECT T2.id, T2.name FROM death AS T1 JOIN ship AS t2 ON T1.caused_by_ship_id = T2.id GROUP BY T2.id ORDER BY COUNT(*) DESC LIMIT 1 Context: CREATE TABLE death (caused_by_ship_id VARCHAR); CREATE TABLE ship (Id VARCHAR) [/INST] Based on the provided SQL query...
SELECT name FROM battle WHERE bulgarian_commander = 'Kaloyan' AND latin_commander = 'Baldwin I'
CREATE TABLE battle (name VARCHAR, bulgarian_commander VARCHAR, latin_commander VARCHAR)
What are the distinct battle names which are between bulgarian commander 'Kaloyan' and latin commander 'Baldwin I'?
<s>[INST] Given the following SQL query and context: Query: SELECT name FROM battle WHERE bulgarian_commander = 'Kaloyan' AND latin_commander = 'Baldwin I' Context: CREATE TABLE battle (name VARCHAR, bulgarian_commander VARCHAR, latin_commander VARCHAR) [/INST] Based on the provided SQL query and context, your question...
SELECT COUNT(DISTINCT RESULT) FROM battle
CREATE TABLE battle (RESULT VARCHAR)
How many different results are there for the battles?
<s>[INST] Given the following SQL query and context: Query: SELECT COUNT(DISTINCT RESULT) FROM battle Context: CREATE TABLE battle (RESULT VARCHAR) [/INST] Based on the provided SQL query and context, your question is: How many different results are there for the battles? The answer to your question is: SELECT COUNT(DI...
SELECT COUNT(*) FROM battle WHERE NOT id IN (SELECT lost_in_battle FROM ship WHERE tonnage = '225')
CREATE TABLE ship (id VARCHAR, lost_in_battle VARCHAR, tonnage VARCHAR); CREATE TABLE battle (id VARCHAR, lost_in_battle VARCHAR, tonnage VARCHAR)
How many battles did not lose any ship with tonnage '225'?
<s>[INST] Given the following SQL query and context: Query: SELECT COUNT(*) FROM battle WHERE NOT id IN (SELECT lost_in_battle FROM ship WHERE tonnage = '225') Context: CREATE TABLE ship (id VARCHAR, lost_in_battle VARCHAR, tonnage VARCHAR); CREATE TABLE battle (id VARCHAR, lost_in_battle VARCHAR, tonnage VARCHAR) [/IN...
SELECT T1.name, T1.date FROM battle AS T1 JOIN ship AS T2 ON T1.id = T2.lost_in_battle WHERE T2.name = 'Lettice' INTERSECT SELECT T1.name, T1.date FROM battle AS T1 JOIN ship AS T2 ON T1.id = T2.lost_in_battle WHERE T2.name = 'HMS Atalanta'
CREATE TABLE ship (lost_in_battle VARCHAR, name VARCHAR); CREATE TABLE battle (name VARCHAR, date VARCHAR, id VARCHAR)
List the name and date the battle that has lost the ship named 'Lettice' and the ship named 'HMS Atalanta'
<s>[INST] Given the following SQL query and context: Query: SELECT T1.name, T1.date FROM battle AS T1 JOIN ship AS T2 ON T1.id = T2.lost_in_battle WHERE T2.name = 'Lettice' INTERSECT SELECT T1.name, T1.date FROM battle AS T1 JOIN ship AS T2 ON T1.id = T2.lost_in_battle WHERE T2.name = 'HMS Atalanta' Context: CREATE TAB...
SELECT name, RESULT, bulgarian_commander FROM battle EXCEPT SELECT T1.name, T1.result, T1.bulgarian_commander FROM battle AS T1 JOIN ship AS T2 ON T1.id = T2.lost_in_battle WHERE T2.location = 'English Channel'
CREATE TABLE ship (lost_in_battle VARCHAR, location VARCHAR); CREATE TABLE battle (name VARCHAR, RESULT VARCHAR, bulgarian_commander VARCHAR); CREATE TABLE battle (name VARCHAR, result VARCHAR, bulgarian_commander VARCHAR, id VARCHAR)
Show names, results and bulgarian commanders of the battles with no ships lost in the 'English Channel'.
<s>[INST] Given the following SQL query and context: Query: SELECT name, RESULT, bulgarian_commander FROM battle EXCEPT SELECT T1.name, T1.result, T1.bulgarian_commander FROM battle AS T1 JOIN ship AS T2 ON T1.id = T2.lost_in_battle WHERE T2.location = 'English Channel' Context: CREATE TABLE ship (lost_in_battle VARCHA...
SELECT note FROM death WHERE note LIKE '%East%'
CREATE TABLE death (note VARCHAR)
What are the notes of the death events which has substring 'East'?
<s>[INST] Given the following SQL query and context: Query: SELECT note FROM death WHERE note LIKE '%East%' Context: CREATE TABLE death (note VARCHAR) [/INST] Based on the provided SQL query and context, your question is: What are the notes of the death events which has substring 'East'? The answer to your question is:...
SELECT line_1, line_2 FROM addresses
CREATE TABLE addresses (line_1 VARCHAR, line_2 VARCHAR)
what are all the addresses including line 1 and line 2?
<s>[INST] Given the following SQL query and context: Query: SELECT line_1, line_2 FROM addresses Context: CREATE TABLE addresses (line_1 VARCHAR, line_2 VARCHAR) [/INST] Based on the provided SQL query and context, your question is: what are all the addresses including line 1 and line 2? The answer to your question is:...
SELECT COUNT(*) FROM Courses
CREATE TABLE Courses (Id VARCHAR)
How many courses in total are listed?
<s>[INST] Given the following SQL query and context: Query: SELECT COUNT(*) FROM Courses Context: CREATE TABLE Courses (Id VARCHAR) [/INST] Based on the provided SQL query and context, your question is: How many courses in total are listed? The answer to your question is: SELECT COUNT(*) FROM Courses. [/s>
SELECT course_description FROM Courses WHERE course_name = 'math'
CREATE TABLE Courses (course_description VARCHAR, course_name VARCHAR)
How is the math course described?
<s>[INST] Given the following SQL query and context: Query: SELECT course_description FROM Courses WHERE course_name = 'math' Context: CREATE TABLE Courses (course_description VARCHAR, course_name VARCHAR) [/INST] Based on the provided SQL query and context, your question is: How is the math course described? The answe...
SELECT zip_postcode FROM Addresses WHERE city = 'Port Chelsea'
CREATE TABLE Addresses (zip_postcode VARCHAR, city VARCHAR)
What is the zip code of the address in the city Port Chelsea?
<s>[INST] Given the following SQL query and context: Query: SELECT zip_postcode FROM Addresses WHERE city = 'Port Chelsea' Context: CREATE TABLE Addresses (zip_postcode VARCHAR, city VARCHAR) [/INST] Based on the provided SQL query and context, your question is: What is the zip code of the address in the city Port Chel...
SELECT T2.department_name, T1.department_id FROM Degree_Programs AS T1 JOIN Departments AS T2 ON T1.department_id = T2.department_id GROUP BY T1.department_id ORDER BY COUNT(*) DESC LIMIT 1
CREATE TABLE Degree_Programs (department_id VARCHAR); CREATE TABLE Departments (department_name VARCHAR, department_id VARCHAR)
Which department offers the most number of degrees? List department name and id.
<s>[INST] Given the following SQL query and context: Query: SELECT T2.department_name, T1.department_id FROM Degree_Programs AS T1 JOIN Departments AS T2 ON T1.department_id = T2.department_id GROUP BY T1.department_id ORDER BY COUNT(*) DESC LIMIT 1 Context: CREATE TABLE Degree_Programs (department_id VARCHAR); CREATE ...
SELECT t2.department_name, t1.department_id FROM degree_programs AS t1 JOIN departments AS t2 ON t1.department_id = t2.department_id GROUP BY t1.department_id ORDER BY COUNT(*) DESC LIMIT 1
CREATE TABLE degree_programs (department_id VARCHAR); CREATE TABLE departments (department_name VARCHAR, department_id VARCHAR)
What is the name and id of the department with the most number of degrees ?
<s>[INST] Given the following SQL query and context: Query: SELECT t2.department_name, t1.department_id FROM degree_programs AS t1 JOIN departments AS t2 ON t1.department_id = t2.department_id GROUP BY t1.department_id ORDER BY COUNT(*) DESC LIMIT 1 Context: CREATE TABLE degree_programs (department_id VARCHAR); CREATE ...
SELECT COUNT(DISTINCT department_id) FROM Degree_Programs
CREATE TABLE Degree_Programs (department_id VARCHAR)
How many departments offer any degree?
<s>[INST] Given the following SQL query and context: Query: SELECT COUNT(DISTINCT department_id) FROM Degree_Programs Context: CREATE TABLE Degree_Programs (department_id VARCHAR) [/INST] Based on the provided SQL query and context, your question is: How many departments offer any degree? The answer to your question is...
SELECT COUNT(DISTINCT degree_summary_name) FROM Degree_Programs
CREATE TABLE Degree_Programs (degree_summary_name VARCHAR)
How many different degree names are offered?
<s>[INST] Given the following SQL query and context: Query: SELECT COUNT(DISTINCT degree_summary_name) FROM Degree_Programs Context: CREATE TABLE Degree_Programs (degree_summary_name VARCHAR) [/INST] Based on the provided SQL query and context, your question is: How many different degree names are offered? The answer t...
SELECT COUNT(*) FROM Departments AS T1 JOIN Degree_Programs AS T2 ON T1.department_id = T2.department_id WHERE T1.department_name = 'engineer'
CREATE TABLE Degree_Programs (department_id VARCHAR); CREATE TABLE Departments (department_id VARCHAR, department_name VARCHAR)
How many degrees does the engineering department offer?
<s>[INST] Given the following SQL query and context: Query: SELECT COUNT(*) FROM Departments AS T1 JOIN Degree_Programs AS T2 ON T1.department_id = T2.department_id WHERE T1.department_name = 'engineer' Context: CREATE TABLE Degree_Programs (department_id VARCHAR); CREATE TABLE Departments (department_id VARCHAR, depar...
SELECT section_name, section_description FROM Sections
CREATE TABLE Sections (section_name VARCHAR, section_description VARCHAR)
What are the names and descriptions of all the sections?
<s>[INST] Given the following SQL query and context: Query: SELECT section_name, section_description FROM Sections Context: CREATE TABLE Sections (section_name VARCHAR, section_description VARCHAR) [/INST] Based on the provided SQL query and context, your question is: What are the names and descriptions of all the sect...
SELECT T1.course_name, T1.course_id FROM Courses AS T1 JOIN Sections AS T2 ON T1.course_id = T2.course_id GROUP BY T1.course_id HAVING COUNT(*) <= 2
CREATE TABLE Courses (course_name VARCHAR, course_id VARCHAR); CREATE TABLE Sections (course_id VARCHAR)
What are the names and id of courses having at most 2 sections?
<s>[INST] Given the following SQL query and context: Query: SELECT T1.course_name, T1.course_id FROM Courses AS T1 JOIN Sections AS T2 ON T1.course_id = T2.course_id GROUP BY T1.course_id HAVING COUNT(*) <= 2 Context: CREATE TABLE Courses (course_name VARCHAR, course_id VARCHAR); CREATE TABLE Sections (course_id VARCHA...
SELECT section_name FROM Sections ORDER BY section_name DESC
CREATE TABLE Sections (section_name VARCHAR)
List the section_name in reversed lexicographical order.
<s>[INST] Given the following SQL query and context: Query: SELECT section_name FROM Sections ORDER BY section_name DESC Context: CREATE TABLE Sections (section_name VARCHAR) [/INST] Based on the provided SQL query and context, your question is: List the section_name in reversed lexicographical order. The answer to you...
SELECT T1.semester_name, T1.semester_id FROM Semesters AS T1 JOIN Student_Enrolment AS T2 ON T1.semester_id = T2.semester_id GROUP BY T1.semester_id ORDER BY COUNT(*) DESC LIMIT 1
CREATE TABLE Student_Enrolment (semester_id VARCHAR); CREATE TABLE Semesters (semester_name VARCHAR, semester_id VARCHAR)
What is the semester which most student registered in? Show both the name and the id.
<s>[INST] Given the following SQL query and context: Query: SELECT T1.semester_name, T1.semester_id FROM Semesters AS T1 JOIN Student_Enrolment AS T2 ON T1.semester_id = T2.semester_id GROUP BY T1.semester_id ORDER BY COUNT(*) DESC LIMIT 1 Context: CREATE TABLE Student_Enrolment (semester_id VARCHAR); CREATE TABLE Seme...
SELECT department_description FROM Departments WHERE department_name LIKE '%computer%'
CREATE TABLE Departments (department_description VARCHAR, department_name VARCHAR)
What is the description of the department whose name has the substring the computer?
<s>[INST] Given the following SQL query and context: Query: SELECT department_description FROM Departments WHERE department_name LIKE '%computer%' Context: CREATE TABLE Departments (department_description VARCHAR, department_name VARCHAR) [/INST] Based on the provided SQL query and context, your question is: What is th...
SELECT T1.first_name, T1.middle_name, T1.last_name, T1.student_id FROM Students AS T1 JOIN Student_Enrolment AS T2 ON T1.student_id = T2.student_id GROUP BY T1.student_id HAVING COUNT(*) = 2
CREATE TABLE Students (first_name VARCHAR, middle_name VARCHAR, last_name VARCHAR, student_id VARCHAR); CREATE TABLE Student_Enrolment (student_id VARCHAR)
Who are enrolled in 2 degree programs in one semester? List the first name, middle name and last name and the id.
<s>[INST] Given the following SQL query and context: Query: SELECT T1.first_name, T1.middle_name, T1.last_name, T1.student_id FROM Students AS T1 JOIN Student_Enrolment AS T2 ON T1.student_id = T2.student_id GROUP BY T1.student_id HAVING COUNT(*) = 2 Context: CREATE TABLE Students (first_name VARCHAR, middle_name VARCH...
SELECT DISTINCT T1.first_name, T1.middle_name, T1.last_name FROM Students AS T1 JOIN Student_Enrolment AS T2 ON T1.student_id = T2.student_id JOIN Degree_Programs AS T3 ON T2.degree_program_id = T3.degree_program_id WHERE T3.degree_summary_name = 'Bachelor'
CREATE TABLE Degree_Programs (degree_program_id VARCHAR, degree_summary_name VARCHAR); CREATE TABLE Students (first_name VARCHAR, middle_name VARCHAR, last_name VARCHAR, student_id VARCHAR); CREATE TABLE Student_Enrolment (student_id VARCHAR, degree_program_id VARCHAR)
Who is enrolled in a Bachelor degree program? List the first name, middle name, last name.
<s>[INST] Given the following SQL query and context: Query: SELECT DISTINCT T1.first_name, T1.middle_name, T1.last_name FROM Students AS T1 JOIN Student_Enrolment AS T2 ON T1.student_id = T2.student_id JOIN Degree_Programs AS T3 ON T2.degree_program_id = T3.degree_program_id WHERE T3.degree_summary_name = 'Bachelor' Co...
SELECT T1.degree_summary_name FROM Degree_Programs AS T1 JOIN Student_Enrolment AS T2 ON T1.degree_program_id = T2.degree_program_id GROUP BY T1.degree_summary_name ORDER BY COUNT(*) DESC LIMIT 1
CREATE TABLE Student_Enrolment (degree_program_id VARCHAR); CREATE TABLE Degree_Programs (degree_summary_name VARCHAR, degree_program_id VARCHAR)
Find the kind of program which most number of students are enrolled in?
<s>[INST] Given the following SQL query and context: Query: SELECT T1.degree_summary_name FROM Degree_Programs AS T1 JOIN Student_Enrolment AS T2 ON T1.degree_program_id = T2.degree_program_id GROUP BY T1.degree_summary_name ORDER BY COUNT(*) DESC LIMIT 1 Context: CREATE TABLE Student_Enrolment (degree_program_id VARCH...
SELECT T1.degree_program_id, T1.degree_summary_name FROM Degree_Programs AS T1 JOIN Student_Enrolment AS T2 ON T1.degree_program_id = T2.degree_program_id GROUP BY T1.degree_program_id ORDER BY COUNT(*) DESC LIMIT 1
CREATE TABLE Degree_Programs (degree_program_id VARCHAR, degree_summary_name VARCHAR); CREATE TABLE Student_Enrolment (degree_program_id VARCHAR)
Find the program which most number of students are enrolled in. List both the id and the summary.
<s>[INST] Given the following SQL query and context: Query: SELECT T1.degree_program_id, T1.degree_summary_name FROM Degree_Programs AS T1 JOIN Student_Enrolment AS T2 ON T1.degree_program_id = T2.degree_program_id GROUP BY T1.degree_program_id ORDER BY COUNT(*) DESC LIMIT 1 Context: CREATE TABLE Degree_Programs (degre...
SELECT T1.student_id, T1.first_name, T1.middle_name, T1.last_name, COUNT(*), T1.student_id FROM Students AS T1 JOIN Student_Enrolment AS T2 ON T1.student_id = T2.student_id GROUP BY T1.student_id ORDER BY COUNT(*) DESC LIMIT 1
CREATE TABLE Students (student_id VARCHAR, first_name VARCHAR, middle_name VARCHAR, last_name VARCHAR); CREATE TABLE Student_Enrolment (student_id VARCHAR)
Which student has enrolled for the most times in any program? List the id, first name, middle name, last name, the number of enrollments and student id.
<s>[INST] Given the following SQL query and context: Query: SELECT T1.student_id, T1.first_name, T1.middle_name, T1.last_name, COUNT(*), T1.student_id FROM Students AS T1 JOIN Student_Enrolment AS T2 ON T1.student_id = T2.student_id GROUP BY T1.student_id ORDER BY COUNT(*) DESC LIMIT 1 Context: CREATE TABLE Students (s...
SELECT semester_name FROM Semesters WHERE NOT semester_id IN (SELECT semester_id FROM Student_Enrolment)
CREATE TABLE Student_Enrolment (semester_name VARCHAR, semester_id VARCHAR); CREATE TABLE Semesters (semester_name VARCHAR, semester_id VARCHAR)
Which semesters do not have any student enrolled? List the semester name.
<s>[INST] Given the following SQL query and context: Query: SELECT semester_name FROM Semesters WHERE NOT semester_id IN (SELECT semester_id FROM Student_Enrolment) Context: CREATE TABLE Student_Enrolment (semester_name VARCHAR, semester_id VARCHAR); CREATE TABLE Semesters (semester_name VARCHAR, semester_id VARCHAR) [...
SELECT DISTINCT T1.course_name FROM Courses AS T1 JOIN Student_Enrolment_Courses AS T2 ON T1.course_id = T2.course_id
CREATE TABLE Courses (course_name VARCHAR, course_id VARCHAR); CREATE TABLE Student_Enrolment_Courses (course_id VARCHAR)
What are all the course names of the courses which ever have students enrolled in?
<s>[INST] Given the following SQL query and context: Query: SELECT DISTINCT T1.course_name FROM Courses AS T1 JOIN Student_Enrolment_Courses AS T2 ON T1.course_id = T2.course_id Context: CREATE TABLE Courses (course_name VARCHAR, course_id VARCHAR); CREATE TABLE Student_Enrolment_Courses (course_id VARCHAR) [/INST] Bas...
SELECT T1.course_name FROM Courses AS T1 JOIN Student_Enrolment_Courses AS T2 ON T1.course_id = T2.course_id GROUP BY T1.course_name ORDER BY COUNT(*) DESC LIMIT 1
CREATE TABLE Courses (course_name VARCHAR, course_id VARCHAR); CREATE TABLE Student_Enrolment_Courses (course_id VARCHAR)
What's the name of the course with most number of enrollments?
<s>[INST] Given the following SQL query and context: Query: SELECT T1.course_name FROM Courses AS T1 JOIN Student_Enrolment_Courses AS T2 ON T1.course_id = T2.course_id GROUP BY T1.course_name ORDER BY COUNT(*) DESC LIMIT 1 Context: CREATE TABLE Courses (course_name VARCHAR, course_id VARCHAR); CREATE TABLE Student_Enr...
SELECT T1.last_name FROM Students AS T1 JOIN Addresses AS T2 ON T1.current_address_id = T2.address_id WHERE T2.state_province_county = 'NorthCarolina' EXCEPT SELECT DISTINCT T3.last_name FROM Students AS T3 JOIN Student_Enrolment AS T4 ON T3.student_id = T4.student_id
CREATE TABLE Addresses (address_id VARCHAR, state_province_county VARCHAR); CREATE TABLE Students (last_name VARCHAR, current_address_id VARCHAR); CREATE TABLE Students (last_name VARCHAR, student_id VARCHAR); CREATE TABLE Student_Enrolment (student_id VARCHAR)
Find the last name of the students who currently live in the state of North Carolina but have not registered in any degree program.
<s>[INST] Given the following SQL query and context: Query: SELECT T1.last_name FROM Students AS T1 JOIN Addresses AS T2 ON T1.current_address_id = T2.address_id WHERE T2.state_province_county = 'NorthCarolina' EXCEPT SELECT DISTINCT T3.last_name FROM Students AS T3 JOIN Student_Enrolment AS T4 ON T3.student_id = T4.st...
SELECT T2.transcript_date, T1.transcript_id FROM Transcript_Contents AS T1 JOIN Transcripts AS T2 ON T1.transcript_id = T2.transcript_id GROUP BY T1.transcript_id HAVING COUNT(*) >= 2
CREATE TABLE Transcript_Contents (transcript_id VARCHAR); CREATE TABLE Transcripts (transcript_date VARCHAR, transcript_id VARCHAR)
Show the date and id of the transcript with at least 2 course results.
<s>[INST] Given the following SQL query and context: Query: SELECT T2.transcript_date, T1.transcript_id FROM Transcript_Contents AS T1 JOIN Transcripts AS T2 ON T1.transcript_id = T2.transcript_id GROUP BY T1.transcript_id HAVING COUNT(*) >= 2 Context: CREATE TABLE Transcript_Contents (transcript_id VARCHAR); CREATE TA...
SELECT cell_mobile_number FROM Students WHERE first_name = 'Timmothy' AND last_name = 'Ward'
CREATE TABLE Students (cell_mobile_number VARCHAR, first_name VARCHAR, last_name VARCHAR)
What is the phone number of the man with the first name Timmothy and the last name Ward?
<s>[INST] Given the following SQL query and context: Query: SELECT cell_mobile_number FROM Students WHERE first_name = 'Timmothy' AND last_name = 'Ward' Context: CREATE TABLE Students (cell_mobile_number VARCHAR, first_name VARCHAR, last_name VARCHAR) [/INST] Based on the provided SQL query and context, your question i...
SELECT cell_mobile_number FROM students WHERE first_name = 'timmothy' AND last_name = 'ward'
CREATE TABLE students (cell_mobile_number VARCHAR, first_name VARCHAR, last_name VARCHAR)
What is the mobile phone number of the student named Timmothy Ward ?
<s>[INST] Given the following SQL query and context: Query: SELECT cell_mobile_number FROM students WHERE first_name = 'timmothy' AND last_name = 'ward' Context: CREATE TABLE students (cell_mobile_number VARCHAR, first_name VARCHAR, last_name VARCHAR) [/INST] Based on the provided SQL query and context, your question i...
SELECT first_name, middle_name, last_name FROM Students ORDER BY date_first_registered LIMIT 1
CREATE TABLE Students (first_name VARCHAR, middle_name VARCHAR, last_name VARCHAR, date_first_registered VARCHAR)
Who is the first student to register? List the first name, middle name and last name.
<s>[INST] Given the following SQL query and context: Query: SELECT first_name, middle_name, last_name FROM Students ORDER BY date_first_registered LIMIT 1 Context: CREATE TABLE Students (first_name VARCHAR, middle_name VARCHAR, last_name VARCHAR, date_first_registered VARCHAR) [/INST] Based on the provided SQL query an...
SELECT first_name, middle_name, last_name FROM Students ORDER BY date_left LIMIT 1
CREATE TABLE Students (first_name VARCHAR, middle_name VARCHAR, last_name VARCHAR, date_left VARCHAR)
Who is the earliest graduate of the school? List the first name, middle name and last name.
<s>[INST] Given the following SQL query and context: Query: SELECT first_name, middle_name, last_name FROM Students ORDER BY date_left LIMIT 1 Context: CREATE TABLE Students (first_name VARCHAR, middle_name VARCHAR, last_name VARCHAR, date_left VARCHAR) [/INST] Based on the provided SQL query and context, your question...
SELECT first_name FROM Students WHERE current_address_id <> permanent_address_id
CREATE TABLE Students (first_name VARCHAR, current_address_id VARCHAR, permanent_address_id VARCHAR)
Whose permanent address is different from his or her current address? List his or her first name.
<s>[INST] Given the following SQL query and context: Query: SELECT first_name FROM Students WHERE current_address_id <> permanent_address_id Context: CREATE TABLE Students (first_name VARCHAR, current_address_id VARCHAR, permanent_address_id VARCHAR) [/INST] Based on the provided SQL query and context, your question is...
SELECT T1.address_id, T1.line_1, T1.line_2 FROM Addresses AS T1 JOIN Students AS T2 ON T1.address_id = T2.current_address_id GROUP BY T1.address_id ORDER BY COUNT(*) DESC LIMIT 1
CREATE TABLE Addresses (address_id VARCHAR, line_1 VARCHAR, line_2 VARCHAR); CREATE TABLE Students (current_address_id VARCHAR)
Which address holds the most number of students currently? List the address id and all lines.
<s>[INST] Given the following SQL query and context: Query: SELECT T1.address_id, T1.line_1, T1.line_2 FROM Addresses AS T1 JOIN Students AS T2 ON T1.address_id = T2.current_address_id GROUP BY T1.address_id ORDER BY COUNT(*) DESC LIMIT 1 Context: CREATE TABLE Addresses (address_id VARCHAR, line_1 VARCHAR, line_2 VARCH...
SELECT AVG(transcript_date) FROM Transcripts
CREATE TABLE Transcripts (transcript_date INTEGER)
On average, when were the transcripts printed?
<s>[INST] Given the following SQL query and context: Query: SELECT AVG(transcript_date) FROM Transcripts Context: CREATE TABLE Transcripts (transcript_date INTEGER) [/INST] Based on the provided SQL query and context, your question is: On average, when were the transcripts printed? The answer to your question is: SELEC...
SELECT transcript_date, other_details FROM Transcripts ORDER BY transcript_date LIMIT 1
CREATE TABLE Transcripts (transcript_date VARCHAR, other_details VARCHAR)
When is the first transcript released? List the date and details.
<s>[INST] Given the following SQL query and context: Query: SELECT transcript_date, other_details FROM Transcripts ORDER BY transcript_date LIMIT 1 Context: CREATE TABLE Transcripts (transcript_date VARCHAR, other_details VARCHAR) [/INST] Based on the provided SQL query and context, your question is: When is the first ...
SELECT COUNT(*) FROM Transcripts
CREATE TABLE Transcripts (Id VARCHAR)
How many transcripts are released?
<s>[INST] Given the following SQL query and context: Query: SELECT COUNT(*) FROM Transcripts Context: CREATE TABLE Transcripts (Id VARCHAR) [/INST] Based on the provided SQL query and context, your question is: How many transcripts are released? The answer to your question is: SELECT COUNT(*) FROM Transcripts. [/s>
SELECT transcript_date FROM Transcripts ORDER BY transcript_date DESC LIMIT 1
CREATE TABLE Transcripts (transcript_date VARCHAR)
What is the last transcript release date?
<s>[INST] Given the following SQL query and context: Query: SELECT transcript_date FROM Transcripts ORDER BY transcript_date DESC LIMIT 1 Context: CREATE TABLE Transcripts (transcript_date VARCHAR) [/INST] Based on the provided SQL query and context, your question is: What is the last transcript release date? The answe...
SELECT COUNT(*), student_course_id FROM Transcript_Contents GROUP BY student_course_id ORDER BY COUNT(*) DESC LIMIT 1
CREATE TABLE Transcript_Contents (student_course_id VARCHAR)
How many times at most can a course enrollment result show in different transcripts? Also show the course enrollment id.
<s>[INST] Given the following SQL query and context: Query: SELECT COUNT(*), student_course_id FROM Transcript_Contents GROUP BY student_course_id ORDER BY COUNT(*) DESC LIMIT 1 Context: CREATE TABLE Transcript_Contents (student_course_id VARCHAR) [/INST] Based on the provided SQL query and context, your question is: H...
SELECT T2.transcript_date, T1.transcript_id FROM Transcript_Contents AS T1 JOIN Transcripts AS T2 ON T1.transcript_id = T2.transcript_id GROUP BY T1.transcript_id ORDER BY COUNT(*) LIMIT 1
CREATE TABLE Transcript_Contents (transcript_id VARCHAR); CREATE TABLE Transcripts (transcript_date VARCHAR, transcript_id VARCHAR)
Show the date of the transcript which shows the least number of results, also list the id.
<s>[INST] Given the following SQL query and context: Query: SELECT T2.transcript_date, T1.transcript_id FROM Transcript_Contents AS T1 JOIN Transcripts AS T2 ON T1.transcript_id = T2.transcript_id GROUP BY T1.transcript_id ORDER BY COUNT(*) LIMIT 1 Context: CREATE TABLE Transcript_Contents (transcript_id VARCHAR); CREA...
SELECT DISTINCT T2.semester_id FROM Degree_Programs AS T1 JOIN Student_Enrolment AS T2 ON T1.degree_program_id = T2.degree_program_id WHERE degree_summary_name = 'Master' INTERSECT SELECT DISTINCT T2.semester_id FROM Degree_Programs AS T1 JOIN Student_Enrolment AS T2 ON T1.degree_program_id = T2.degree_program_id WHERE...
CREATE TABLE Degree_Programs (degree_program_id VARCHAR); CREATE TABLE Student_Enrolment (semester_id VARCHAR, degree_program_id VARCHAR)
Find the semester when both Master students and Bachelor students got enrolled in.
<s>[INST] Given the following SQL query and context: Query: SELECT DISTINCT T2.semester_id FROM Degree_Programs AS T1 JOIN Student_Enrolment AS T2 ON T1.degree_program_id = T2.degree_program_id WHERE degree_summary_name = 'Master' INTERSECT SELECT DISTINCT T2.semester_id FROM Degree_Programs AS T1 JOIN Student_Enrolmen...
SELECT COUNT(DISTINCT current_address_id) FROM Students
CREATE TABLE Students (current_address_id VARCHAR)
How many different addresses do the students currently live?
<s>[INST] Given the following SQL query and context: Query: SELECT COUNT(DISTINCT current_address_id) FROM Students Context: CREATE TABLE Students (current_address_id VARCHAR) [/INST] Based on the provided SQL query and context, your question is: How many different addresses do the students currently live? The answer t...
SELECT other_student_details FROM Students ORDER BY other_student_details DESC
CREATE TABLE Students (other_student_details VARCHAR)
List all the student details in reversed lexicographical order.
<s>[INST] Given the following SQL query and context: Query: SELECT other_student_details FROM Students ORDER BY other_student_details DESC Context: CREATE TABLE Students (other_student_details VARCHAR) [/INST] Based on the provided SQL query and context, your question is: List all the student details in reversed lexico...
SELECT section_description FROM Sections WHERE section_name = 'h'
CREATE TABLE Sections (section_description VARCHAR, section_name VARCHAR)
Describe the section h.
<s>[INST] Given the following SQL query and context: Query: SELECT section_description FROM Sections WHERE section_name = 'h' Context: CREATE TABLE Sections (section_description VARCHAR, section_name VARCHAR) [/INST] Based on the provided SQL query and context, your question is: Describe the section h. The answer to yo...
SELECT t1.first_name FROM students AS t1 JOIN addresses AS t2 ON t1.permanent_address_id = t2.address_id WHERE t2.country = 'haiti' OR t1.cell_mobile_number = '09700166582'
CREATE TABLE students (first_name VARCHAR, permanent_address_id VARCHAR, cell_mobile_number VARCHAR); CREATE TABLE addresses (address_id VARCHAR, country VARCHAR)
Find the first name of the students who permanently live in the country Haiti or have the cell phone number 09700166582 .
<s>[INST] Given the following SQL query and context: Query: SELECT t1.first_name FROM students AS t1 JOIN addresses AS t2 ON t1.permanent_address_id = t2.address_id WHERE t2.country = 'haiti' OR t1.cell_mobile_number = '09700166582' Context: CREATE TABLE students (first_name VARCHAR, permanent_address_id VARCHAR, cell_...
SELECT Title FROM Cartoon ORDER BY title
CREATE TABLE Cartoon (Title VARCHAR, title VARCHAR)
List the title of all cartoons in alphabetical order.
<s>[INST] Given the following SQL query and context: Query: SELECT Title FROM Cartoon ORDER BY title Context: CREATE TABLE Cartoon (Title VARCHAR, title VARCHAR) [/INST] Based on the provided SQL query and context, your question is: List the title of all cartoons in alphabetical order. The answer to your question is: S...
SELECT Title FROM Cartoon WHERE Directed_by = "Ben Jones"
CREATE TABLE Cartoon (Title VARCHAR, Directed_by VARCHAR)
List all cartoon directed by "Ben Jones".
<s>[INST] Given the following SQL query and context: Query: SELECT Title FROM Cartoon WHERE Directed_by = "Ben Jones" Context: CREATE TABLE Cartoon (Title VARCHAR, Directed_by VARCHAR) [/INST] Based on the provided SQL query and context, your question is: List all cartoon directed by "Ben Jones". The answer to your que...
SELECT COUNT(*) FROM Cartoon WHERE Written_by = "Joseph Kuhr"
CREATE TABLE Cartoon (Written_by VARCHAR)
How many cartoons were written by "Joseph Kuhr"?
<s>[INST] Given the following SQL query and context: Query: SELECT COUNT(*) FROM Cartoon WHERE Written_by = "Joseph Kuhr" Context: CREATE TABLE Cartoon (Written_by VARCHAR) [/INST] Based on the provided SQL query and context, your question is: How many cartoons were written by "Joseph Kuhr"? The answer to your question...
SELECT title, Directed_by FROM Cartoon ORDER BY Original_air_date
CREATE TABLE Cartoon (title VARCHAR, Directed_by VARCHAR, Original_air_date VARCHAR)
list all cartoon titles and their directors ordered by their air date
<s>[INST] Given the following SQL query and context: Query: SELECT title, Directed_by FROM Cartoon ORDER BY Original_air_date Context: CREATE TABLE Cartoon (title VARCHAR, Directed_by VARCHAR, Original_air_date VARCHAR) [/INST] Based on the provided SQL query and context, your question is: list all cartoon titles and t...
SELECT Title FROM Cartoon WHERE Directed_by = "Ben Jones" OR Directed_by = "Brandon Vietti"
CREATE TABLE Cartoon (Title VARCHAR, Directed_by VARCHAR)
List the title of all cartoon directed by "Ben Jones" or "Brandon Vietti".
<s>[INST] Given the following SQL query and context: Query: SELECT Title FROM Cartoon WHERE Directed_by = "Ben Jones" OR Directed_by = "Brandon Vietti" Context: CREATE TABLE Cartoon (Title VARCHAR, Directed_by VARCHAR) [/INST] Based on the provided SQL query and context, your question is: List the title of all cartoon ...
SELECT Country, COUNT(*) FROM TV_Channel GROUP BY Country ORDER BY COUNT(*) DESC LIMIT 1
CREATE TABLE TV_Channel (Country VARCHAR)
Which country has the most of TV Channels? List the country and number of TV Channels it has.
<s>[INST] Given the following SQL query and context: Query: SELECT Country, COUNT(*) FROM TV_Channel GROUP BY Country ORDER BY COUNT(*) DESC LIMIT 1 Context: CREATE TABLE TV_Channel (Country VARCHAR) [/INST] Based on the provided SQL query and context, your question is: Which country has the most of TV Channels? List t...
SELECT COUNT(DISTINCT series_name), COUNT(DISTINCT content) FROM TV_Channel
CREATE TABLE TV_Channel (series_name VARCHAR, content VARCHAR)
List the number of different series names and contents in the TV Channel table.
<s>[INST] Given the following SQL query and context: Query: SELECT COUNT(DISTINCT series_name), COUNT(DISTINCT content) FROM TV_Channel Context: CREATE TABLE TV_Channel (series_name VARCHAR, content VARCHAR) [/INST] Based on the provided SQL query and context, your question is: List the number of different series names...
SELECT Content FROM TV_Channel WHERE series_name = "Sky Radio"
CREATE TABLE TV_Channel (Content VARCHAR, series_name VARCHAR)
What is the content of TV Channel with serial name "Sky Radio"?
<s>[INST] Given the following SQL query and context: Query: SELECT Content FROM TV_Channel WHERE series_name = "Sky Radio" Context: CREATE TABLE TV_Channel (Content VARCHAR, series_name VARCHAR) [/INST] Based on the provided SQL query and context, your question is: What is the content of TV Channel with serial name "Sk...
SELECT Package_Option FROM TV_Channel WHERE series_name = "Sky Radio"
CREATE TABLE TV_Channel (Package_Option VARCHAR, series_name VARCHAR)
What is the Package Option of TV Channel with serial name "Sky Radio"?
<s>[INST] Given the following SQL query and context: Query: SELECT Package_Option FROM TV_Channel WHERE series_name = "Sky Radio" Context: CREATE TABLE TV_Channel (Package_Option VARCHAR, series_name VARCHAR) [/INST] Based on the provided SQL query and context, your question is: What is the Package Option of TV Channel...
SELECT COUNT(*) FROM TV_Channel WHERE LANGUAGE = "English"
CREATE TABLE TV_Channel (LANGUAGE VARCHAR)
How many TV Channel using language English?
<s>[INST] Given the following SQL query and context: Query: SELECT COUNT(*) FROM TV_Channel WHERE LANGUAGE = "English" Context: CREATE TABLE TV_Channel (LANGUAGE VARCHAR) [/INST] Based on the provided SQL query and context, your question is: How many TV Channel using language English? The answer to your question is: SE...
SELECT LANGUAGE, COUNT(*) FROM TV_Channel GROUP BY LANGUAGE ORDER BY COUNT(*) LIMIT 1
CREATE TABLE TV_Channel (LANGUAGE VARCHAR)
List the language used least number of TV Channel. List language and number of TV Channel.
<s>[INST] Given the following SQL query and context: Query: SELECT LANGUAGE, COUNT(*) FROM TV_Channel GROUP BY LANGUAGE ORDER BY COUNT(*) LIMIT 1 Context: CREATE TABLE TV_Channel (LANGUAGE VARCHAR) [/INST] Based on the provided SQL query and context, your question is: List the language used least number of TV Channel. ...
SELECT LANGUAGE, COUNT(*) FROM TV_Channel GROUP BY LANGUAGE
CREATE TABLE TV_Channel (LANGUAGE VARCHAR)
List each language and the number of TV Channels using it.
<s>[INST] Given the following SQL query and context: Query: SELECT LANGUAGE, COUNT(*) FROM TV_Channel GROUP BY LANGUAGE Context: CREATE TABLE TV_Channel (LANGUAGE VARCHAR) [/INST] Based on the provided SQL query and context, your question is: List each language and the number of TV Channels using it. The answer to your...
SELECT T1.series_name FROM TV_Channel AS T1 JOIN Cartoon AS T2 ON T1.id = T2.Channel WHERE T2.Title = "The Rise of the Blue Beetle!"
CREATE TABLE Cartoon (Channel VARCHAR, Title VARCHAR); CREATE TABLE TV_Channel (series_name VARCHAR, id VARCHAR)
What is the TV Channel that shows the cartoon "The Rise of the Blue Beetle!"? List the TV Channel's series name.
<s>[INST] Given the following SQL query and context: Query: SELECT T1.series_name FROM TV_Channel AS T1 JOIN Cartoon AS T2 ON T1.id = T2.Channel WHERE T2.Title = "The Rise of the Blue Beetle!" Context: CREATE TABLE Cartoon (Channel VARCHAR, Title VARCHAR); CREATE TABLE TV_Channel (series_name VARCHAR, id VARCHAR) [/INS...
SELECT T2.Title FROM TV_Channel AS T1 JOIN Cartoon AS T2 ON T1.id = T2.Channel WHERE T1.series_name = "Sky Radio"
CREATE TABLE Cartoon (Title VARCHAR, Channel VARCHAR); CREATE TABLE TV_Channel (id VARCHAR, series_name VARCHAR)
List the title of all Cartoons showed on TV Channel with series name "Sky Radio".
<s>[INST] Given the following SQL query and context: Query: SELECT T2.Title FROM TV_Channel AS T1 JOIN Cartoon AS T2 ON T1.id = T2.Channel WHERE T1.series_name = "Sky Radio" Context: CREATE TABLE Cartoon (Title VARCHAR, Channel VARCHAR); CREATE TABLE TV_Channel (id VARCHAR, series_name VARCHAR) [/INST] Based on the pro...
SELECT Episode FROM TV_series ORDER BY rating
CREATE TABLE TV_series (Episode VARCHAR, rating VARCHAR)
List the Episode of all TV series sorted by rating.
<s>[INST] Given the following SQL query and context: Query: SELECT Episode FROM TV_series ORDER BY rating Context: CREATE TABLE TV_series (Episode VARCHAR, rating VARCHAR) [/INST] Based on the provided SQL query and context, your question is: List the Episode of all TV series sorted by rating. The answer to your questi...
SELECT Episode, Rating FROM TV_series ORDER BY Rating DESC LIMIT 3
CREATE TABLE TV_series (Episode VARCHAR, Rating VARCHAR)
List top 3 highest Rating TV series. List the TV series's Episode and Rating.
<s>[INST] Given the following SQL query and context: Query: SELECT Episode, Rating FROM TV_series ORDER BY Rating DESC LIMIT 3 Context: CREATE TABLE TV_series (Episode VARCHAR, Rating VARCHAR) [/INST] Based on the provided SQL query and context, your question is: List top 3 highest Rating TV series. List the TV series...
SELECT MAX(SHARE), MIN(SHARE) FROM TV_series
CREATE TABLE TV_series (SHARE INTEGER)
What is minimum and maximum share of TV series?
<s>[INST] Given the following SQL query and context: Query: SELECT MAX(SHARE), MIN(SHARE) FROM TV_series Context: CREATE TABLE TV_series (SHARE INTEGER) [/INST] Based on the provided SQL query and context, your question is: What is minimum and maximum share of TV series? The answer to your question is: SELECT MAX(SHARE...
SELECT Air_Date FROM TV_series WHERE Episode = "A Love of a Lifetime"
CREATE TABLE TV_series (Air_Date VARCHAR, Episode VARCHAR)
What is the air date of TV series with Episode "A Love of a Lifetime"?
<s>[INST] Given the following SQL query and context: Query: SELECT Air_Date FROM TV_series WHERE Episode = "A Love of a Lifetime" Context: CREATE TABLE TV_series (Air_Date VARCHAR, Episode VARCHAR) [/INST] Based on the provided SQL query and context, your question is: What is the air date of TV series with Episode "A L...
SELECT Weekly_Rank FROM TV_series WHERE Episode = "A Love of a Lifetime"
CREATE TABLE TV_series (Weekly_Rank VARCHAR, Episode VARCHAR)
What is Weekly Rank of TV series with Episode "A Love of a Lifetime"?
<s>[INST] Given the following SQL query and context: Query: SELECT Weekly_Rank FROM TV_series WHERE Episode = "A Love of a Lifetime" Context: CREATE TABLE TV_series (Weekly_Rank VARCHAR, Episode VARCHAR) [/INST] Based on the provided SQL query and context, your question is: What is Weekly Rank of TV series with Episode...
SELECT T1.series_name FROM TV_Channel AS T1 JOIN TV_series AS T2 ON T1.id = T2.Channel WHERE T2.Episode = "A Love of a Lifetime"
CREATE TABLE TV_series (Channel VARCHAR, Episode VARCHAR); CREATE TABLE TV_Channel (series_name VARCHAR, id VARCHAR)
What is the TV Channel of TV series with Episode "A Love of a Lifetime"? List the TV Channel's series name.
<s>[INST] Given the following SQL query and context: Query: SELECT T1.series_name FROM TV_Channel AS T1 JOIN TV_series AS T2 ON T1.id = T2.Channel WHERE T2.Episode = "A Love of a Lifetime" Context: CREATE TABLE TV_series (Channel VARCHAR, Episode VARCHAR); CREATE TABLE TV_Channel (series_name VARCHAR, id VARCHAR) [/INS...