answer
stringlengths
18
557
context
stringlengths
27
489
question
stringlengths
12
244
text
stringlengths
275
1.7k
SELECT AVG(rating), languages FROM song GROUP BY languages
CREATE TABLE song (languages VARCHAR, rating INTEGER)
What is the average rating of songs for each language?
<s>[INST] Given the following SQL query and context: Query: SELECT AVG(rating), languages FROM song GROUP BY languages Context: CREATE TABLE song (languages VARCHAR, rating INTEGER) [/INST] Based on the provided SQL query and context, your question is: What is the average rating of songs for each language? The answer to your question is: SELECT AVG(rating), languages FROM song GROUP BY languages. [/s>
SELECT T1.gender, T1.artist_name FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name ORDER BY T2.resolution LIMIT 1
CREATE TABLE artist (gender VARCHAR, artist_name VARCHAR); CREATE TABLE song (artist_name VARCHAR, resolution VARCHAR)
Return the gender and name of artist who produced the song with the lowest resolution.
<s>[INST] Given the following SQL query and context: Query: SELECT T1.gender, T1.artist_name FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name ORDER BY T2.resolution LIMIT 1 Context: CREATE TABLE artist (gender VARCHAR, artist_name VARCHAR); CREATE TABLE song (artist_name VARCHAR, resolution VARCHAR) [/INST] Based on the provided SQL query and context, your question is: Return the gender and name of artist who produced the song with the lowest resolution. The answer to your question is: SELECT T1.gender, T1.artist_name FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name ORDER BY T2.resolution LIMIT 1. [/s>
SELECT COUNT(*), formats FROM files GROUP BY formats
CREATE TABLE files (formats VARCHAR)
For each file format, return the number of artists who released songs in that format.
<s>[INST] Given the following SQL query and context: Query: SELECT COUNT(*), formats FROM files GROUP BY formats Context: CREATE TABLE files (formats VARCHAR) [/INST] Based on the provided SQL query and context, your question is: For each file format, return the number of artists who released songs in that format. The answer to your question is: SELECT COUNT(*), formats FROM files GROUP BY formats. [/s>
SELECT DISTINCT song_name FROM song WHERE resolution > (SELECT MIN(resolution) FROM song WHERE languages = "english")
CREATE TABLE song (song_name VARCHAR, resolution INTEGER, languages VARCHAR)
Find the distinct names of all songs that have a higher resolution than some songs in English.
<s>[INST] Given the following SQL query and context: Query: SELECT DISTINCT song_name FROM song WHERE resolution > (SELECT MIN(resolution) FROM song WHERE languages = "english") Context: CREATE TABLE song (song_name VARCHAR, resolution INTEGER, languages VARCHAR) [/INST] Based on the provided SQL query and context, your question is: Find the distinct names of all songs that have a higher resolution than some songs in English. The answer to your question is: SELECT DISTINCT song_name FROM song WHERE resolution > (SELECT MIN(resolution) FROM song WHERE languages = "english"). [/s>
SELECT song_name FROM song WHERE rating < (SELECT MAX(rating) FROM song WHERE genre_is = "blues")
CREATE TABLE song (song_name VARCHAR, rating INTEGER, genre_is VARCHAR)
What are the names of all songs that have a lower rating than some song of blues genre?
<s>[INST] Given the following SQL query and context: Query: SELECT song_name FROM song WHERE rating < (SELECT MAX(rating) FROM song WHERE genre_is = "blues") Context: CREATE TABLE song (song_name VARCHAR, rating INTEGER, genre_is VARCHAR) [/INST] Based on the provided SQL query and context, your question is: What are the names of all songs that have a lower rating than some song of blues genre? The answer to your question is: SELECT song_name FROM song WHERE rating < (SELECT MAX(rating) FROM song WHERE genre_is = "blues"). [/s>
SELECT T1.artist_name, T1.country FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name WHERE T2.song_name LIKE "%love%"
CREATE TABLE song (artist_name VARCHAR, song_name VARCHAR); CREATE TABLE artist (artist_name VARCHAR, country VARCHAR)
What is the name and country of origin of the artist who released a song that has "love" in its title?
<s>[INST] Given the following SQL query and context: Query: SELECT T1.artist_name, T1.country FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name WHERE T2.song_name LIKE "%love%" Context: CREATE TABLE song (artist_name VARCHAR, song_name VARCHAR); CREATE TABLE artist (artist_name VARCHAR, country VARCHAR) [/INST] Based on the provided SQL query and context, your question is: What is the name and country of origin of the artist who released a song that has "love" in its title? The answer to your question is: SELECT T1.artist_name, T1.country FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name WHERE T2.song_name LIKE "%love%". [/s>
SELECT T1.artist_name, T1.gender FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name WHERE T2.releasedate LIKE "%Mar%"
CREATE TABLE song (artist_name VARCHAR, releasedate VARCHAR); CREATE TABLE artist (artist_name VARCHAR, gender VARCHAR)
List the name and gender for all artists who released songs in March.
<s>[INST] Given the following SQL query and context: Query: SELECT T1.artist_name, T1.gender FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name WHERE T2.releasedate LIKE "%Mar%" Context: CREATE TABLE song (artist_name VARCHAR, releasedate VARCHAR); CREATE TABLE artist (artist_name VARCHAR, gender VARCHAR) [/INST] Based on the provided SQL query and context, your question is: List the name and gender for all artists who released songs in March. The answer to your question is: SELECT T1.artist_name, T1.gender FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name WHERE T2.releasedate LIKE "%Mar%". [/s>
SELECT g_name, rating FROM genre ORDER BY g_name
CREATE TABLE genre (g_name VARCHAR, rating VARCHAR)
List the names of all genres in alphabetical oder, together with its ratings.
<s>[INST] Given the following SQL query and context: Query: SELECT g_name, rating FROM genre ORDER BY g_name Context: CREATE TABLE genre (g_name VARCHAR, rating VARCHAR) [/INST] Based on the provided SQL query and context, your question is: List the names of all genres in alphabetical oder, together with its ratings. The answer to your question is: SELECT g_name, rating FROM genre ORDER BY g_name. [/s>
SELECT song_name FROM song ORDER BY resolution
CREATE TABLE song (song_name VARCHAR, resolution VARCHAR)
Give me a list of the names of all songs ordered by their resolution.
<s>[INST] Given the following SQL query and context: Query: SELECT song_name FROM song ORDER BY resolution Context: CREATE TABLE song (song_name VARCHAR, resolution VARCHAR) [/INST] Based on the provided SQL query and context, your question is: Give me a list of the names of all songs ordered by their resolution. The answer to your question is: SELECT song_name FROM song ORDER BY resolution. [/s>
SELECT f_id FROM files WHERE formats = "mp4" UNION SELECT f_id FROM song WHERE resolution > 720
CREATE TABLE song (f_id VARCHAR, formats VARCHAR, resolution INTEGER); CREATE TABLE files (f_id VARCHAR, formats VARCHAR, resolution INTEGER)
What are the ids of songs that are available in either mp4 format or have resolution above 720?
<s>[INST] Given the following SQL query and context: Query: SELECT f_id FROM files WHERE formats = "mp4" UNION SELECT f_id FROM song WHERE resolution > 720 Context: CREATE TABLE song (f_id VARCHAR, formats VARCHAR, resolution INTEGER); CREATE TABLE files (f_id VARCHAR, formats VARCHAR, resolution INTEGER) [/INST] Based on the provided SQL query and context, your question is: What are the ids of songs that are available in either mp4 format or have resolution above 720? The answer to your question is: SELECT f_id FROM files WHERE formats = "mp4" UNION SELECT f_id FROM song WHERE resolution > 720. [/s>
SELECT T2.song_name FROM files AS T1 JOIN song AS T2 ON T1.f_id = T2.f_id WHERE T1.duration LIKE "4:%" UNION SELECT song_name FROM song WHERE languages = "english"
CREATE TABLE files (f_id VARCHAR, duration VARCHAR); CREATE TABLE song (song_name VARCHAR, f_id VARCHAR); CREATE TABLE song (song_name VARCHAR, languages VARCHAR)
List the names of all songs that have 4 minute duration or are in English.
<s>[INST] Given the following SQL query and context: Query: SELECT T2.song_name FROM files AS T1 JOIN song AS T2 ON T1.f_id = T2.f_id WHERE T1.duration LIKE "4:%" UNION SELECT song_name FROM song WHERE languages = "english" Context: CREATE TABLE files (f_id VARCHAR, duration VARCHAR); CREATE TABLE song (song_name VARCHAR, f_id VARCHAR); CREATE TABLE song (song_name VARCHAR, languages VARCHAR) [/INST] Based on the provided SQL query and context, your question is: List the names of all songs that have 4 minute duration or are in English. The answer to your question is: SELECT T2.song_name FROM files AS T1 JOIN song AS T2 ON T1.f_id = T2.f_id WHERE T1.duration LIKE "4:%" UNION SELECT song_name FROM song WHERE languages = "english". [/s>
SELECT languages FROM song GROUP BY languages ORDER BY COUNT(*) DESC LIMIT 1
CREATE TABLE song (languages VARCHAR)
What is the language used most often in the songs?
<s>[INST] Given the following SQL query and context: Query: SELECT languages FROM song GROUP BY languages ORDER BY COUNT(*) DESC LIMIT 1 Context: CREATE TABLE song (languages VARCHAR) [/INST] Based on the provided SQL query and context, your question is: What is the language used most often in the songs? The answer to your question is: SELECT languages FROM song GROUP BY languages ORDER BY COUNT(*) DESC LIMIT 1. [/s>
SELECT artist_name FROM song WHERE resolution > 500 GROUP BY languages ORDER BY COUNT(*) DESC LIMIT 1
CREATE TABLE song (artist_name VARCHAR, languages VARCHAR, resolution INTEGER)
What is the language that was used most often in songs with resolution above 500?
<s>[INST] Given the following SQL query and context: Query: SELECT artist_name FROM song WHERE resolution > 500 GROUP BY languages ORDER BY COUNT(*) DESC LIMIT 1 Context: CREATE TABLE song (artist_name VARCHAR, languages VARCHAR, resolution INTEGER) [/INST] Based on the provided SQL query and context, your question is: What is the language that was used most often in songs with resolution above 500? The answer to your question is: SELECT artist_name FROM song WHERE resolution > 500 GROUP BY languages ORDER BY COUNT(*) DESC LIMIT 1. [/s>
SELECT artist_name FROM artist WHERE country = "UK" AND gender = "Male"
CREATE TABLE artist (artist_name VARCHAR, country VARCHAR, gender VARCHAR)
What are the names of artists who are Male and are from UK?
<s>[INST] Given the following SQL query and context: Query: SELECT artist_name FROM artist WHERE country = "UK" AND gender = "Male" Context: CREATE TABLE artist (artist_name VARCHAR, country VARCHAR, gender VARCHAR) [/INST] Based on the provided SQL query and context, your question is: What are the names of artists who are Male and are from UK? The answer to your question is: SELECT artist_name FROM artist WHERE country = "UK" AND gender = "Male". [/s>
SELECT song_name FROM song WHERE genre_is = "modern" OR languages = "english"
CREATE TABLE song (song_name VARCHAR, genre_is VARCHAR, languages VARCHAR)
Find the names of songs whose genre is modern or language is English.
<s>[INST] Given the following SQL query and context: Query: SELECT song_name FROM song WHERE genre_is = "modern" OR languages = "english" Context: CREATE TABLE song (song_name VARCHAR, genre_is VARCHAR, languages VARCHAR) [/INST] Based on the provided SQL query and context, your question is: Find the names of songs whose genre is modern or language is English. The answer to your question is: SELECT song_name FROM song WHERE genre_is = "modern" OR languages = "english". [/s>
SELECT T2.song_name FROM files AS T1 JOIN song AS T2 ON T1.f_id = T2.f_id WHERE T1.formats = "mp3" INTERSECT SELECT song_name FROM song WHERE resolution < 1000
CREATE TABLE song (song_name VARCHAR, resolution INTEGER); CREATE TABLE song (song_name VARCHAR, f_id VARCHAR); CREATE TABLE files (f_id VARCHAR, formats VARCHAR)
Return the names of songs for which format is mp3 and resolution is below 1000.
<s>[INST] Given the following SQL query and context: Query: SELECT T2.song_name FROM files AS T1 JOIN song AS T2 ON T1.f_id = T2.f_id WHERE T1.formats = "mp3" INTERSECT SELECT song_name FROM song WHERE resolution < 1000 Context: CREATE TABLE song (song_name VARCHAR, resolution INTEGER); CREATE TABLE song (song_name VARCHAR, f_id VARCHAR); CREATE TABLE files (f_id VARCHAR, formats VARCHAR) [/INST] Based on the provided SQL query and context, your question is: Return the names of songs for which format is mp3 and resolution is below 1000. The answer to your question is: SELECT T2.song_name FROM files AS T1 JOIN song AS T2 ON T1.f_id = T2.f_id WHERE T1.formats = "mp3" INTERSECT SELECT song_name FROM song WHERE resolution < 1000. [/s>
SELECT artist_name FROM artist WHERE country = "UK" INTERSECT SELECT T1.artist_name FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name WHERE T2.languages = "english"
CREATE TABLE song (artist_name VARCHAR, languages VARCHAR); CREATE TABLE artist (artist_name VARCHAR); CREATE TABLE artist (artist_name VARCHAR, country VARCHAR)
Return the names of singers who are from UK and released an English song.
<s>[INST] Given the following SQL query and context: Query: SELECT artist_name FROM artist WHERE country = "UK" INTERSECT SELECT T1.artist_name FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name WHERE T2.languages = "english" Context: CREATE TABLE song (artist_name VARCHAR, languages VARCHAR); CREATE TABLE artist (artist_name VARCHAR); CREATE TABLE artist (artist_name VARCHAR, country VARCHAR) [/INST] Based on the provided SQL query and context, your question is: Return the names of singers who are from UK and released an English song. The answer to your question is: SELECT artist_name FROM artist WHERE country = "UK" INTERSECT SELECT T1.artist_name FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name WHERE T2.languages = "english". [/s>
SELECT AVG(rating), AVG(resolution) FROM song WHERE languages = "bangla"
CREATE TABLE song (rating INTEGER, resolution INTEGER, languages VARCHAR)
What are the average rating and resolution of songs that are in Bangla?
<s>[INST] Given the following SQL query and context: Query: SELECT AVG(rating), AVG(resolution) FROM song WHERE languages = "bangla" Context: CREATE TABLE song (rating INTEGER, resolution INTEGER, languages VARCHAR) [/INST] Based on the provided SQL query and context, your question is: What are the average rating and resolution of songs that are in Bangla? The answer to your question is: SELECT AVG(rating), AVG(resolution) FROM song WHERE languages = "bangla". [/s>
SELECT MAX(T2.resolution), MIN(T2.resolution) FROM files AS T1 JOIN song AS T2 ON T1.f_id = T2.f_id WHERE T1.duration LIKE "3:%"
CREATE TABLE files (f_id VARCHAR, duration VARCHAR); CREATE TABLE song (resolution INTEGER, f_id VARCHAR)
What are the maximum and minimum resolution of songs whose duration is 3 minutes?
<s>[INST] Given the following SQL query and context: Query: SELECT MAX(T2.resolution), MIN(T2.resolution) FROM files AS T1 JOIN song AS T2 ON T1.f_id = T2.f_id WHERE T1.duration LIKE "3:%" Context: CREATE TABLE files (f_id VARCHAR, duration VARCHAR); CREATE TABLE song (resolution INTEGER, f_id VARCHAR) [/INST] Based on the provided SQL query and context, your question is: What are the maximum and minimum resolution of songs whose duration is 3 minutes? The answer to your question is: SELECT MAX(T2.resolution), MIN(T2.resolution) FROM files AS T1 JOIN song AS T2 ON T1.f_id = T2.f_id WHERE T1.duration LIKE "3:%". [/s>
SELECT MAX(T1.duration), MAX(T2.resolution), T2.languages FROM files AS T1 JOIN song AS T2 ON T1.f_id = T2.f_id GROUP BY T2.languages ORDER BY T2.languages
CREATE TABLE song (languages VARCHAR, resolution INTEGER, f_id VARCHAR); CREATE TABLE files (duration INTEGER, f_id VARCHAR)
What are the maximum duration and resolution of songs grouped and ordered by languages?
<s>[INST] Given the following SQL query and context: Query: SELECT MAX(T1.duration), MAX(T2.resolution), T2.languages FROM files AS T1 JOIN song AS T2 ON T1.f_id = T2.f_id GROUP BY T2.languages ORDER BY T2.languages Context: CREATE TABLE song (languages VARCHAR, resolution INTEGER, f_id VARCHAR); CREATE TABLE files (duration INTEGER, f_id VARCHAR) [/INST] Based on the provided SQL query and context, your question is: What are the maximum duration and resolution of songs grouped and ordered by languages? The answer to your question is: SELECT MAX(T1.duration), MAX(T2.resolution), T2.languages FROM files AS T1 JOIN song AS T2 ON T1.f_id = T2.f_id GROUP BY T2.languages ORDER BY T2.languages. [/s>
SELECT MIN(T1.duration), MIN(T2.rating), T2.genre_is FROM files AS T1 JOIN song AS T2 ON T1.f_id = T2.f_id GROUP BY T2.genre_is ORDER BY T2.genre_is
CREATE TABLE song (genre_is VARCHAR, rating INTEGER, f_id VARCHAR); CREATE TABLE files (duration INTEGER, f_id VARCHAR)
What are the shortest duration and lowest rating of songs grouped by genre and ordered by genre?
<s>[INST] Given the following SQL query and context: Query: SELECT MIN(T1.duration), MIN(T2.rating), T2.genre_is FROM files AS T1 JOIN song AS T2 ON T1.f_id = T2.f_id GROUP BY T2.genre_is ORDER BY T2.genre_is Context: CREATE TABLE song (genre_is VARCHAR, rating INTEGER, f_id VARCHAR); CREATE TABLE files (duration INTEGER, f_id VARCHAR) [/INST] Based on the provided SQL query and context, your question is: What are the shortest duration and lowest rating of songs grouped by genre and ordered by genre? The answer to your question is: SELECT MIN(T1.duration), MIN(T2.rating), T2.genre_is FROM files AS T1 JOIN song AS T2 ON T1.f_id = T2.f_id GROUP BY T2.genre_is ORDER BY T2.genre_is. [/s>
SELECT T1.artist_name, COUNT(*) FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name WHERE T2.languages = "english" GROUP BY T2.artist_name HAVING COUNT(*) >= 1
CREATE TABLE song (artist_name VARCHAR, languages VARCHAR); CREATE TABLE artist (artist_name VARCHAR)
Find the names and number of works of all artists who have at least one English songs.
<s>[INST] Given the following SQL query and context: Query: SELECT T1.artist_name, COUNT(*) FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name WHERE T2.languages = "english" GROUP BY T2.artist_name HAVING COUNT(*) >= 1 Context: CREATE TABLE song (artist_name VARCHAR, languages VARCHAR); CREATE TABLE artist (artist_name VARCHAR) [/INST] Based on the provided SQL query and context, your question is: Find the names and number of works of all artists who have at least one English songs. The answer to your question is: SELECT T1.artist_name, COUNT(*) FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name WHERE T2.languages = "english" GROUP BY T2.artist_name HAVING COUNT(*) >= 1. [/s>
SELECT T1.artist_name, T1.country FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name WHERE T2.resolution > 900 GROUP BY T2.artist_name HAVING COUNT(*) >= 1
CREATE TABLE song (artist_name VARCHAR, resolution INTEGER); CREATE TABLE artist (artist_name VARCHAR, country VARCHAR)
Find the name and country of origin for all artists who have release at least one song of resolution above 900.
<s>[INST] Given the following SQL query and context: Query: SELECT T1.artist_name, T1.country FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name WHERE T2.resolution > 900 GROUP BY T2.artist_name HAVING COUNT(*) >= 1 Context: CREATE TABLE song (artist_name VARCHAR, resolution INTEGER); CREATE TABLE artist (artist_name VARCHAR, country VARCHAR) [/INST] Based on the provided SQL query and context, your question is: Find the name and country of origin for all artists who have release at least one song of resolution above 900. The answer to your question is: SELECT T1.artist_name, T1.country FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name WHERE T2.resolution > 900 GROUP BY T2.artist_name HAVING COUNT(*) >= 1. [/s>
SELECT T1.artist_name, COUNT(*) FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name GROUP BY T2.artist_name ORDER BY COUNT(*) DESC LIMIT 3
CREATE TABLE song (artist_name VARCHAR); CREATE TABLE artist (artist_name VARCHAR)
Find the names and number of works of the three artists who have produced the most songs.
<s>[INST] Given the following SQL query and context: Query: SELECT T1.artist_name, COUNT(*) FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name GROUP BY T2.artist_name ORDER BY COUNT(*) DESC LIMIT 3 Context: CREATE TABLE song (artist_name VARCHAR); CREATE TABLE artist (artist_name VARCHAR) [/INST] Based on the provided SQL query and context, your question is: Find the names and number of works of the three artists who have produced the most songs. The answer to your question is: SELECT T1.artist_name, COUNT(*) FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name GROUP BY T2.artist_name ORDER BY COUNT(*) DESC LIMIT 3. [/s>
SELECT T1.country FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name GROUP BY T2.artist_name ORDER BY COUNT(*) LIMIT 1
CREATE TABLE song (artist_name VARCHAR); CREATE TABLE artist (country VARCHAR, artist_name VARCHAR)
Find the country of origin for the artist who made the least number of songs?
<s>[INST] Given the following SQL query and context: Query: SELECT T1.country FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name GROUP BY T2.artist_name ORDER BY COUNT(*) LIMIT 1 Context: CREATE TABLE song (artist_name VARCHAR); CREATE TABLE artist (country VARCHAR, artist_name VARCHAR) [/INST] Based on the provided SQL query and context, your question is: Find the country of origin for the artist who made the least number of songs? The answer to your question is: SELECT T1.country FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name GROUP BY T2.artist_name ORDER BY COUNT(*) LIMIT 1. [/s>
SELECT song_name FROM song WHERE rating < (SELECT MIN(rating) FROM song WHERE languages = 'english')
CREATE TABLE song (song_name VARCHAR, rating INTEGER, languages VARCHAR)
What are the names of the songs whose rating is below the rating of all songs in English?
<s>[INST] Given the following SQL query and context: Query: SELECT song_name FROM song WHERE rating < (SELECT MIN(rating) FROM song WHERE languages = 'english') Context: CREATE TABLE song (song_name VARCHAR, rating INTEGER, languages VARCHAR) [/INST] Based on the provided SQL query and context, your question is: What are the names of the songs whose rating is below the rating of all songs in English? The answer to your question is: SELECT song_name FROM song WHERE rating < (SELECT MIN(rating) FROM song WHERE languages = 'english'). [/s>
SELECT f_id FROM song WHERE resolution > (SELECT MAX(resolution) FROM song WHERE rating < 8)
CREATE TABLE song (f_id VARCHAR, resolution INTEGER, rating INTEGER)
What is ids of the songs whose resolution is higher than the resolution of any songs with rating lower than 8?
<s>[INST] Given the following SQL query and context: Query: SELECT f_id FROM song WHERE resolution > (SELECT MAX(resolution) FROM song WHERE rating < 8) Context: CREATE TABLE song (f_id VARCHAR, resolution INTEGER, rating INTEGER) [/INST] Based on the provided SQL query and context, your question is: What is ids of the songs whose resolution is higher than the resolution of any songs with rating lower than 8? The answer to your question is: SELECT f_id FROM song WHERE resolution > (SELECT MAX(resolution) FROM song WHERE rating < 8). [/s>
SELECT f_id FROM song WHERE resolution > (SELECT AVG(resolution) FROM song WHERE genre_is = "modern")
CREATE TABLE song (f_id VARCHAR, resolution INTEGER, genre_is VARCHAR)
What is ids of the songs whose resolution is higher than the average resolution of songs in modern genre?
<s>[INST] Given the following SQL query and context: Query: SELECT f_id FROM song WHERE resolution > (SELECT AVG(resolution) FROM song WHERE genre_is = "modern") Context: CREATE TABLE song (f_id VARCHAR, resolution INTEGER, genre_is VARCHAR) [/INST] Based on the provided SQL query and context, your question is: What is ids of the songs whose resolution is higher than the average resolution of songs in modern genre? The answer to your question is: SELECT f_id FROM song WHERE resolution > (SELECT AVG(resolution) FROM song WHERE genre_is = "modern"). [/s>
SELECT T1.artist_name FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name WHERE T2.languages = "bangla" GROUP BY T2.artist_name ORDER BY COUNT(*) DESC LIMIT 3
CREATE TABLE song (artist_name VARCHAR, languages VARCHAR); CREATE TABLE artist (artist_name VARCHAR)
Find the top 3 artists who have the largest number of songs works whose language is Bangla.
<s>[INST] Given the following SQL query and context: Query: SELECT T1.artist_name FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name WHERE T2.languages = "bangla" GROUP BY T2.artist_name ORDER BY COUNT(*) DESC LIMIT 3 Context: CREATE TABLE song (artist_name VARCHAR, languages VARCHAR); CREATE TABLE artist (artist_name VARCHAR) [/INST] Based on the provided SQL query and context, your question is: Find the top 3 artists who have the largest number of songs works whose language is Bangla. The answer to your question is: SELECT T1.artist_name FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name WHERE T2.languages = "bangla" GROUP BY T2.artist_name ORDER BY COUNT(*) DESC LIMIT 3. [/s>
SELECT f_id, genre_is, artist_name FROM song WHERE languages = "english" ORDER BY rating
CREATE TABLE song (f_id VARCHAR, genre_is VARCHAR, artist_name VARCHAR, languages VARCHAR, rating VARCHAR)
List the id, genre and artist name of English songs ordered by rating.
<s>[INST] Given the following SQL query and context: Query: SELECT f_id, genre_is, artist_name FROM song WHERE languages = "english" ORDER BY rating Context: CREATE TABLE song (f_id VARCHAR, genre_is VARCHAR, artist_name VARCHAR, languages VARCHAR, rating VARCHAR) [/INST] Based on the provided SQL query and context, your question is: List the id, genre and artist name of English songs ordered by rating. The answer to your question is: SELECT f_id, genre_is, artist_name FROM song WHERE languages = "english" ORDER BY rating. [/s>
SELECT T1.duration, T1.file_size, T1.formats FROM files AS T1 JOIN song AS T2 ON T1.f_id = T2.f_id WHERE T2.genre_is = "pop" ORDER BY T2.song_name
CREATE TABLE song (f_id VARCHAR, genre_is VARCHAR, song_name VARCHAR); CREATE TABLE files (duration VARCHAR, file_size VARCHAR, formats VARCHAR, f_id VARCHAR)
List the duration, file size and format of songs whose genre is pop, ordered by title?
<s>[INST] Given the following SQL query and context: Query: SELECT T1.duration, T1.file_size, T1.formats FROM files AS T1 JOIN song AS T2 ON T1.f_id = T2.f_id WHERE T2.genre_is = "pop" ORDER BY T2.song_name Context: CREATE TABLE song (f_id VARCHAR, genre_is VARCHAR, song_name VARCHAR); CREATE TABLE files (duration VARCHAR, file_size VARCHAR, formats VARCHAR, f_id VARCHAR) [/INST] Based on the provided SQL query and context, your question is: List the duration, file size and format of songs whose genre is pop, ordered by title? The answer to your question is: SELECT T1.duration, T1.file_size, T1.formats FROM files AS T1 JOIN song AS T2 ON T1.f_id = T2.f_id WHERE T2.genre_is = "pop" ORDER BY T2.song_name. [/s>
SELECT DISTINCT artist_name FROM song WHERE languages = "english" EXCEPT SELECT DISTINCT artist_name FROM song WHERE rating > 8
CREATE TABLE song (artist_name VARCHAR, languages VARCHAR, rating INTEGER)
Find the names of the artists who have produced English songs but have never received rating higher than 8.
<s>[INST] Given the following SQL query and context: Query: SELECT DISTINCT artist_name FROM song WHERE languages = "english" EXCEPT SELECT DISTINCT artist_name FROM song WHERE rating > 8 Context: CREATE TABLE song (artist_name VARCHAR, languages VARCHAR, rating INTEGER) [/INST] Based on the provided SQL query and context, your question is: Find the names of the artists who have produced English songs but have never received rating higher than 8. The answer to your question is: SELECT DISTINCT artist_name FROM song WHERE languages = "english" EXCEPT SELECT DISTINCT artist_name FROM song WHERE rating > 8. [/s>
SELECT DISTINCT artist_name FROM artist WHERE country = "Bangladesh" EXCEPT SELECT DISTINCT artist_name FROM song WHERE rating > 7
CREATE TABLE artist (artist_name VARCHAR, country VARCHAR, rating INTEGER); CREATE TABLE song (artist_name VARCHAR, country VARCHAR, rating INTEGER)
Find the names of the artists who are from Bangladesh and have never received rating higher than 7.
<s>[INST] Given the following SQL query and context: Query: SELECT DISTINCT artist_name FROM artist WHERE country = "Bangladesh" EXCEPT SELECT DISTINCT artist_name FROM song WHERE rating > 7 Context: CREATE TABLE artist (artist_name VARCHAR, country VARCHAR, rating INTEGER); CREATE TABLE song (artist_name VARCHAR, country VARCHAR, rating INTEGER) [/INST] Based on the provided SQL query and context, your question is: Find the names of the artists who are from Bangladesh and have never received rating higher than 7. The answer to your question is: SELECT DISTINCT artist_name FROM artist WHERE country = "Bangladesh" EXCEPT SELECT DISTINCT artist_name FROM song WHERE rating > 7. [/s>
SELECT T1.name_full, T1.college_id FROM college AS T1 JOIN player_college AS T2 ON T1.college_id = T2.college_id GROUP BY T1.college_id ORDER BY COUNT(*) DESC LIMIT 1
CREATE TABLE player_college (college_id VARCHAR); CREATE TABLE college (name_full VARCHAR, college_id VARCHAR)
what is the full name and id of the college with the largest number of baseball players?
<s>[INST] Given the following SQL query and context: Query: SELECT T1.name_full, T1.college_id FROM college AS T1 JOIN player_college AS T2 ON T1.college_id = T2.college_id GROUP BY T1.college_id ORDER BY COUNT(*) DESC LIMIT 1 Context: CREATE TABLE player_college (college_id VARCHAR); CREATE TABLE college (name_full VARCHAR, college_id VARCHAR) [/INST] Based on the provided SQL query and context, your question is: what is the full name and id of the college with the largest number of baseball players? The answer to your question is: SELECT T1.name_full, T1.college_id FROM college AS T1 JOIN player_college AS T2 ON T1.college_id = T2.college_id GROUP BY T1.college_id ORDER BY COUNT(*) DESC LIMIT 1. [/s>
SELECT AVG(T1.salary) FROM salary AS T1 JOIN team AS T2 ON T1.team_id = T2.team_id_br WHERE T2.name = 'Boston Red Stockings'
CREATE TABLE salary (salary INTEGER, team_id VARCHAR); CREATE TABLE team (team_id_br VARCHAR, name VARCHAR)
What is average salary of the players in the team named 'Boston Red Stockings' ?
<s>[INST] Given the following SQL query and context: Query: SELECT AVG(T1.salary) FROM salary AS T1 JOIN team AS T2 ON T1.team_id = T2.team_id_br WHERE T2.name = 'Boston Red Stockings' Context: CREATE TABLE salary (salary INTEGER, team_id VARCHAR); CREATE TABLE team (team_id_br VARCHAR, name VARCHAR) [/INST] Based on the provided SQL query and context, your question is: What is average salary of the players in the team named 'Boston Red Stockings' ? The answer to your question is: SELECT AVG(T1.salary) FROM salary AS T1 JOIN team AS T2 ON T1.team_id = T2.team_id_br WHERE T2.name = 'Boston Red Stockings'. [/s>
SELECT name_first, name_last FROM player AS T1 JOIN all_star AS T2 ON T1.player_id = T2.player_id WHERE YEAR = 1998
CREATE TABLE all_star (player_id VARCHAR); CREATE TABLE player (player_id VARCHAR)
What are first and last names of players participating in all star game in 1998?
<s>[INST] Given the following SQL query and context: Query: SELECT name_first, name_last FROM player AS T1 JOIN all_star AS T2 ON T1.player_id = T2.player_id WHERE YEAR = 1998 Context: CREATE TABLE all_star (player_id VARCHAR); CREATE TABLE player (player_id VARCHAR) [/INST] Based on the provided SQL query and context, your question is: What are first and last names of players participating in all star game in 1998? The answer to your question is: SELECT name_first, name_last FROM player AS T1 JOIN all_star AS T2 ON T1.player_id = T2.player_id WHERE YEAR = 1998. [/s>
SELECT T1.name_first, T1.name_last, T1.player_id, COUNT(*) FROM player AS T1 JOIN all_star AS T2 ON T1.player_id = T2.player_id GROUP BY T1.player_id ORDER BY COUNT(*) DESC LIMIT 1
CREATE TABLE player (name_first VARCHAR, name_last VARCHAR, player_id VARCHAR); CREATE TABLE all_star (player_id VARCHAR)
What are the first name, last name and id of the player with the most all star game experiences? Also list the count.
<s>[INST] Given the following SQL query and context: Query: SELECT T1.name_first, T1.name_last, T1.player_id, COUNT(*) FROM player AS T1 JOIN all_star AS T2 ON T1.player_id = T2.player_id GROUP BY T1.player_id ORDER BY COUNT(*) DESC LIMIT 1 Context: CREATE TABLE player (name_first VARCHAR, name_last VARCHAR, player_id VARCHAR); CREATE TABLE all_star (player_id VARCHAR) [/INST] Based on the provided SQL query and context, your question is: What are the first name, last name and id of the player with the most all star game experiences? Also list the count. The answer to your question is: SELECT T1.name_first, T1.name_last, T1.player_id, COUNT(*) FROM player AS T1 JOIN all_star AS T2 ON T1.player_id = T2.player_id GROUP BY T1.player_id ORDER BY COUNT(*) DESC LIMIT 1. [/s>
SELECT yearid, COUNT(*) FROM hall_of_fame GROUP BY yearid
CREATE TABLE hall_of_fame (yearid VARCHAR)
How many players enter hall of fame each year?
<s>[INST] Given the following SQL query and context: Query: SELECT yearid, COUNT(*) FROM hall_of_fame GROUP BY yearid Context: CREATE TABLE hall_of_fame (yearid VARCHAR) [/INST] Based on the provided SQL query and context, your question is: How many players enter hall of fame each year? The answer to your question is: SELECT yearid, COUNT(*) FROM hall_of_fame GROUP BY yearid. [/s>
SELECT YEAR, AVG(attendance) FROM home_game GROUP BY YEAR
CREATE TABLE home_game (YEAR VARCHAR, attendance INTEGER)
What is the average number of attendance at home games for each year?
<s>[INST] Given the following SQL query and context: Query: SELECT YEAR, AVG(attendance) FROM home_game GROUP BY YEAR Context: CREATE TABLE home_game (YEAR VARCHAR, attendance INTEGER) [/INST] Based on the provided SQL query and context, your question is: What is the average number of attendance at home games for each year? The answer to your question is: SELECT YEAR, AVG(attendance) FROM home_game GROUP BY YEAR. [/s>
SELECT T2.team_id, T2.rank FROM home_game AS T1 JOIN team AS T2 ON T1.team_id = T2.team_id WHERE T1.year = 2014 GROUP BY T1.team_id ORDER BY AVG(T1.attendance) DESC LIMIT 1
CREATE TABLE team (team_id VARCHAR, rank VARCHAR); CREATE TABLE home_game (team_id VARCHAR, year VARCHAR, attendance INTEGER)
In 2014, what are the id and rank of the team that has the largest average number of attendance?
<s>[INST] Given the following SQL query and context: Query: SELECT T2.team_id, T2.rank FROM home_game AS T1 JOIN team AS T2 ON T1.team_id = T2.team_id WHERE T1.year = 2014 GROUP BY T1.team_id ORDER BY AVG(T1.attendance) DESC LIMIT 1 Context: CREATE TABLE team (team_id VARCHAR, rank VARCHAR); CREATE TABLE home_game (team_id VARCHAR, year VARCHAR, attendance INTEGER) [/INST] Based on the provided SQL query and context, your question is: In 2014, what are the id and rank of the team that has the largest average number of attendance? The answer to your question is: SELECT T2.team_id, T2.rank FROM home_game AS T1 JOIN team AS T2 ON T1.team_id = T2.team_id WHERE T1.year = 2014 GROUP BY T1.team_id ORDER BY AVG(T1.attendance) DESC LIMIT 1. [/s>
SELECT T1.name_first, T1.name_last, T2.player_id FROM player AS T1 JOIN manager_award AS T2 ON T1.player_id = T2.player_id GROUP BY T2.player_id ORDER BY COUNT(*) DESC LIMIT 1
CREATE TABLE player (name_first VARCHAR, name_last VARCHAR, player_id VARCHAR); CREATE TABLE manager_award (player_id VARCHAR)
What are the manager's first name, last name and id who won the most manager award?
<s>[INST] Given the following SQL query and context: Query: SELECT T1.name_first, T1.name_last, T2.player_id FROM player AS T1 JOIN manager_award AS T2 ON T1.player_id = T2.player_id GROUP BY T2.player_id ORDER BY COUNT(*) DESC LIMIT 1 Context: CREATE TABLE player (name_first VARCHAR, name_last VARCHAR, player_id VARCHAR); CREATE TABLE manager_award (player_id VARCHAR) [/INST] Based on the provided SQL query and context, your question is: What are the manager's first name, last name and id who won the most manager award? The answer to your question is: SELECT T1.name_first, T1.name_last, T2.player_id FROM player AS T1 JOIN manager_award AS T2 ON T1.player_id = T2.player_id GROUP BY T2.player_id ORDER BY COUNT(*) DESC LIMIT 1. [/s>
SELECT COUNT(*) FROM park WHERE state = 'NY'
CREATE TABLE park (state VARCHAR)
How many parks are there in the state of NY?
<s>[INST] Given the following SQL query and context: Query: SELECT COUNT(*) FROM park WHERE state = 'NY' Context: CREATE TABLE park (state VARCHAR) [/INST] Based on the provided SQL query and context, your question is: How many parks are there in the state of NY? The answer to your question is: SELECT COUNT(*) FROM park WHERE state = 'NY'. [/s>
SELECT T1.name_first, T1.name_last, T1.player_id FROM player AS T1 JOIN player_award AS T2 ON T1.player_id = T2.player_id GROUP BY T1.player_id ORDER BY COUNT(*) DESC LIMIT 3
CREATE TABLE player (name_first VARCHAR, name_last VARCHAR, player_id VARCHAR); CREATE TABLE player_award (player_id VARCHAR)
Which 3 players won the most player awards? List their full name and id.
<s>[INST] Given the following SQL query and context: Query: SELECT T1.name_first, T1.name_last, T1.player_id FROM player AS T1 JOIN player_award AS T2 ON T1.player_id = T2.player_id GROUP BY T1.player_id ORDER BY COUNT(*) DESC LIMIT 3 Context: CREATE TABLE player (name_first VARCHAR, name_last VARCHAR, player_id VARCHAR); CREATE TABLE player_award (player_id VARCHAR) [/INST] Based on the provided SQL query and context, your question is: Which 3 players won the most player awards? List their full name and id. The answer to your question is: SELECT T1.name_first, T1.name_last, T1.player_id FROM player AS T1 JOIN player_award AS T2 ON T1.player_id = T2.player_id GROUP BY T1.player_id ORDER BY COUNT(*) DESC LIMIT 3. [/s>
SELECT birth_country FROM player GROUP BY birth_country ORDER BY COUNT(*) LIMIT 3
CREATE TABLE player (birth_country VARCHAR)
List three countries which are the origins of the least players.
<s>[INST] Given the following SQL query and context: Query: SELECT birth_country FROM player GROUP BY birth_country ORDER BY COUNT(*) LIMIT 3 Context: CREATE TABLE player (birth_country VARCHAR) [/INST] Based on the provided SQL query and context, your question is: List three countries which are the origins of the least players. The answer to your question is: SELECT birth_country FROM player GROUP BY birth_country ORDER BY COUNT(*) LIMIT 3. [/s>
SELECT name_first, name_last FROM player WHERE death_year = ''
CREATE TABLE player (name_first VARCHAR, name_last VARCHAR, death_year VARCHAR)
Find all the players' first name and last name who have empty death record.
<s>[INST] Given the following SQL query and context: Query: SELECT name_first, name_last FROM player WHERE death_year = '' Context: CREATE TABLE player (name_first VARCHAR, name_last VARCHAR, death_year VARCHAR) [/INST] Based on the provided SQL query and context, your question is: Find all the players' first name and last name who have empty death record. The answer to your question is: SELECT name_first, name_last FROM player WHERE death_year = ''. [/s>
SELECT COUNT(*) FROM player WHERE birth_country = 'USA' AND bats = 'R'
CREATE TABLE player (birth_country VARCHAR, bats VARCHAR)
How many players born in USA are right-handed batters? That is, have the batter value 'R'.
<s>[INST] Given the following SQL query and context: Query: SELECT COUNT(*) FROM player WHERE birth_country = 'USA' AND bats = 'R' Context: CREATE TABLE player (birth_country VARCHAR, bats VARCHAR) [/INST] Based on the provided SQL query and context, your question is: How many players born in USA are right-handed batters? That is, have the batter value 'R'. The answer to your question is: SELECT COUNT(*) FROM player WHERE birth_country = 'USA' AND bats = 'R'. [/s>
SELECT AVG(T1.height) FROM player AS T1 JOIN player_college AS T2 ON T1.player_id = T2.player_id JOIN college AS T3 ON T3.college_id = T2.college_id WHERE T3.name_full = 'Yale University'
CREATE TABLE player_college (player_id VARCHAR, college_id VARCHAR); CREATE TABLE player (height INTEGER, player_id VARCHAR); CREATE TABLE college (college_id VARCHAR, name_full VARCHAR)
What is the average height of the players from the college named 'Yale University'?
<s>[INST] Given the following SQL query and context: Query: SELECT AVG(T1.height) FROM player AS T1 JOIN player_college AS T2 ON T1.player_id = T2.player_id JOIN college AS T3 ON T3.college_id = T2.college_id WHERE T3.name_full = 'Yale University' Context: CREATE TABLE player_college (player_id VARCHAR, college_id VARCHAR); CREATE TABLE player (height INTEGER, player_id VARCHAR); CREATE TABLE college (college_id VARCHAR, name_full VARCHAR) [/INST] Based on the provided SQL query and context, your question is: What is the average height of the players from the college named 'Yale University'? The answer to your question is: SELECT AVG(T1.height) FROM player AS T1 JOIN player_college AS T2 ON T1.player_id = T2.player_id JOIN college AS T3 ON T3.college_id = T2.college_id WHERE T3.name_full = 'Yale University'. [/s>
SELECT T1.name, T1.team_id, MAX(T2.salary) FROM team AS T1 JOIN salary AS T2 ON T1.team_id = T2.team_id GROUP BY T1.team_id
CREATE TABLE salary (salary INTEGER, team_id VARCHAR); CREATE TABLE team (name VARCHAR, team_id VARCHAR)
What is the highest salary among each team? List the team name, id and maximum salary.
<s>[INST] Given the following SQL query and context: Query: SELECT T1.name, T1.team_id, MAX(T2.salary) FROM team AS T1 JOIN salary AS T2 ON T1.team_id = T2.team_id GROUP BY T1.team_id Context: CREATE TABLE salary (salary INTEGER, team_id VARCHAR); CREATE TABLE team (name VARCHAR, team_id VARCHAR) [/INST] Based on the provided SQL query and context, your question is: What is the highest salary among each team? List the team name, id and maximum salary. The answer to your question is: SELECT T1.name, T1.team_id, MAX(T2.salary) FROM team AS T1 JOIN salary AS T2 ON T1.team_id = T2.team_id GROUP BY T1.team_id. [/s>
SELECT T1.name, T1.team_id FROM team AS T1 JOIN salary AS T2 ON T1.team_id = T2.team_id GROUP BY T1.team_id ORDER BY AVG(T2.salary) LIMIT 1
CREATE TABLE team (name VARCHAR, team_id VARCHAR); CREATE TABLE salary (team_id VARCHAR, salary INTEGER)
What are the name and id of the team offering the lowest average salary?
<s>[INST] Given the following SQL query and context: Query: SELECT T1.name, T1.team_id FROM team AS T1 JOIN salary AS T2 ON T1.team_id = T2.team_id GROUP BY T1.team_id ORDER BY AVG(T2.salary) LIMIT 1 Context: CREATE TABLE team (name VARCHAR, team_id VARCHAR); CREATE TABLE salary (team_id VARCHAR, salary INTEGER) [/INST] Based on the provided SQL query and context, your question is: What are the name and id of the team offering the lowest average salary? The answer to your question is: SELECT T1.name, T1.team_id FROM team AS T1 JOIN salary AS T2 ON T1.team_id = T2.team_id GROUP BY T1.team_id ORDER BY AVG(T2.salary) LIMIT 1. [/s>
SELECT T1.name_first, T1.name_last FROM player AS T1 JOIN player_award AS T2 WHERE T2.year = 1960 INTERSECT SELECT T1.name_first, T1.name_last FROM player AS T1 JOIN player_award AS T2 WHERE T2.year = 1961
CREATE TABLE player (name_first VARCHAR, name_last VARCHAR); CREATE TABLE player_award (year VARCHAR)
Find the players' first name and last name who won award both in 1960 and in 1961.
<s>[INST] Given the following SQL query and context: Query: SELECT T1.name_first, T1.name_last FROM player AS T1 JOIN player_award AS T2 WHERE T2.year = 1960 INTERSECT SELECT T1.name_first, T1.name_last FROM player AS T1 JOIN player_award AS T2 WHERE T2.year = 1961 Context: CREATE TABLE player (name_first VARCHAR, name_last VARCHAR); CREATE TABLE player_award (year VARCHAR) [/INST] Based on the provided SQL query and context, your question is: Find the players' first name and last name who won award both in 1960 and in 1961. The answer to your question is: SELECT T1.name_first, T1.name_last FROM player AS T1 JOIN player_award AS T2 WHERE T2.year = 1960 INTERSECT SELECT T1.name_first, T1.name_last FROM player AS T1 JOIN player_award AS T2 WHERE T2.year = 1961. [/s>
SELECT name_first, name_last FROM player WHERE weight > 220 OR height < 75
CREATE TABLE player (name_first VARCHAR, name_last VARCHAR, weight VARCHAR, height VARCHAR)
List players' first name and last name who have weight greater than 220 or height shorter than 75.
<s>[INST] Given the following SQL query and context: Query: SELECT name_first, name_last FROM player WHERE weight > 220 OR height < 75 Context: CREATE TABLE player (name_first VARCHAR, name_last VARCHAR, weight VARCHAR, height VARCHAR) [/INST] Based on the provided SQL query and context, your question is: List players' first name and last name who have weight greater than 220 or height shorter than 75. The answer to your question is: SELECT name_first, name_last FROM player WHERE weight > 220 OR height < 75. [/s>
SELECT MAX(T1.wins) FROM postseason AS T1 JOIN team AS T2 ON T1.team_id_winner = T2.team_id_br WHERE T2.name = 'Boston Red Stockings'
CREATE TABLE team (team_id_br VARCHAR, name VARCHAR); CREATE TABLE postseason (wins INTEGER, team_id_winner VARCHAR)
List the maximum scores of the team Boston Red Stockings when the team won in postseason?
<s>[INST] Given the following SQL query and context: Query: SELECT MAX(T1.wins) FROM postseason AS T1 JOIN team AS T2 ON T1.team_id_winner = T2.team_id_br WHERE T2.name = 'Boston Red Stockings' Context: CREATE TABLE team (team_id_br VARCHAR, name VARCHAR); CREATE TABLE postseason (wins INTEGER, team_id_winner VARCHAR) [/INST] Based on the provided SQL query and context, your question is: List the maximum scores of the team Boston Red Stockings when the team won in postseason? The answer to your question is: SELECT MAX(T1.wins) FROM postseason AS T1 JOIN team AS T2 ON T1.team_id_winner = T2.team_id_br WHERE T2.name = 'Boston Red Stockings'. [/s>
SELECT COUNT(*) FROM postseason AS T1 JOIN team AS T2 ON T1.team_id_loser = T2.team_id_br WHERE T2.name = 'Boston Red Stockings' AND T1.year = 2009
CREATE TABLE postseason (team_id_loser VARCHAR, year VARCHAR); CREATE TABLE team (team_id_br VARCHAR, name VARCHAR)
How many times did Boston Red Stockings lose in 2009 postseason?
<s>[INST] Given the following SQL query and context: Query: SELECT COUNT(*) FROM postseason AS T1 JOIN team AS T2 ON T1.team_id_loser = T2.team_id_br WHERE T2.name = 'Boston Red Stockings' AND T1.year = 2009 Context: CREATE TABLE postseason (team_id_loser VARCHAR, year VARCHAR); CREATE TABLE team (team_id_br VARCHAR, name VARCHAR) [/INST] Based on the provided SQL query and context, your question is: How many times did Boston Red Stockings lose in 2009 postseason? The answer to your question is: SELECT COUNT(*) FROM postseason AS T1 JOIN team AS T2 ON T1.team_id_loser = T2.team_id_br WHERE T2.name = 'Boston Red Stockings' AND T1.year = 2009. [/s>
SELECT T2.name, T1.team_id_winner FROM postseason AS T1 JOIN team AS T2 ON T1.team_id_winner = T2.team_id_br WHERE T1.year = 2008 GROUP BY T1.team_id_winner ORDER BY COUNT(*) DESC LIMIT 1
CREATE TABLE postseason (team_id_winner VARCHAR, year VARCHAR); CREATE TABLE team (name VARCHAR, team_id_br VARCHAR)
What are the name and id of the team with the most victories in 2008 postseason?
<s>[INST] Given the following SQL query and context: Query: SELECT T2.name, T1.team_id_winner FROM postseason AS T1 JOIN team AS T2 ON T1.team_id_winner = T2.team_id_br WHERE T1.year = 2008 GROUP BY T1.team_id_winner ORDER BY COUNT(*) DESC LIMIT 1 Context: CREATE TABLE postseason (team_id_winner VARCHAR, year VARCHAR); CREATE TABLE team (name VARCHAR, team_id_br VARCHAR) [/INST] Based on the provided SQL query and context, your question is: What are the name and id of the team with the most victories in 2008 postseason? The answer to your question is: SELECT T2.name, T1.team_id_winner FROM postseason AS T1 JOIN team AS T2 ON T1.team_id_winner = T2.team_id_br WHERE T1.year = 2008 GROUP BY T1.team_id_winner ORDER BY COUNT(*) DESC LIMIT 1. [/s>
SELECT COUNT(*), T1.year FROM postseason AS T1 JOIN team AS T2 ON T1.team_id_winner = T2.team_id_br WHERE T2.name = 'Boston Red Stockings' GROUP BY T1.year
CREATE TABLE team (team_id_br VARCHAR, name VARCHAR); CREATE TABLE postseason (year VARCHAR, team_id_winner VARCHAR)
What is the number of wins the team Boston Red Stockings got in the postseasons each year in history?
<s>[INST] Given the following SQL query and context: Query: SELECT COUNT(*), T1.year FROM postseason AS T1 JOIN team AS T2 ON T1.team_id_winner = T2.team_id_br WHERE T2.name = 'Boston Red Stockings' GROUP BY T1.year Context: CREATE TABLE team (team_id_br VARCHAR, name VARCHAR); CREATE TABLE postseason (year VARCHAR, team_id_winner VARCHAR) [/INST] Based on the provided SQL query and context, your question is: What is the number of wins the team Boston Red Stockings got in the postseasons each year in history? The answer to your question is: SELECT COUNT(*), T1.year FROM postseason AS T1 JOIN team AS T2 ON T1.team_id_winner = T2.team_id_br WHERE T2.name = 'Boston Red Stockings' GROUP BY T1.year. [/s>
SELECT COUNT(*) FROM (SELECT * FROM postseason AS T1 JOIN team AS T2 ON T1.team_id_winner = T2.team_id_br WHERE T2.name = 'Boston Red Stockings' UNION SELECT * FROM postseason AS T1 JOIN team AS T2 ON T1.team_id_loser = T2.team_id_br WHERE T2.name = 'Boston Red Stockings')
CREATE TABLE postseason (team_id_winner VARCHAR, team_id_loser VARCHAR); CREATE TABLE team (team_id_br VARCHAR, name VARCHAR)
What is the total number of postseason games that team Boston Red Stockings participated in?
<s>[INST] Given the following SQL query and context: Query: SELECT COUNT(*) FROM (SELECT * FROM postseason AS T1 JOIN team AS T2 ON T1.team_id_winner = T2.team_id_br WHERE T2.name = 'Boston Red Stockings' UNION SELECT * FROM postseason AS T1 JOIN team AS T2 ON T1.team_id_loser = T2.team_id_br WHERE T2.name = 'Boston Red Stockings') Context: CREATE TABLE postseason (team_id_winner VARCHAR, team_id_loser VARCHAR); CREATE TABLE team (team_id_br VARCHAR, name VARCHAR) [/INST] Based on the provided SQL query and context, your question is: What is the total number of postseason games that team Boston Red Stockings participated in? The answer to your question is: SELECT COUNT(*) FROM (SELECT * FROM postseason AS T1 JOIN team AS T2 ON T1.team_id_winner = T2.team_id_br WHERE T2.name = 'Boston Red Stockings' UNION SELECT * FROM postseason AS T1 JOIN team AS T2 ON T1.team_id_loser = T2.team_id_br WHERE T2.name = 'Boston Red Stockings'). [/s>
SELECT COUNT(*) FROM postseason WHERE YEAR = 1885 AND ties = 1
CREATE TABLE postseason (YEAR VARCHAR, ties VARCHAR)
How many games in 1885 postseason resulted in ties (that is, the value of "ties" is '1')?
<s>[INST] Given the following SQL query and context: Query: SELECT COUNT(*) FROM postseason WHERE YEAR = 1885 AND ties = 1 Context: CREATE TABLE postseason (YEAR VARCHAR, ties VARCHAR) [/INST] Based on the provided SQL query and context, your question is: How many games in 1885 postseason resulted in ties (that is, the value of "ties" is '1')? The answer to your question is: SELECT COUNT(*) FROM postseason WHERE YEAR = 1885 AND ties = 1. [/s>
SELECT SUM(T1.salary) FROM salary AS T1 JOIN team AS T2 ON T1.team_id = T2.team_id_br WHERE T2.name = 'Boston Red Stockings' AND T1.year = 2010
CREATE TABLE salary (salary INTEGER, team_id VARCHAR, year VARCHAR); CREATE TABLE team (team_id_br VARCHAR, name VARCHAR)
What is the total salary paid by team Boston Red Stockings in 2010?
<s>[INST] Given the following SQL query and context: Query: SELECT SUM(T1.salary) FROM salary AS T1 JOIN team AS T2 ON T1.team_id = T2.team_id_br WHERE T2.name = 'Boston Red Stockings' AND T1.year = 2010 Context: CREATE TABLE salary (salary INTEGER, team_id VARCHAR, year VARCHAR); CREATE TABLE team (team_id_br VARCHAR, name VARCHAR) [/INST] Based on the provided SQL query and context, your question is: What is the total salary paid by team Boston Red Stockings in 2010? The answer to your question is: SELECT SUM(T1.salary) FROM salary AS T1 JOIN team AS T2 ON T1.team_id = T2.team_id_br WHERE T2.name = 'Boston Red Stockings' AND T1.year = 2010. [/s>
SELECT COUNT(*) FROM salary AS T1 JOIN team AS T2 ON T1.team_id = T2.team_id_br WHERE T2.name = 'Boston Red Stockings' AND T1.year = 2000
CREATE TABLE salary (team_id VARCHAR, year VARCHAR); CREATE TABLE team (team_id_br VARCHAR, name VARCHAR)
How many players were in the team Boston Red Stockings in 2000?
<s>[INST] Given the following SQL query and context: Query: SELECT COUNT(*) FROM salary AS T1 JOIN team AS T2 ON T1.team_id = T2.team_id_br WHERE T2.name = 'Boston Red Stockings' AND T1.year = 2000 Context: CREATE TABLE salary (team_id VARCHAR, year VARCHAR); CREATE TABLE team (team_id_br VARCHAR, name VARCHAR) [/INST] Based on the provided SQL query and context, your question is: How many players were in the team Boston Red Stockings in 2000? The answer to your question is: SELECT COUNT(*) FROM salary AS T1 JOIN team AS T2 ON T1.team_id = T2.team_id_br WHERE T2.name = 'Boston Red Stockings' AND T1.year = 2000. [/s>
SELECT salary FROM salary WHERE YEAR = 2001 ORDER BY salary DESC LIMIT 3
CREATE TABLE salary (salary VARCHAR, YEAR VARCHAR)
List the 3 highest salaries of the players in 2001?
<s>[INST] Given the following SQL query and context: Query: SELECT salary FROM salary WHERE YEAR = 2001 ORDER BY salary DESC LIMIT 3 Context: CREATE TABLE salary (salary VARCHAR, YEAR VARCHAR) [/INST] Based on the provided SQL query and context, your question is: List the 3 highest salaries of the players in 2001? The answer to your question is: SELECT salary FROM salary WHERE YEAR = 2001 ORDER BY salary DESC LIMIT 3. [/s>
SELECT salary FROM salary WHERE YEAR = 2010 UNION SELECT salary FROM salary WHERE YEAR = 2001
CREATE TABLE salary (salary VARCHAR, YEAR VARCHAR)
What were all the salary values of players in 2010 and 2001?
<s>[INST] Given the following SQL query and context: Query: SELECT salary FROM salary WHERE YEAR = 2010 UNION SELECT salary FROM salary WHERE YEAR = 2001 Context: CREATE TABLE salary (salary VARCHAR, YEAR VARCHAR) [/INST] Based on the provided SQL query and context, your question is: What were all the salary values of players in 2010 and 2001? The answer to your question is: SELECT salary FROM salary WHERE YEAR = 2010 UNION SELECT salary FROM salary WHERE YEAR = 2001. [/s>
SELECT yearid FROM hall_of_fame GROUP BY yearid ORDER BY COUNT(*) LIMIT 1
CREATE TABLE hall_of_fame (yearid VARCHAR)
In which year did the least people enter hall of fame?
<s>[INST] Given the following SQL query and context: Query: SELECT yearid FROM hall_of_fame GROUP BY yearid ORDER BY COUNT(*) LIMIT 1 Context: CREATE TABLE hall_of_fame (yearid VARCHAR) [/INST] Based on the provided SQL query and context, your question is: In which year did the least people enter hall of fame? The answer to your question is: SELECT yearid FROM hall_of_fame GROUP BY yearid ORDER BY COUNT(*) LIMIT 1. [/s>
SELECT COUNT(*) FROM park WHERE city = 'Atlanta'
CREATE TABLE park (city VARCHAR)
How many parks are there in Atlanta city?
<s>[INST] Given the following SQL query and context: Query: SELECT COUNT(*) FROM park WHERE city = 'Atlanta' Context: CREATE TABLE park (city VARCHAR) [/INST] Based on the provided SQL query and context, your question is: How many parks are there in Atlanta city? The answer to your question is: SELECT COUNT(*) FROM park WHERE city = 'Atlanta'. [/s>
SELECT COUNT(*) FROM home_game AS T1 JOIN park AS T2 ON T1.park_id = T2.park_id WHERE T1.year = 1907 AND T2.park_name = 'Columbia Park'
CREATE TABLE park (park_id VARCHAR, park_name VARCHAR); CREATE TABLE home_game (park_id VARCHAR, year VARCHAR)
How many games were played in park "Columbia Park" in 1907?
<s>[INST] Given the following SQL query and context: Query: SELECT COUNT(*) FROM home_game AS T1 JOIN park AS T2 ON T1.park_id = T2.park_id WHERE T1.year = 1907 AND T2.park_name = 'Columbia Park' Context: CREATE TABLE park (park_id VARCHAR, park_name VARCHAR); CREATE TABLE home_game (park_id VARCHAR, year VARCHAR) [/INST] Based on the provided SQL query and context, your question is: How many games were played in park "Columbia Park" in 1907? The answer to your question is: SELECT COUNT(*) FROM home_game AS T1 JOIN park AS T2 ON T1.park_id = T2.park_id WHERE T1.year = 1907 AND T2.park_name = 'Columbia Park'. [/s>
SELECT COUNT(*) FROM home_game AS T1 JOIN park AS T2 ON T1.park_id = T2.park_id WHERE T1.year = 2000 AND T2.city = 'Atlanta'
CREATE TABLE park (park_id VARCHAR, city VARCHAR); CREATE TABLE home_game (park_id VARCHAR, year VARCHAR)
How many games were played in city Atlanta in 2000?
<s>[INST] Given the following SQL query and context: Query: SELECT COUNT(*) FROM home_game AS T1 JOIN park AS T2 ON T1.park_id = T2.park_id WHERE T1.year = 2000 AND T2.city = 'Atlanta' Context: CREATE TABLE park (park_id VARCHAR, city VARCHAR); CREATE TABLE home_game (park_id VARCHAR, year VARCHAR) [/INST] Based on the provided SQL query and context, your question is: How many games were played in city Atlanta in 2000? The answer to your question is: SELECT COUNT(*) FROM home_game AS T1 JOIN park AS T2 ON T1.park_id = T2.park_id WHERE T1.year = 2000 AND T2.city = 'Atlanta'. [/s>
SELECT SUM(T1.attendance) FROM home_game AS T1 JOIN team AS T2 ON T1.team_id = T2.team_id_br WHERE T2.name = 'Boston Red Stockings' AND T1.year BETWEEN 2000 AND 2010
CREATE TABLE team (team_id_br VARCHAR, name VARCHAR); CREATE TABLE home_game (attendance INTEGER, team_id VARCHAR, year VARCHAR)
What is the total home game attendance of team Boston Red Stockings from 2000 to 2010?
<s>[INST] Given the following SQL query and context: Query: SELECT SUM(T1.attendance) FROM home_game AS T1 JOIN team AS T2 ON T1.team_id = T2.team_id_br WHERE T2.name = 'Boston Red Stockings' AND T1.year BETWEEN 2000 AND 2010 Context: CREATE TABLE team (team_id_br VARCHAR, name VARCHAR); CREATE TABLE home_game (attendance INTEGER, team_id VARCHAR, year VARCHAR) [/INST] Based on the provided SQL query and context, your question is: What is the total home game attendance of team Boston Red Stockings from 2000 to 2010? The answer to your question is: SELECT SUM(T1.attendance) FROM home_game AS T1 JOIN team AS T2 ON T1.team_id = T2.team_id_br WHERE T2.name = 'Boston Red Stockings' AND T1.year BETWEEN 2000 AND 2010. [/s>
SELECT SUM(T1.salary) FROM salary AS T1 JOIN player AS T2 ON T1.player_id = T2.player_id WHERE T2.name_first = 'Len' AND T2.name_last = 'Barker' AND T1.year BETWEEN 1985 AND 1990
CREATE TABLE salary (salary INTEGER, player_id VARCHAR, year VARCHAR); CREATE TABLE player (player_id VARCHAR, name_first VARCHAR, name_last VARCHAR)
How much did the the player with first name Len and last name Barker earn between 1985 to 1990 in total?
<s>[INST] Given the following SQL query and context: Query: SELECT SUM(T1.salary) FROM salary AS T1 JOIN player AS T2 ON T1.player_id = T2.player_id WHERE T2.name_first = 'Len' AND T2.name_last = 'Barker' AND T1.year BETWEEN 1985 AND 1990 Context: CREATE TABLE salary (salary INTEGER, player_id VARCHAR, year VARCHAR); CREATE TABLE player (player_id VARCHAR, name_first VARCHAR, name_last VARCHAR) [/INST] Based on the provided SQL query and context, your question is: How much did the the player with first name Len and last name Barker earn between 1985 to 1990 in total? The answer to your question is: SELECT SUM(T1.salary) FROM salary AS T1 JOIN player AS T2 ON T1.player_id = T2.player_id WHERE T2.name_first = 'Len' AND T2.name_last = 'Barker' AND T1.year BETWEEN 1985 AND 1990. [/s>
SELECT T2.name_first, T2.name_last FROM salary AS T1 JOIN player AS T2 ON T1.player_id = T2.player_id JOIN team AS T3 ON T3.team_id_br = T1.team_id WHERE T1.year = 2005 AND T3.name = 'Washington Nationals' INTERSECT SELECT T2.name_first, T2.name_last FROM salary AS T1 JOIN player AS T2 ON T1.player_id = T2.player_id JOIN team AS T3 ON T3.team_id_br = T1.team_id WHERE T1.year = 2007 AND T3.name = 'Washington Nationals'
CREATE TABLE player (name_first VARCHAR, name_last VARCHAR, player_id VARCHAR); CREATE TABLE team (team_id_br VARCHAR, name VARCHAR); CREATE TABLE salary (player_id VARCHAR, team_id VARCHAR, year VARCHAR)
List players' first name and last name who received salary from team Washington Nationals in both 2005 and 2007.
<s>[INST] Given the following SQL query and context: Query: SELECT T2.name_first, T2.name_last FROM salary AS T1 JOIN player AS T2 ON T1.player_id = T2.player_id JOIN team AS T3 ON T3.team_id_br = T1.team_id WHERE T1.year = 2005 AND T3.name = 'Washington Nationals' INTERSECT SELECT T2.name_first, T2.name_last FROM salary AS T1 JOIN player AS T2 ON T1.player_id = T2.player_id JOIN team AS T3 ON T3.team_id_br = T1.team_id WHERE T1.year = 2007 AND T3.name = 'Washington Nationals' Context: CREATE TABLE player (name_first VARCHAR, name_last VARCHAR, player_id VARCHAR); CREATE TABLE team (team_id_br VARCHAR, name VARCHAR); CREATE TABLE salary (player_id VARCHAR, team_id VARCHAR, year VARCHAR) [/INST] Based on the provided SQL query and context, your question is: List players' first name and last name who received salary from team Washington Nationals in both 2005 and 2007. The answer to your question is: SELECT T2.name_first, T2.name_last FROM salary AS T1 JOIN player AS T2 ON T1.player_id = T2.player_id JOIN team AS T3 ON T3.team_id_br = T1.team_id WHERE T1.year = 2005 AND T3.name = 'Washington Nationals' INTERSECT SELECT T2.name_first, T2.name_last FROM salary AS T1 JOIN player AS T2 ON T1.player_id = T2.player_id JOIN team AS T3 ON T3.team_id_br = T1.team_id WHERE T1.year = 2007 AND T3.name = 'Washington Nationals'. [/s>
SELECT SUM(T1.games) FROM home_game AS T1 JOIN team AS T2 ON T1.team_id = T2.team_id_br WHERE T2.name = 'Boston Red Stockings' AND T1.year BETWEEN 1990 AND 2000
CREATE TABLE team (team_id_br VARCHAR, name VARCHAR); CREATE TABLE home_game (games INTEGER, team_id VARCHAR, year VARCHAR)
How many home games did the team Boston Red Stockings play from 1990 to 2000 in total?
<s>[INST] Given the following SQL query and context: Query: SELECT SUM(T1.games) FROM home_game AS T1 JOIN team AS T2 ON T1.team_id = T2.team_id_br WHERE T2.name = 'Boston Red Stockings' AND T1.year BETWEEN 1990 AND 2000 Context: CREATE TABLE team (team_id_br VARCHAR, name VARCHAR); CREATE TABLE home_game (games INTEGER, team_id VARCHAR, year VARCHAR) [/INST] Based on the provided SQL query and context, your question is: How many home games did the team Boston Red Stockings play from 1990 to 2000 in total? The answer to your question is: SELECT SUM(T1.games) FROM home_game AS T1 JOIN team AS T2 ON T1.team_id = T2.team_id_br WHERE T2.name = 'Boston Red Stockings' AND T1.year BETWEEN 1990 AND 2000. [/s>
SELECT T2.name FROM home_game AS T1 JOIN team AS T2 ON T1.team_id = T2.team_id_br WHERE T1.year = 1980 ORDER BY T1.attendance LIMIT 1
CREATE TABLE home_game (team_id VARCHAR, year VARCHAR, attendance VARCHAR); CREATE TABLE team (name VARCHAR, team_id_br VARCHAR)
Which team had the least number of attendances in home games in 1980?
<s>[INST] Given the following SQL query and context: Query: SELECT T2.name FROM home_game AS T1 JOIN team AS T2 ON T1.team_id = T2.team_id_br WHERE T1.year = 1980 ORDER BY T1.attendance LIMIT 1 Context: CREATE TABLE home_game (team_id VARCHAR, year VARCHAR, attendance VARCHAR); CREATE TABLE team (name VARCHAR, team_id_br VARCHAR) [/INST] Based on the provided SQL query and context, your question is: Which team had the least number of attendances in home games in 1980? The answer to your question is: SELECT T2.name FROM home_game AS T1 JOIN team AS T2 ON T1.team_id = T2.team_id_br WHERE T1.year = 1980 ORDER BY T1.attendance LIMIT 1. [/s>
SELECT state FROM park GROUP BY state HAVING COUNT(*) > 2
CREATE TABLE park (state VARCHAR)
List the names of states that have more than 2 parks.
<s>[INST] Given the following SQL query and context: Query: SELECT state FROM park GROUP BY state HAVING COUNT(*) > 2 Context: CREATE TABLE park (state VARCHAR) [/INST] Based on the provided SQL query and context, your question is: List the names of states that have more than 2 parks. The answer to your question is: SELECT state FROM park GROUP BY state HAVING COUNT(*) > 2. [/s>
SELECT COUNT(*) FROM team_franchise WHERE active = 'Y'
CREATE TABLE team_franchise (active VARCHAR)
How many team franchises are active, with active value 'Y'?
<s>[INST] Given the following SQL query and context: Query: SELECT COUNT(*) FROM team_franchise WHERE active = 'Y' Context: CREATE TABLE team_franchise (active VARCHAR) [/INST] Based on the provided SQL query and context, your question is: How many team franchises are active, with active value 'Y'? The answer to your question is: SELECT COUNT(*) FROM team_franchise WHERE active = 'Y'. [/s>
SELECT city FROM park GROUP BY city HAVING COUNT(*) BETWEEN 2 AND 4
CREATE TABLE park (city VARCHAR)
Which cities have 2 to 4 parks?
<s>[INST] Given the following SQL query and context: Query: SELECT city FROM park GROUP BY city HAVING COUNT(*) BETWEEN 2 AND 4 Context: CREATE TABLE park (city VARCHAR) [/INST] Based on the provided SQL query and context, your question is: Which cities have 2 to 4 parks? The answer to your question is: SELECT city FROM park GROUP BY city HAVING COUNT(*) BETWEEN 2 AND 4. [/s>
SELECT T2.park_name FROM home_game AS T1 JOIN park AS T2 ON T1.park_id = T2.park_id WHERE T1.year = 2008 ORDER BY T1.attendance DESC LIMIT 1
CREATE TABLE park (park_name VARCHAR, park_id VARCHAR); CREATE TABLE home_game (park_id VARCHAR, year VARCHAR, attendance VARCHAR)
Which park had most attendances in 2008?
<s>[INST] Given the following SQL query and context: Query: SELECT T2.park_name FROM home_game AS T1 JOIN park AS T2 ON T1.park_id = T2.park_id WHERE T1.year = 2008 ORDER BY T1.attendance DESC LIMIT 1 Context: CREATE TABLE park (park_name VARCHAR, park_id VARCHAR); CREATE TABLE home_game (park_id VARCHAR, year VARCHAR, attendance VARCHAR) [/INST] Based on the provided SQL query and context, your question is: Which park had most attendances in 2008? The answer to your question is: SELECT T2.park_name FROM home_game AS T1 JOIN park AS T2 ON T1.park_id = T2.park_id WHERE T1.year = 2008 ORDER BY T1.attendance DESC LIMIT 1. [/s>
SELECT COUNT(*) FROM camera_lens WHERE focal_length_mm > 15
CREATE TABLE camera_lens (focal_length_mm INTEGER)
How many camera lenses have a focal length longer than 15 mm?
<s>[INST] Given the following SQL query and context: Query: SELECT COUNT(*) FROM camera_lens WHERE focal_length_mm > 15 Context: CREATE TABLE camera_lens (focal_length_mm INTEGER) [/INST] Based on the provided SQL query and context, your question is: How many camera lenses have a focal length longer than 15 mm? The answer to your question is: SELECT COUNT(*) FROM camera_lens WHERE focal_length_mm > 15. [/s>
SELECT brand, name FROM camera_lens ORDER BY max_aperture DESC
CREATE TABLE camera_lens (brand VARCHAR, name VARCHAR, max_aperture VARCHAR)
Find the brand and name for each camera lens, and sort in descending order of maximum aperture.
<s>[INST] Given the following SQL query and context: Query: SELECT brand, name FROM camera_lens ORDER BY max_aperture DESC Context: CREATE TABLE camera_lens (brand VARCHAR, name VARCHAR, max_aperture VARCHAR) [/INST] Based on the provided SQL query and context, your question is: Find the brand and name for each camera lens, and sort in descending order of maximum aperture. The answer to your question is: SELECT brand, name FROM camera_lens ORDER BY max_aperture DESC. [/s>
SELECT id, color, name FROM photos
CREATE TABLE photos (id VARCHAR, color VARCHAR, name VARCHAR)
List the id, color scheme, and name for all the photos.
<s>[INST] Given the following SQL query and context: Query: SELECT id, color, name FROM photos Context: CREATE TABLE photos (id VARCHAR, color VARCHAR, name VARCHAR) [/INST] Based on the provided SQL query and context, your question is: List the id, color scheme, and name for all the photos. The answer to your question is: SELECT id, color, name FROM photos. [/s>
SELECT MAX(height), AVG(height) FROM mountain
CREATE TABLE mountain (height INTEGER)
What are the maximum and average height of the mountains?
<s>[INST] Given the following SQL query and context: Query: SELECT MAX(height), AVG(height) FROM mountain Context: CREATE TABLE mountain (height INTEGER) [/INST] Based on the provided SQL query and context, your question is: What are the maximum and average height of the mountains? The answer to your question is: SELECT MAX(height), AVG(height) FROM mountain. [/s>
SELECT AVG(prominence) FROM mountain WHERE country = 'Morocco'
CREATE TABLE mountain (prominence INTEGER, country VARCHAR)
What are the average prominence of the mountains in country 'Morocco'?
<s>[INST] Given the following SQL query and context: Query: SELECT AVG(prominence) FROM mountain WHERE country = 'Morocco' Context: CREATE TABLE mountain (prominence INTEGER, country VARCHAR) [/INST] Based on the provided SQL query and context, your question is: What are the average prominence of the mountains in country 'Morocco'? The answer to your question is: SELECT AVG(prominence) FROM mountain WHERE country = 'Morocco'. [/s>
SELECT name, height, prominence FROM mountain WHERE range <> 'Aberdare Range'
CREATE TABLE mountain (name VARCHAR, height VARCHAR, prominence VARCHAR, range VARCHAR)
What are the name, height and prominence of mountains which do not belong to the range 'Aberdare Range'?
<s>[INST] Given the following SQL query and context: Query: SELECT name, height, prominence FROM mountain WHERE range <> 'Aberdare Range' Context: CREATE TABLE mountain (name VARCHAR, height VARCHAR, prominence VARCHAR, range VARCHAR) [/INST] Based on the provided SQL query and context, your question is: What are the name, height and prominence of mountains which do not belong to the range 'Aberdare Range'? The answer to your question is: SELECT name, height, prominence FROM mountain WHERE range <> 'Aberdare Range'. [/s>
SELECT T1.id, T1.name FROM mountain AS T1 JOIN photos AS T2 ON T1.id = T2.mountain_id WHERE T1.height > 4000
CREATE TABLE photos (mountain_id VARCHAR); CREATE TABLE mountain (id VARCHAR, name VARCHAR, height INTEGER)
What are the id and name of the photos for mountains?
<s>[INST] Given the following SQL query and context: Query: SELECT T1.id, T1.name FROM mountain AS T1 JOIN photos AS T2 ON T1.id = T2.mountain_id WHERE T1.height > 4000 Context: CREATE TABLE photos (mountain_id VARCHAR); CREATE TABLE mountain (id VARCHAR, name VARCHAR, height INTEGER) [/INST] Based on the provided SQL query and context, your question is: What are the id and name of the photos for mountains? The answer to your question is: SELECT T1.id, T1.name FROM mountain AS T1 JOIN photos AS T2 ON T1.id = T2.mountain_id WHERE T1.height > 4000. [/s>
SELECT T1.id, T1.name FROM mountain AS T1 JOIN photos AS T2 ON T1.id = T2.mountain_id GROUP BY T1.id HAVING COUNT(*) >= 2
CREATE TABLE mountain (id VARCHAR, name VARCHAR); CREATE TABLE photos (mountain_id VARCHAR)
What are the id and name of the mountains that have at least 2 photos?
<s>[INST] Given the following SQL query and context: Query: SELECT T1.id, T1.name FROM mountain AS T1 JOIN photos AS T2 ON T1.id = T2.mountain_id GROUP BY T1.id HAVING COUNT(*) >= 2 Context: CREATE TABLE mountain (id VARCHAR, name VARCHAR); CREATE TABLE photos (mountain_id VARCHAR) [/INST] Based on the provided SQL query and context, your question is: What are the id and name of the mountains that have at least 2 photos? The answer to your question is: SELECT T1.id, T1.name FROM mountain AS T1 JOIN photos AS T2 ON T1.id = T2.mountain_id GROUP BY T1.id HAVING COUNT(*) >= 2. [/s>
SELECT T2.name FROM photos AS T1 JOIN camera_lens AS T2 ON T1.camera_lens_id = T2.id GROUP BY T2.id ORDER BY COUNT(*) DESC LIMIT 1
CREATE TABLE camera_lens (name VARCHAR, id VARCHAR); CREATE TABLE photos (camera_lens_id VARCHAR)
What are the names of the cameras that have taken picture of the most mountains?
<s>[INST] Given the following SQL query and context: Query: SELECT T2.name FROM photos AS T1 JOIN camera_lens AS T2 ON T1.camera_lens_id = T2.id GROUP BY T2.id ORDER BY COUNT(*) DESC LIMIT 1 Context: CREATE TABLE camera_lens (name VARCHAR, id VARCHAR); CREATE TABLE photos (camera_lens_id VARCHAR) [/INST] Based on the provided SQL query and context, your question is: What are the names of the cameras that have taken picture of the most mountains? The answer to your question is: SELECT T2.name FROM photos AS T1 JOIN camera_lens AS T2 ON T1.camera_lens_id = T2.id GROUP BY T2.id ORDER BY COUNT(*) DESC LIMIT 1. [/s>
SELECT T1.name FROM camera_lens AS T1 JOIN photos AS T2 ON T2.camera_lens_id = T1.id WHERE T1.brand = 'Sigma' OR T1.brand = 'Olympus'
CREATE TABLE photos (camera_lens_id VARCHAR); CREATE TABLE camera_lens (name VARCHAR, id VARCHAR, brand VARCHAR)
What are the names of photos taken with the lens brand 'Sigma' or 'Olympus'?
<s>[INST] Given the following SQL query and context: Query: SELECT T1.name FROM camera_lens AS T1 JOIN photos AS T2 ON T2.camera_lens_id = T1.id WHERE T1.brand = 'Sigma' OR T1.brand = 'Olympus' Context: CREATE TABLE photos (camera_lens_id VARCHAR); CREATE TABLE camera_lens (name VARCHAR, id VARCHAR, brand VARCHAR) [/INST] Based on the provided SQL query and context, your question is: What are the names of photos taken with the lens brand 'Sigma' or 'Olympus'? The answer to your question is: SELECT T1.name FROM camera_lens AS T1 JOIN photos AS T2 ON T2.camera_lens_id = T1.id WHERE T1.brand = 'Sigma' OR T1.brand = 'Olympus'. [/s>
SELECT COUNT(DISTINCT brand) FROM camera_lens
CREATE TABLE camera_lens (brand VARCHAR)
How many different kinds of lens brands are there?
<s>[INST] Given the following SQL query and context: Query: SELECT COUNT(DISTINCT brand) FROM camera_lens Context: CREATE TABLE camera_lens (brand VARCHAR) [/INST] Based on the provided SQL query and context, your question is: How many different kinds of lens brands are there? The answer to your question is: SELECT COUNT(DISTINCT brand) FROM camera_lens. [/s>
SELECT COUNT(*) FROM camera_lens WHERE NOT id IN (SELECT camera_lens_id FROM photos)
CREATE TABLE photos (id VARCHAR, camera_lens_id VARCHAR); CREATE TABLE camera_lens (id VARCHAR, camera_lens_id VARCHAR)
How many camera lenses are not used in taking any photos?
<s>[INST] Given the following SQL query and context: Query: SELECT COUNT(*) FROM camera_lens WHERE NOT id IN (SELECT camera_lens_id FROM photos) Context: CREATE TABLE photos (id VARCHAR, camera_lens_id VARCHAR); CREATE TABLE camera_lens (id VARCHAR, camera_lens_id VARCHAR) [/INST] Based on the provided SQL query and context, your question is: How many camera lenses are not used in taking any photos? The answer to your question is: SELECT COUNT(*) FROM camera_lens WHERE NOT id IN (SELECT camera_lens_id FROM photos). [/s>
SELECT COUNT(DISTINCT T2.camera_lens_id) FROM mountain AS T1 JOIN photos AS T2 ON T1.id = T2.mountain_id WHERE T1.country = 'Ethiopia'
CREATE TABLE mountain (id VARCHAR, country VARCHAR); CREATE TABLE photos (camera_lens_id VARCHAR, mountain_id VARCHAR)
How many distinct kinds of camera lenses are used to take photos of mountains in the country 'Ethiopia'?
<s>[INST] Given the following SQL query and context: Query: SELECT COUNT(DISTINCT T2.camera_lens_id) FROM mountain AS T1 JOIN photos AS T2 ON T1.id = T2.mountain_id WHERE T1.country = 'Ethiopia' Context: CREATE TABLE mountain (id VARCHAR, country VARCHAR); CREATE TABLE photos (camera_lens_id VARCHAR, mountain_id VARCHAR) [/INST] Based on the provided SQL query and context, your question is: How many distinct kinds of camera lenses are used to take photos of mountains in the country 'Ethiopia'? The answer to your question is: SELECT COUNT(DISTINCT T2.camera_lens_id) FROM mountain AS T1 JOIN photos AS T2 ON T1.id = T2.mountain_id WHERE T1.country = 'Ethiopia'. [/s>
SELECT T3.brand FROM mountain AS T1 JOIN photos AS T2 ON T1.id = T2.mountain_id JOIN camera_lens AS T3 ON T2.camera_lens_id = T3.id WHERE T1.range = 'Toubkal Atlas' INTERSECT SELECT T3.brand FROM mountain AS T1 JOIN photos AS T2 ON T1.id = T2.mountain_id JOIN camera_lens AS T3 ON T2.camera_lens_id = T3.id WHERE T1.range = 'Lasta Massif'
CREATE TABLE mountain (id VARCHAR, range VARCHAR); CREATE TABLE photos (mountain_id VARCHAR, camera_lens_id VARCHAR); CREATE TABLE camera_lens (brand VARCHAR, id VARCHAR)
List the brands of lenses that took both a picture of mountains with range 'Toubkal Atlas' and a picture of mountains with range 'Lasta Massif'
<s>[INST] Given the following SQL query and context: Query: SELECT T3.brand FROM mountain AS T1 JOIN photos AS T2 ON T1.id = T2.mountain_id JOIN camera_lens AS T3 ON T2.camera_lens_id = T3.id WHERE T1.range = 'Toubkal Atlas' INTERSECT SELECT T3.brand FROM mountain AS T1 JOIN photos AS T2 ON T1.id = T2.mountain_id JOIN camera_lens AS T3 ON T2.camera_lens_id = T3.id WHERE T1.range = 'Lasta Massif' Context: CREATE TABLE mountain (id VARCHAR, range VARCHAR); CREATE TABLE photos (mountain_id VARCHAR, camera_lens_id VARCHAR); CREATE TABLE camera_lens (brand VARCHAR, id VARCHAR) [/INST] Based on the provided SQL query and context, your question is: List the brands of lenses that took both a picture of mountains with range 'Toubkal Atlas' and a picture of mountains with range 'Lasta Massif' The answer to your question is: SELECT T3.brand FROM mountain AS T1 JOIN photos AS T2 ON T1.id = T2.mountain_id JOIN camera_lens AS T3 ON T2.camera_lens_id = T3.id WHERE T1.range = 'Toubkal Atlas' INTERSECT SELECT T3.brand FROM mountain AS T1 JOIN photos AS T2 ON T1.id = T2.mountain_id JOIN camera_lens AS T3 ON T2.camera_lens_id = T3.id WHERE T1.range = 'Lasta Massif'. [/s>
SELECT name, prominence FROM mountain EXCEPT SELECT T1.name, T1.prominence FROM mountain AS T1 JOIN photos AS T2 ON T1.id = T2.mountain_id JOIN camera_lens AS T3 ON T2.camera_lens_id = T3.id WHERE T3.brand = 'Sigma'
CREATE TABLE camera_lens (id VARCHAR, brand VARCHAR); CREATE TABLE mountain (name VARCHAR, prominence VARCHAR, id VARCHAR); CREATE TABLE photos (mountain_id VARCHAR, camera_lens_id VARCHAR); CREATE TABLE mountain (name VARCHAR, prominence VARCHAR)
Show the name and prominence of the mountains whose picture is not taken by a lens of brand 'Sigma'.
<s>[INST] Given the following SQL query and context: Query: SELECT name, prominence FROM mountain EXCEPT SELECT T1.name, T1.prominence FROM mountain AS T1 JOIN photos AS T2 ON T1.id = T2.mountain_id JOIN camera_lens AS T3 ON T2.camera_lens_id = T3.id WHERE T3.brand = 'Sigma' Context: CREATE TABLE camera_lens (id VARCHAR, brand VARCHAR); CREATE TABLE mountain (name VARCHAR, prominence VARCHAR, id VARCHAR); CREATE TABLE photos (mountain_id VARCHAR, camera_lens_id VARCHAR); CREATE TABLE mountain (name VARCHAR, prominence VARCHAR) [/INST] Based on the provided SQL query and context, your question is: Show the name and prominence of the mountains whose picture is not taken by a lens of brand 'Sigma'. The answer to your question is: SELECT name, prominence FROM mountain EXCEPT SELECT T1.name, T1.prominence FROM mountain AS T1 JOIN photos AS T2 ON T1.id = T2.mountain_id JOIN camera_lens AS T3 ON T2.camera_lens_id = T3.id WHERE T3.brand = 'Sigma'. [/s>
SELECT name FROM camera_lens WHERE name LIKE "%Digital%"
CREATE TABLE camera_lens (name VARCHAR)
List the camera lens names containing substring "Digital".
<s>[INST] Given the following SQL query and context: Query: SELECT name FROM camera_lens WHERE name LIKE "%Digital%" Context: CREATE TABLE camera_lens (name VARCHAR) [/INST] Based on the provided SQL query and context, your question is: List the camera lens names containing substring "Digital". The answer to your question is: SELECT name FROM camera_lens WHERE name LIKE "%Digital%". [/s>
SELECT T1.name, COUNT(*) FROM camera_lens AS T1 JOIN photos AS T2 ON T1.id = T2.camera_lens_id GROUP BY T1.id ORDER BY COUNT(*)
CREATE TABLE photos (camera_lens_id VARCHAR); CREATE TABLE camera_lens (name VARCHAR, id VARCHAR)
What is the name of each camera lens and the number of photos taken by it? Order the result by the count of photos.
<s>[INST] Given the following SQL query and context: Query: SELECT T1.name, COUNT(*) FROM camera_lens AS T1 JOIN photos AS T2 ON T1.id = T2.camera_lens_id GROUP BY T1.id ORDER BY COUNT(*) Context: CREATE TABLE photos (camera_lens_id VARCHAR); CREATE TABLE camera_lens (name VARCHAR, id VARCHAR) [/INST] Based on the provided SQL query and context, your question is: What is the name of each camera lens and the number of photos taken by it? Order the result by the count of photos. The answer to your question is: SELECT T1.name, COUNT(*) FROM camera_lens AS T1 JOIN photos AS T2 ON T1.id = T2.camera_lens_id GROUP BY T1.id ORDER BY COUNT(*). [/s>
SELECT name FROM channel WHERE OWNER <> 'CCTV'
CREATE TABLE channel (name VARCHAR, OWNER VARCHAR)
Find the names of channels that are not owned by CCTV.
<s>[INST] Given the following SQL query and context: Query: SELECT name FROM channel WHERE OWNER <> 'CCTV' Context: CREATE TABLE channel (name VARCHAR, OWNER VARCHAR) [/INST] Based on the provided SQL query and context, your question is: Find the names of channels that are not owned by CCTV. The answer to your question is: SELECT name FROM channel WHERE OWNER <> 'CCTV'. [/s>
SELECT name FROM channel ORDER BY rating_in_percent DESC
CREATE TABLE channel (name VARCHAR, rating_in_percent VARCHAR)
List all channel names ordered by their rating in percent from big to small.
<s>[INST] Given the following SQL query and context: Query: SELECT name FROM channel ORDER BY rating_in_percent DESC Context: CREATE TABLE channel (name VARCHAR, rating_in_percent VARCHAR) [/INST] Based on the provided SQL query and context, your question is: List all channel names ordered by their rating in percent from big to small. The answer to your question is: SELECT name FROM channel ORDER BY rating_in_percent DESC. [/s>
SELECT OWNER FROM channel ORDER BY rating_in_percent DESC LIMIT 1
CREATE TABLE channel (OWNER VARCHAR, rating_in_percent VARCHAR)
What is the owner of the channel that has the highest rating ratio?
<s>[INST] Given the following SQL query and context: Query: SELECT OWNER FROM channel ORDER BY rating_in_percent DESC LIMIT 1 Context: CREATE TABLE channel (OWNER VARCHAR, rating_in_percent VARCHAR) [/INST] Based on the provided SQL query and context, your question is: What is the owner of the channel that has the highest rating ratio? The answer to your question is: SELECT OWNER FROM channel ORDER BY rating_in_percent DESC LIMIT 1. [/s>
SELECT COUNT(*) FROM program
CREATE TABLE program (Id VARCHAR)
how many programs are there?
<s>[INST] Given the following SQL query and context: Query: SELECT COUNT(*) FROM program Context: CREATE TABLE program (Id VARCHAR) [/INST] Based on the provided SQL query and context, your question is: how many programs are there? The answer to your question is: SELECT COUNT(*) FROM program. [/s>
SELECT name FROM program ORDER BY launch
CREATE TABLE program (name VARCHAR, launch VARCHAR)
list all the names of programs, ordering by launch time.
<s>[INST] Given the following SQL query and context: Query: SELECT name FROM program ORDER BY launch Context: CREATE TABLE program (name VARCHAR, launch VARCHAR) [/INST] Based on the provided SQL query and context, your question is: list all the names of programs, ordering by launch time. The answer to your question is: SELECT name FROM program ORDER BY launch. [/s>
SELECT name, origin, OWNER FROM program
CREATE TABLE program (name VARCHAR, origin VARCHAR, OWNER VARCHAR)
List the name, origin and owner of each program.
<s>[INST] Given the following SQL query and context: Query: SELECT name, origin, OWNER FROM program Context: CREATE TABLE program (name VARCHAR, origin VARCHAR, OWNER VARCHAR) [/INST] Based on the provided SQL query and context, your question is: List the name, origin and owner of each program. The answer to your question is: SELECT name, origin, OWNER FROM program. [/s>
SELECT name FROM program ORDER BY launch DESC LIMIT 1
CREATE TABLE program (name VARCHAR, launch VARCHAR)
find the name of the program that was launched most recently.
<s>[INST] Given the following SQL query and context: Query: SELECT name FROM program ORDER BY launch DESC LIMIT 1 Context: CREATE TABLE program (name VARCHAR, launch VARCHAR) [/INST] Based on the provided SQL query and context, your question is: find the name of the program that was launched most recently. The answer to your question is: SELECT name FROM program ORDER BY launch DESC LIMIT 1. [/s>
SELECT SUM(Share_in_percent) FROM channel WHERE OWNER = 'CCTV'
CREATE TABLE channel (Share_in_percent INTEGER, OWNER VARCHAR)
find the total percentage share of all channels owned by CCTV.
<s>[INST] Given the following SQL query and context: Query: SELECT SUM(Share_in_percent) FROM channel WHERE OWNER = 'CCTV' Context: CREATE TABLE channel (Share_in_percent INTEGER, OWNER VARCHAR) [/INST] Based on the provided SQL query and context, your question is: find the total percentage share of all channels owned by CCTV. The answer to your question is: SELECT SUM(Share_in_percent) FROM channel WHERE OWNER = 'CCTV'. [/s>
SELECT t1.name FROM channel AS t1 JOIN broadcast AS t2 ON t1.channel_id = t2.channel_id WHERE t2.time_of_day = 'Morning'
CREATE TABLE channel (name VARCHAR, channel_id VARCHAR); CREATE TABLE broadcast (channel_id VARCHAR, time_of_day VARCHAR)
Find the names of the channels that are broadcast in the morning.
<s>[INST] Given the following SQL query and context: Query: SELECT t1.name FROM channel AS t1 JOIN broadcast AS t2 ON t1.channel_id = t2.channel_id WHERE t2.time_of_day = 'Morning' Context: CREATE TABLE channel (name VARCHAR, channel_id VARCHAR); CREATE TABLE broadcast (channel_id VARCHAR, time_of_day VARCHAR) [/INST] Based on the provided SQL query and context, your question is: Find the names of the channels that are broadcast in the morning. The answer to your question is: SELECT t1.name FROM channel AS t1 JOIN broadcast AS t2 ON t1.channel_id = t2.channel_id WHERE t2.time_of_day = 'Morning'. [/s>