db_id
stringclasses
140 values
schema
sequencelengths
0
26
question
stringlengths
16
224
query
stringlengths
18
577
query_toks
sequencelengths
4
90
query_toks_no_value
sequencelengths
4
125
question_toks
sequencelengths
4
44
store_1
[ "Create Tables\n********************************************************************************/\nCREATE TABLE artists\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE albums\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n title VARCHAR(160) NOT NULL,\n artist_id INTEGER NOT NULL,\n FOREIGN KEY (artist_id) REFERENCES artists (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE employees\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n last_name VARCHAR(20) NOT NULL,\n first_name VARCHAR(20) NOT NULL,\n title VARCHAR(30),\n reports_to INTEGER,\n birth_date TIMESTAMP,\n hire_date TIMESTAMP,\n address VARCHAR(70),\n city VARCHAR(40),\n state VARCHAR(40),\n country VARCHAR(40),\n postal_code VARCHAR(10),\n phone VARCHAR(24),\n fax VARCHAR(24),\n email VARCHAR(60),\n FOREIGN KEY (reports_to) REFERENCES employees (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE customers\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n first_name VARCHAR(40) NOT NULL,\n last_name VARCHAR(20) NOT NULL,\n company VARCHAR(80),\n address VARCHAR(70),\n city VARCHAR(40),\n state VARCHAR(40),\n country VARCHAR(40),\n postal_code VARCHAR(10),\n phone VARCHAR(24),\n fax VARCHAR(24),\n email VARCHAR(60) NOT NULL,\n support_rep_id INTEGER,\n FOREIGN KEY (support_rep_id) REFERENCES employees (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE genres\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE invoices\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n customer_id INTEGER NOT NULL,\n invoice_date TIMESTAMP NOT NULL,\n billing_address VARCHAR(70),\n billing_city VARCHAR(40),\n billing_state VARCHAR(40),\n billing_country VARCHAR(40),\n billing_postal_code VARCHAR(10),\n total NUMERIC(10,2) NOT NULL,\n FOREIGN KEY (customer_id) REFERENCES customers (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE media_types\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE tracks\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(200) NOT NULL,\n album_id INTEGER,\n media_type_id INTEGER NOT NULL,\n genre_id INTEGER,\n composer VARCHAR(220),\n milliseconds INTEGER NOT NULL,\n bytes INTEGER,\n unit_price NUMERIC(10,2) NOT NULL,\n FOREIGN KEY (album_id) REFERENCES albums (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (genre_id) REFERENCES genres (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (media_type_id) REFERENCES media_types (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE invoice_lines\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n invoice_id INTEGER NOT NULL,\n track_id INTEGER NOT NULL,\n unit_price NUMERIC(10,2) NOT NULL,\n quantity INTEGER NOT NULL,\n FOREIGN KEY (invoice_id) REFERENCES invoices (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (track_id) REFERENCES tracks (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE playlists\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE playlist_tracks\n(\n playlist_id INTEGER NOT NULL,\n track_id INTEGER NOT NULL,\n CONSTRAINT PK_PlaylistTrack PRIMARY KEY (playlist_id, track_id),\n FOREIGN KEY (playlist_id) REFERENCES playlists (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (track_id) REFERENCES tracks (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);" ]
What si the youngest employee's first and last name?
SELECT first_name , last_name FROM employees ORDER BY birth_date DESC LIMIT 1;
[ "SELECT", "first_name", ",", "last_name", "FROM", "employees", "ORDER", "BY", "birth_date", "DESC", "LIMIT", "1", ";" ]
[ "select", "first_name", ",", "last_name", "from", "employees", "order", "by", "birth_date", "desc", "limit", "value" ]
[ "What", "si", "the", "youngest", "employee", "'s", "first", "and", "last", "name", "?" ]
store_1
[ "Create Tables\n********************************************************************************/\nCREATE TABLE artists\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE albums\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n title VARCHAR(160) NOT NULL,\n artist_id INTEGER NOT NULL,\n FOREIGN KEY (artist_id) REFERENCES artists (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE employees\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n last_name VARCHAR(20) NOT NULL,\n first_name VARCHAR(20) NOT NULL,\n title VARCHAR(30),\n reports_to INTEGER,\n birth_date TIMESTAMP,\n hire_date TIMESTAMP,\n address VARCHAR(70),\n city VARCHAR(40),\n state VARCHAR(40),\n country VARCHAR(40),\n postal_code VARCHAR(10),\n phone VARCHAR(24),\n fax VARCHAR(24),\n email VARCHAR(60),\n FOREIGN KEY (reports_to) REFERENCES employees (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE customers\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n first_name VARCHAR(40) NOT NULL,\n last_name VARCHAR(20) NOT NULL,\n company VARCHAR(80),\n address VARCHAR(70),\n city VARCHAR(40),\n state VARCHAR(40),\n country VARCHAR(40),\n postal_code VARCHAR(10),\n phone VARCHAR(24),\n fax VARCHAR(24),\n email VARCHAR(60) NOT NULL,\n support_rep_id INTEGER,\n FOREIGN KEY (support_rep_id) REFERENCES employees (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE genres\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE invoices\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n customer_id INTEGER NOT NULL,\n invoice_date TIMESTAMP NOT NULL,\n billing_address VARCHAR(70),\n billing_city VARCHAR(40),\n billing_state VARCHAR(40),\n billing_country VARCHAR(40),\n billing_postal_code VARCHAR(10),\n total NUMERIC(10,2) NOT NULL,\n FOREIGN KEY (customer_id) REFERENCES customers (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE media_types\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE tracks\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(200) NOT NULL,\n album_id INTEGER,\n media_type_id INTEGER NOT NULL,\n genre_id INTEGER,\n composer VARCHAR(220),\n milliseconds INTEGER NOT NULL,\n bytes INTEGER,\n unit_price NUMERIC(10,2) NOT NULL,\n FOREIGN KEY (album_id) REFERENCES albums (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (genre_id) REFERENCES genres (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (media_type_id) REFERENCES media_types (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE invoice_lines\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n invoice_id INTEGER NOT NULL,\n track_id INTEGER NOT NULL,\n unit_price NUMERIC(10,2) NOT NULL,\n quantity INTEGER NOT NULL,\n FOREIGN KEY (invoice_id) REFERENCES invoices (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (track_id) REFERENCES tracks (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE playlists\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE playlist_tracks\n(\n playlist_id INTEGER NOT NULL,\n track_id INTEGER NOT NULL,\n CONSTRAINT PK_PlaylistTrack PRIMARY KEY (playlist_id, track_id),\n FOREIGN KEY (playlist_id) REFERENCES playlists (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (track_id) REFERENCES tracks (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);" ]
List top 10 employee work longest in the company. List employee's first and last name.
SELECT first_name , last_name FROM employees ORDER BY hire_date ASC LIMIT 10;
[ "SELECT", "first_name", ",", "last_name", "FROM", "employees", "ORDER", "BY", "hire_date", "ASC", "LIMIT", "10", ";" ]
[ "select", "first_name", ",", "last_name", "from", "employees", "order", "by", "hire_date", "asc", "limit", "value" ]
[ "List", "top", "10", "employee", "work", "longest", "in", "the", "company", ".", "List", "employee", "'s", "first", "and", "last", "name", "." ]
store_1
[ "Create Tables\n********************************************************************************/\nCREATE TABLE artists\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE albums\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n title VARCHAR(160) NOT NULL,\n artist_id INTEGER NOT NULL,\n FOREIGN KEY (artist_id) REFERENCES artists (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE employees\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n last_name VARCHAR(20) NOT NULL,\n first_name VARCHAR(20) NOT NULL,\n title VARCHAR(30),\n reports_to INTEGER,\n birth_date TIMESTAMP,\n hire_date TIMESTAMP,\n address VARCHAR(70),\n city VARCHAR(40),\n state VARCHAR(40),\n country VARCHAR(40),\n postal_code VARCHAR(10),\n phone VARCHAR(24),\n fax VARCHAR(24),\n email VARCHAR(60),\n FOREIGN KEY (reports_to) REFERENCES employees (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE customers\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n first_name VARCHAR(40) NOT NULL,\n last_name VARCHAR(20) NOT NULL,\n company VARCHAR(80),\n address VARCHAR(70),\n city VARCHAR(40),\n state VARCHAR(40),\n country VARCHAR(40),\n postal_code VARCHAR(10),\n phone VARCHAR(24),\n fax VARCHAR(24),\n email VARCHAR(60) NOT NULL,\n support_rep_id INTEGER,\n FOREIGN KEY (support_rep_id) REFERENCES employees (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE genres\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE invoices\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n customer_id INTEGER NOT NULL,\n invoice_date TIMESTAMP NOT NULL,\n billing_address VARCHAR(70),\n billing_city VARCHAR(40),\n billing_state VARCHAR(40),\n billing_country VARCHAR(40),\n billing_postal_code VARCHAR(10),\n total NUMERIC(10,2) NOT NULL,\n FOREIGN KEY (customer_id) REFERENCES customers (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE media_types\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE tracks\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(200) NOT NULL,\n album_id INTEGER,\n media_type_id INTEGER NOT NULL,\n genre_id INTEGER,\n composer VARCHAR(220),\n milliseconds INTEGER NOT NULL,\n bytes INTEGER,\n unit_price NUMERIC(10,2) NOT NULL,\n FOREIGN KEY (album_id) REFERENCES albums (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (genre_id) REFERENCES genres (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (media_type_id) REFERENCES media_types (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE invoice_lines\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n invoice_id INTEGER NOT NULL,\n track_id INTEGER NOT NULL,\n unit_price NUMERIC(10,2) NOT NULL,\n quantity INTEGER NOT NULL,\n FOREIGN KEY (invoice_id) REFERENCES invoices (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (track_id) REFERENCES tracks (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE playlists\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE playlist_tracks\n(\n playlist_id INTEGER NOT NULL,\n track_id INTEGER NOT NULL,\n CONSTRAINT PK_PlaylistTrack PRIMARY KEY (playlist_id, track_id),\n FOREIGN KEY (playlist_id) REFERENCES playlists (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (track_id) REFERENCES tracks (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);" ]
What are the first and last names of the top 10 longest-serving employees?
SELECT first_name , last_name FROM employees ORDER BY hire_date ASC LIMIT 10;
[ "SELECT", "first_name", ",", "last_name", "FROM", "employees", "ORDER", "BY", "hire_date", "ASC", "LIMIT", "10", ";" ]
[ "select", "first_name", ",", "last_name", "from", "employees", "order", "by", "hire_date", "asc", "limit", "value" ]
[ "What", "are", "the", "first", "and", "last", "names", "of", "the", "top", "10", "longest-serving", "employees", "?" ]
store_1
[ "Create Tables\n********************************************************************************/\nCREATE TABLE artists\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE albums\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n title VARCHAR(160) NOT NULL,\n artist_id INTEGER NOT NULL,\n FOREIGN KEY (artist_id) REFERENCES artists (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE employees\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n last_name VARCHAR(20) NOT NULL,\n first_name VARCHAR(20) NOT NULL,\n title VARCHAR(30),\n reports_to INTEGER,\n birth_date TIMESTAMP,\n hire_date TIMESTAMP,\n address VARCHAR(70),\n city VARCHAR(40),\n state VARCHAR(40),\n country VARCHAR(40),\n postal_code VARCHAR(10),\n phone VARCHAR(24),\n fax VARCHAR(24),\n email VARCHAR(60),\n FOREIGN KEY (reports_to) REFERENCES employees (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE customers\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n first_name VARCHAR(40) NOT NULL,\n last_name VARCHAR(20) NOT NULL,\n company VARCHAR(80),\n address VARCHAR(70),\n city VARCHAR(40),\n state VARCHAR(40),\n country VARCHAR(40),\n postal_code VARCHAR(10),\n phone VARCHAR(24),\n fax VARCHAR(24),\n email VARCHAR(60) NOT NULL,\n support_rep_id INTEGER,\n FOREIGN KEY (support_rep_id) REFERENCES employees (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE genres\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE invoices\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n customer_id INTEGER NOT NULL,\n invoice_date TIMESTAMP NOT NULL,\n billing_address VARCHAR(70),\n billing_city VARCHAR(40),\n billing_state VARCHAR(40),\n billing_country VARCHAR(40),\n billing_postal_code VARCHAR(10),\n total NUMERIC(10,2) NOT NULL,\n FOREIGN KEY (customer_id) REFERENCES customers (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE media_types\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE tracks\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(200) NOT NULL,\n album_id INTEGER,\n media_type_id INTEGER NOT NULL,\n genre_id INTEGER,\n composer VARCHAR(220),\n milliseconds INTEGER NOT NULL,\n bytes INTEGER,\n unit_price NUMERIC(10,2) NOT NULL,\n FOREIGN KEY (album_id) REFERENCES albums (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (genre_id) REFERENCES genres (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (media_type_id) REFERENCES media_types (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE invoice_lines\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n invoice_id INTEGER NOT NULL,\n track_id INTEGER NOT NULL,\n unit_price NUMERIC(10,2) NOT NULL,\n quantity INTEGER NOT NULL,\n FOREIGN KEY (invoice_id) REFERENCES invoices (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (track_id) REFERENCES tracks (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE playlists\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE playlist_tracks\n(\n playlist_id INTEGER NOT NULL,\n track_id INTEGER NOT NULL,\n CONSTRAINT PK_PlaylistTrack PRIMARY KEY (playlist_id, track_id),\n FOREIGN KEY (playlist_id) REFERENCES playlists (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (track_id) REFERENCES tracks (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);" ]
Find the number of employees whose title is IT Staff from each city?
SELECT count(*) , city FROM employees WHERE title = 'IT Staff' GROUP BY city
[ "SELECT", "count", "(", "*", ")", ",", "city", "FROM", "employees", "WHERE", "title", "=", "'IT", "Staff", "'", "GROUP", "BY", "city" ]
[ "select", "count", "(", "*", ")", ",", "city", "from", "employees", "where", "title", "=", "value", "group", "by", "city" ]
[ "Find", "the", "number", "of", "employees", "whose", "title", "is", "IT", "Staff", "from", "each", "city", "?" ]
store_1
[ "Create Tables\n********************************************************************************/\nCREATE TABLE artists\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE albums\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n title VARCHAR(160) NOT NULL,\n artist_id INTEGER NOT NULL,\n FOREIGN KEY (artist_id) REFERENCES artists (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE employees\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n last_name VARCHAR(20) NOT NULL,\n first_name VARCHAR(20) NOT NULL,\n title VARCHAR(30),\n reports_to INTEGER,\n birth_date TIMESTAMP,\n hire_date TIMESTAMP,\n address VARCHAR(70),\n city VARCHAR(40),\n state VARCHAR(40),\n country VARCHAR(40),\n postal_code VARCHAR(10),\n phone VARCHAR(24),\n fax VARCHAR(24),\n email VARCHAR(60),\n FOREIGN KEY (reports_to) REFERENCES employees (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE customers\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n first_name VARCHAR(40) NOT NULL,\n last_name VARCHAR(20) NOT NULL,\n company VARCHAR(80),\n address VARCHAR(70),\n city VARCHAR(40),\n state VARCHAR(40),\n country VARCHAR(40),\n postal_code VARCHAR(10),\n phone VARCHAR(24),\n fax VARCHAR(24),\n email VARCHAR(60) NOT NULL,\n support_rep_id INTEGER,\n FOREIGN KEY (support_rep_id) REFERENCES employees (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE genres\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE invoices\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n customer_id INTEGER NOT NULL,\n invoice_date TIMESTAMP NOT NULL,\n billing_address VARCHAR(70),\n billing_city VARCHAR(40),\n billing_state VARCHAR(40),\n billing_country VARCHAR(40),\n billing_postal_code VARCHAR(10),\n total NUMERIC(10,2) NOT NULL,\n FOREIGN KEY (customer_id) REFERENCES customers (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE media_types\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE tracks\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(200) NOT NULL,\n album_id INTEGER,\n media_type_id INTEGER NOT NULL,\n genre_id INTEGER,\n composer VARCHAR(220),\n milliseconds INTEGER NOT NULL,\n bytes INTEGER,\n unit_price NUMERIC(10,2) NOT NULL,\n FOREIGN KEY (album_id) REFERENCES albums (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (genre_id) REFERENCES genres (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (media_type_id) REFERENCES media_types (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE invoice_lines\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n invoice_id INTEGER NOT NULL,\n track_id INTEGER NOT NULL,\n unit_price NUMERIC(10,2) NOT NULL,\n quantity INTEGER NOT NULL,\n FOREIGN KEY (invoice_id) REFERENCES invoices (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (track_id) REFERENCES tracks (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE playlists\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE playlist_tracks\n(\n playlist_id INTEGER NOT NULL,\n track_id INTEGER NOT NULL,\n CONSTRAINT PK_PlaylistTrack PRIMARY KEY (playlist_id, track_id),\n FOREIGN KEY (playlist_id) REFERENCES playlists (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (track_id) REFERENCES tracks (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);" ]
How many employees who are IT staff are from each city?
SELECT count(*) , city FROM employees WHERE title = 'IT Staff' GROUP BY city
[ "SELECT", "count", "(", "*", ")", ",", "city", "FROM", "employees", "WHERE", "title", "=", "'IT", "Staff", "'", "GROUP", "BY", "city" ]
[ "select", "count", "(", "*", ")", ",", "city", "from", "employees", "where", "title", "=", "value", "group", "by", "city" ]
[ "How", "many", "employees", "who", "are", "IT", "staff", "are", "from", "each", "city", "?" ]
store_1
[ "Create Tables\n********************************************************************************/\nCREATE TABLE artists\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE albums\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n title VARCHAR(160) NOT NULL,\n artist_id INTEGER NOT NULL,\n FOREIGN KEY (artist_id) REFERENCES artists (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE employees\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n last_name VARCHAR(20) NOT NULL,\n first_name VARCHAR(20) NOT NULL,\n title VARCHAR(30),\n reports_to INTEGER,\n birth_date TIMESTAMP,\n hire_date TIMESTAMP,\n address VARCHAR(70),\n city VARCHAR(40),\n state VARCHAR(40),\n country VARCHAR(40),\n postal_code VARCHAR(10),\n phone VARCHAR(24),\n fax VARCHAR(24),\n email VARCHAR(60),\n FOREIGN KEY (reports_to) REFERENCES employees (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE customers\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n first_name VARCHAR(40) NOT NULL,\n last_name VARCHAR(20) NOT NULL,\n company VARCHAR(80),\n address VARCHAR(70),\n city VARCHAR(40),\n state VARCHAR(40),\n country VARCHAR(40),\n postal_code VARCHAR(10),\n phone VARCHAR(24),\n fax VARCHAR(24),\n email VARCHAR(60) NOT NULL,\n support_rep_id INTEGER,\n FOREIGN KEY (support_rep_id) REFERENCES employees (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE genres\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE invoices\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n customer_id INTEGER NOT NULL,\n invoice_date TIMESTAMP NOT NULL,\n billing_address VARCHAR(70),\n billing_city VARCHAR(40),\n billing_state VARCHAR(40),\n billing_country VARCHAR(40),\n billing_postal_code VARCHAR(10),\n total NUMERIC(10,2) NOT NULL,\n FOREIGN KEY (customer_id) REFERENCES customers (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE media_types\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE tracks\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(200) NOT NULL,\n album_id INTEGER,\n media_type_id INTEGER NOT NULL,\n genre_id INTEGER,\n composer VARCHAR(220),\n milliseconds INTEGER NOT NULL,\n bytes INTEGER,\n unit_price NUMERIC(10,2) NOT NULL,\n FOREIGN KEY (album_id) REFERENCES albums (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (genre_id) REFERENCES genres (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (media_type_id) REFERENCES media_types (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE invoice_lines\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n invoice_id INTEGER NOT NULL,\n track_id INTEGER NOT NULL,\n unit_price NUMERIC(10,2) NOT NULL,\n quantity INTEGER NOT NULL,\n FOREIGN KEY (invoice_id) REFERENCES invoices (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (track_id) REFERENCES tracks (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE playlists\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE playlist_tracks\n(\n playlist_id INTEGER NOT NULL,\n track_id INTEGER NOT NULL,\n CONSTRAINT PK_PlaylistTrack PRIMARY KEY (playlist_id, track_id),\n FOREIGN KEY (playlist_id) REFERENCES playlists (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (track_id) REFERENCES tracks (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);" ]
Which employee manage most number of peoples? List employee's first and last name, and number of people report to that employee.
SELECT T2.first_name , T2.last_name , count(T1.reports_to) FROM employees AS T1 JOIN employees AS T2 ON T1.reports_to = T2.id GROUP BY T1.reports_to ORDER BY count(T1.reports_to) DESC LIMIT 1;
[ "SELECT", "T2.first_name", ",", "T2.last_name", ",", "count", "(", "T1.reports_to", ")", "FROM", "employees", "AS", "T1", "JOIN", "employees", "AS", "T2", "ON", "T1.reports_to", "=", "T2.id", "GROUP", "BY", "T1.reports_to", "ORDER", "BY", "count", "(", "T1.reports_to", ")", "DESC", "LIMIT", "1", ";" ]
[ "select", "t2", ".", "first_name", ",", "t2", ".", "last_name", ",", "count", "(", "t1", ".", "reports_to", ")", "from", "employees", "as", "t1", "join", "employees", "as", "t2", "on", "t1", ".", "reports_to", "=", "t2", ".", "id", "group", "by", "t1", ".", "reports_to", "order", "by", "count", "(", "t1", ".", "reports_to", ")", "desc", "limit", "value" ]
[ "Which", "employee", "manage", "most", "number", "of", "peoples", "?", "List", "employee", "'s", "first", "and", "last", "name", ",", "and", "number", "of", "people", "report", "to", "that", "employee", "." ]
store_1
[ "Create Tables\n********************************************************************************/\nCREATE TABLE artists\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE albums\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n title VARCHAR(160) NOT NULL,\n artist_id INTEGER NOT NULL,\n FOREIGN KEY (artist_id) REFERENCES artists (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE employees\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n last_name VARCHAR(20) NOT NULL,\n first_name VARCHAR(20) NOT NULL,\n title VARCHAR(30),\n reports_to INTEGER,\n birth_date TIMESTAMP,\n hire_date TIMESTAMP,\n address VARCHAR(70),\n city VARCHAR(40),\n state VARCHAR(40),\n country VARCHAR(40),\n postal_code VARCHAR(10),\n phone VARCHAR(24),\n fax VARCHAR(24),\n email VARCHAR(60),\n FOREIGN KEY (reports_to) REFERENCES employees (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE customers\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n first_name VARCHAR(40) NOT NULL,\n last_name VARCHAR(20) NOT NULL,\n company VARCHAR(80),\n address VARCHAR(70),\n city VARCHAR(40),\n state VARCHAR(40),\n country VARCHAR(40),\n postal_code VARCHAR(10),\n phone VARCHAR(24),\n fax VARCHAR(24),\n email VARCHAR(60) NOT NULL,\n support_rep_id INTEGER,\n FOREIGN KEY (support_rep_id) REFERENCES employees (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE genres\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE invoices\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n customer_id INTEGER NOT NULL,\n invoice_date TIMESTAMP NOT NULL,\n billing_address VARCHAR(70),\n billing_city VARCHAR(40),\n billing_state VARCHAR(40),\n billing_country VARCHAR(40),\n billing_postal_code VARCHAR(10),\n total NUMERIC(10,2) NOT NULL,\n FOREIGN KEY (customer_id) REFERENCES customers (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE media_types\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE tracks\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(200) NOT NULL,\n album_id INTEGER,\n media_type_id INTEGER NOT NULL,\n genre_id INTEGER,\n composer VARCHAR(220),\n milliseconds INTEGER NOT NULL,\n bytes INTEGER,\n unit_price NUMERIC(10,2) NOT NULL,\n FOREIGN KEY (album_id) REFERENCES albums (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (genre_id) REFERENCES genres (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (media_type_id) REFERENCES media_types (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE invoice_lines\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n invoice_id INTEGER NOT NULL,\n track_id INTEGER NOT NULL,\n unit_price NUMERIC(10,2) NOT NULL,\n quantity INTEGER NOT NULL,\n FOREIGN KEY (invoice_id) REFERENCES invoices (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (track_id) REFERENCES tracks (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE playlists\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE playlist_tracks\n(\n playlist_id INTEGER NOT NULL,\n track_id INTEGER NOT NULL,\n CONSTRAINT PK_PlaylistTrack PRIMARY KEY (playlist_id, track_id),\n FOREIGN KEY (playlist_id) REFERENCES playlists (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (track_id) REFERENCES tracks (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);" ]
What are the first and last names of all the employees and how many people report to them?
SELECT T2.first_name , T2.last_name , count(T1.reports_to) FROM employees AS T1 JOIN employees AS T2 ON T1.reports_to = T2.id GROUP BY T1.reports_to ORDER BY count(T1.reports_to) DESC LIMIT 1;
[ "SELECT", "T2.first_name", ",", "T2.last_name", ",", "count", "(", "T1.reports_to", ")", "FROM", "employees", "AS", "T1", "JOIN", "employees", "AS", "T2", "ON", "T1.reports_to", "=", "T2.id", "GROUP", "BY", "T1.reports_to", "ORDER", "BY", "count", "(", "T1.reports_to", ")", "DESC", "LIMIT", "1", ";" ]
[ "select", "t2", ".", "first_name", ",", "t2", ".", "last_name", ",", "count", "(", "t1", ".", "reports_to", ")", "from", "employees", "as", "t1", "join", "employees", "as", "t2", "on", "t1", ".", "reports_to", "=", "t2", ".", "id", "group", "by", "t1", ".", "reports_to", "order", "by", "count", "(", "t1", ".", "reports_to", ")", "desc", "limit", "value" ]
[ "What", "are", "the", "first", "and", "last", "names", "of", "all", "the", "employees", "and", "how", "many", "people", "report", "to", "them", "?" ]
store_1
[ "Create Tables\n********************************************************************************/\nCREATE TABLE artists\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE albums\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n title VARCHAR(160) NOT NULL,\n artist_id INTEGER NOT NULL,\n FOREIGN KEY (artist_id) REFERENCES artists (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE employees\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n last_name VARCHAR(20) NOT NULL,\n first_name VARCHAR(20) NOT NULL,\n title VARCHAR(30),\n reports_to INTEGER,\n birth_date TIMESTAMP,\n hire_date TIMESTAMP,\n address VARCHAR(70),\n city VARCHAR(40),\n state VARCHAR(40),\n country VARCHAR(40),\n postal_code VARCHAR(10),\n phone VARCHAR(24),\n fax VARCHAR(24),\n email VARCHAR(60),\n FOREIGN KEY (reports_to) REFERENCES employees (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE customers\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n first_name VARCHAR(40) NOT NULL,\n last_name VARCHAR(20) NOT NULL,\n company VARCHAR(80),\n address VARCHAR(70),\n city VARCHAR(40),\n state VARCHAR(40),\n country VARCHAR(40),\n postal_code VARCHAR(10),\n phone VARCHAR(24),\n fax VARCHAR(24),\n email VARCHAR(60) NOT NULL,\n support_rep_id INTEGER,\n FOREIGN KEY (support_rep_id) REFERENCES employees (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE genres\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE invoices\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n customer_id INTEGER NOT NULL,\n invoice_date TIMESTAMP NOT NULL,\n billing_address VARCHAR(70),\n billing_city VARCHAR(40),\n billing_state VARCHAR(40),\n billing_country VARCHAR(40),\n billing_postal_code VARCHAR(10),\n total NUMERIC(10,2) NOT NULL,\n FOREIGN KEY (customer_id) REFERENCES customers (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE media_types\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE tracks\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(200) NOT NULL,\n album_id INTEGER,\n media_type_id INTEGER NOT NULL,\n genre_id INTEGER,\n composer VARCHAR(220),\n milliseconds INTEGER NOT NULL,\n bytes INTEGER,\n unit_price NUMERIC(10,2) NOT NULL,\n FOREIGN KEY (album_id) REFERENCES albums (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (genre_id) REFERENCES genres (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (media_type_id) REFERENCES media_types (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE invoice_lines\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n invoice_id INTEGER NOT NULL,\n track_id INTEGER NOT NULL,\n unit_price NUMERIC(10,2) NOT NULL,\n quantity INTEGER NOT NULL,\n FOREIGN KEY (invoice_id) REFERENCES invoices (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (track_id) REFERENCES tracks (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE playlists\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE playlist_tracks\n(\n playlist_id INTEGER NOT NULL,\n track_id INTEGER NOT NULL,\n CONSTRAINT PK_PlaylistTrack PRIMARY KEY (playlist_id, track_id),\n FOREIGN KEY (playlist_id) REFERENCES playlists (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (track_id) REFERENCES tracks (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);" ]
How many orders does Lucas Mancini has?
SELECT count(*) FROM customers AS T1 JOIN invoices AS T2 ON T1.id = T2.customer_id WHERE T1.first_name = "Lucas" AND T1.last_name = "Mancini";
[ "SELECT", "count", "(", "*", ")", "FROM", "customers", "AS", "T1", "JOIN", "invoices", "AS", "T2", "ON", "T1.id", "=", "T2.customer_id", "WHERE", "T1.first_name", "=", "``", "Lucas", "''", "AND", "T1.last_name", "=", "``", "Mancini", "''", ";" ]
[ "select", "count", "(", "*", ")", "from", "customers", "as", "t1", "join", "invoices", "as", "t2", "on", "t1", ".", "id", "=", "t2", ".", "customer_id", "where", "t1", ".", "first_name", "=", "value", "and", "t1", ".", "last_name", "=", "value" ]
[ "How", "many", "orders", "does", "Lucas", "Mancini", "has", "?" ]
store_1
[ "Create Tables\n********************************************************************************/\nCREATE TABLE artists\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE albums\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n title VARCHAR(160) NOT NULL,\n artist_id INTEGER NOT NULL,\n FOREIGN KEY (artist_id) REFERENCES artists (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE employees\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n last_name VARCHAR(20) NOT NULL,\n first_name VARCHAR(20) NOT NULL,\n title VARCHAR(30),\n reports_to INTEGER,\n birth_date TIMESTAMP,\n hire_date TIMESTAMP,\n address VARCHAR(70),\n city VARCHAR(40),\n state VARCHAR(40),\n country VARCHAR(40),\n postal_code VARCHAR(10),\n phone VARCHAR(24),\n fax VARCHAR(24),\n email VARCHAR(60),\n FOREIGN KEY (reports_to) REFERENCES employees (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE customers\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n first_name VARCHAR(40) NOT NULL,\n last_name VARCHAR(20) NOT NULL,\n company VARCHAR(80),\n address VARCHAR(70),\n city VARCHAR(40),\n state VARCHAR(40),\n country VARCHAR(40),\n postal_code VARCHAR(10),\n phone VARCHAR(24),\n fax VARCHAR(24),\n email VARCHAR(60) NOT NULL,\n support_rep_id INTEGER,\n FOREIGN KEY (support_rep_id) REFERENCES employees (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE genres\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE invoices\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n customer_id INTEGER NOT NULL,\n invoice_date TIMESTAMP NOT NULL,\n billing_address VARCHAR(70),\n billing_city VARCHAR(40),\n billing_state VARCHAR(40),\n billing_country VARCHAR(40),\n billing_postal_code VARCHAR(10),\n total NUMERIC(10,2) NOT NULL,\n FOREIGN KEY (customer_id) REFERENCES customers (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE media_types\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE tracks\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(200) NOT NULL,\n album_id INTEGER,\n media_type_id INTEGER NOT NULL,\n genre_id INTEGER,\n composer VARCHAR(220),\n milliseconds INTEGER NOT NULL,\n bytes INTEGER,\n unit_price NUMERIC(10,2) NOT NULL,\n FOREIGN KEY (album_id) REFERENCES albums (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (genre_id) REFERENCES genres (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (media_type_id) REFERENCES media_types (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE invoice_lines\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n invoice_id INTEGER NOT NULL,\n track_id INTEGER NOT NULL,\n unit_price NUMERIC(10,2) NOT NULL,\n quantity INTEGER NOT NULL,\n FOREIGN KEY (invoice_id) REFERENCES invoices (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (track_id) REFERENCES tracks (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE playlists\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE playlist_tracks\n(\n playlist_id INTEGER NOT NULL,\n track_id INTEGER NOT NULL,\n CONSTRAINT PK_PlaylistTrack PRIMARY KEY (playlist_id, track_id),\n FOREIGN KEY (playlist_id) REFERENCES playlists (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (track_id) REFERENCES tracks (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);" ]
How many orders does Luca Mancini have in his invoices?
SELECT count(*) FROM customers AS T1 JOIN invoices AS T2 ON T1.id = T2.customer_id WHERE T1.first_name = "Lucas" AND T1.last_name = "Mancini";
[ "SELECT", "count", "(", "*", ")", "FROM", "customers", "AS", "T1", "JOIN", "invoices", "AS", "T2", "ON", "T1.id", "=", "T2.customer_id", "WHERE", "T1.first_name", "=", "``", "Lucas", "''", "AND", "T1.last_name", "=", "``", "Mancini", "''", ";" ]
[ "select", "count", "(", "*", ")", "from", "customers", "as", "t1", "join", "invoices", "as", "t2", "on", "t1", ".", "id", "=", "t2", ".", "customer_id", "where", "t1", ".", "first_name", "=", "value", "and", "t1", ".", "last_name", "=", "value" ]
[ "How", "many", "orders", "does", "Luca", "Mancini", "have", "in", "his", "invoices", "?" ]
store_1
[ "Create Tables\n********************************************************************************/\nCREATE TABLE artists\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE albums\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n title VARCHAR(160) NOT NULL,\n artist_id INTEGER NOT NULL,\n FOREIGN KEY (artist_id) REFERENCES artists (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE employees\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n last_name VARCHAR(20) NOT NULL,\n first_name VARCHAR(20) NOT NULL,\n title VARCHAR(30),\n reports_to INTEGER,\n birth_date TIMESTAMP,\n hire_date TIMESTAMP,\n address VARCHAR(70),\n city VARCHAR(40),\n state VARCHAR(40),\n country VARCHAR(40),\n postal_code VARCHAR(10),\n phone VARCHAR(24),\n fax VARCHAR(24),\n email VARCHAR(60),\n FOREIGN KEY (reports_to) REFERENCES employees (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE customers\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n first_name VARCHAR(40) NOT NULL,\n last_name VARCHAR(20) NOT NULL,\n company VARCHAR(80),\n address VARCHAR(70),\n city VARCHAR(40),\n state VARCHAR(40),\n country VARCHAR(40),\n postal_code VARCHAR(10),\n phone VARCHAR(24),\n fax VARCHAR(24),\n email VARCHAR(60) NOT NULL,\n support_rep_id INTEGER,\n FOREIGN KEY (support_rep_id) REFERENCES employees (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE genres\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE invoices\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n customer_id INTEGER NOT NULL,\n invoice_date TIMESTAMP NOT NULL,\n billing_address VARCHAR(70),\n billing_city VARCHAR(40),\n billing_state VARCHAR(40),\n billing_country VARCHAR(40),\n billing_postal_code VARCHAR(10),\n total NUMERIC(10,2) NOT NULL,\n FOREIGN KEY (customer_id) REFERENCES customers (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE media_types\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE tracks\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(200) NOT NULL,\n album_id INTEGER,\n media_type_id INTEGER NOT NULL,\n genre_id INTEGER,\n composer VARCHAR(220),\n milliseconds INTEGER NOT NULL,\n bytes INTEGER,\n unit_price NUMERIC(10,2) NOT NULL,\n FOREIGN KEY (album_id) REFERENCES albums (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (genre_id) REFERENCES genres (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (media_type_id) REFERENCES media_types (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE invoice_lines\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n invoice_id INTEGER NOT NULL,\n track_id INTEGER NOT NULL,\n unit_price NUMERIC(10,2) NOT NULL,\n quantity INTEGER NOT NULL,\n FOREIGN KEY (invoice_id) REFERENCES invoices (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (track_id) REFERENCES tracks (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE playlists\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE playlist_tracks\n(\n playlist_id INTEGER NOT NULL,\n track_id INTEGER NOT NULL,\n CONSTRAINT PK_PlaylistTrack PRIMARY KEY (playlist_id, track_id),\n FOREIGN KEY (playlist_id) REFERENCES playlists (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (track_id) REFERENCES tracks (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);" ]
What is the total amount of money spent by Lucas Mancini?
SELECT sum(T2.total) FROM customers AS T1 JOIN invoices AS T2 ON T1.id = T2.customer_id WHERE T1.first_name = "Lucas" AND T1.last_name = "Mancini";
[ "SELECT", "sum", "(", "T2.total", ")", "FROM", "customers", "AS", "T1", "JOIN", "invoices", "AS", "T2", "ON", "T1.id", "=", "T2.customer_id", "WHERE", "T1.first_name", "=", "``", "Lucas", "''", "AND", "T1.last_name", "=", "``", "Mancini", "''", ";" ]
[ "select", "sum", "(", "t2", ".", "total", ")", "from", "customers", "as", "t1", "join", "invoices", "as", "t2", "on", "t1", ".", "id", "=", "t2", ".", "customer_id", "where", "t1", ".", "first_name", "=", "value", "and", "t1", ".", "last_name", "=", "value" ]
[ "What", "is", "the", "total", "amount", "of", "money", "spent", "by", "Lucas", "Mancini", "?" ]
store_1
[ "Create Tables\n********************************************************************************/\nCREATE TABLE artists\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE albums\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n title VARCHAR(160) NOT NULL,\n artist_id INTEGER NOT NULL,\n FOREIGN KEY (artist_id) REFERENCES artists (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE employees\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n last_name VARCHAR(20) NOT NULL,\n first_name VARCHAR(20) NOT NULL,\n title VARCHAR(30),\n reports_to INTEGER,\n birth_date TIMESTAMP,\n hire_date TIMESTAMP,\n address VARCHAR(70),\n city VARCHAR(40),\n state VARCHAR(40),\n country VARCHAR(40),\n postal_code VARCHAR(10),\n phone VARCHAR(24),\n fax VARCHAR(24),\n email VARCHAR(60),\n FOREIGN KEY (reports_to) REFERENCES employees (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE customers\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n first_name VARCHAR(40) NOT NULL,\n last_name VARCHAR(20) NOT NULL,\n company VARCHAR(80),\n address VARCHAR(70),\n city VARCHAR(40),\n state VARCHAR(40),\n country VARCHAR(40),\n postal_code VARCHAR(10),\n phone VARCHAR(24),\n fax VARCHAR(24),\n email VARCHAR(60) NOT NULL,\n support_rep_id INTEGER,\n FOREIGN KEY (support_rep_id) REFERENCES employees (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE genres\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE invoices\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n customer_id INTEGER NOT NULL,\n invoice_date TIMESTAMP NOT NULL,\n billing_address VARCHAR(70),\n billing_city VARCHAR(40),\n billing_state VARCHAR(40),\n billing_country VARCHAR(40),\n billing_postal_code VARCHAR(10),\n total NUMERIC(10,2) NOT NULL,\n FOREIGN KEY (customer_id) REFERENCES customers (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE media_types\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE tracks\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(200) NOT NULL,\n album_id INTEGER,\n media_type_id INTEGER NOT NULL,\n genre_id INTEGER,\n composer VARCHAR(220),\n milliseconds INTEGER NOT NULL,\n bytes INTEGER,\n unit_price NUMERIC(10,2) NOT NULL,\n FOREIGN KEY (album_id) REFERENCES albums (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (genre_id) REFERENCES genres (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (media_type_id) REFERENCES media_types (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE invoice_lines\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n invoice_id INTEGER NOT NULL,\n track_id INTEGER NOT NULL,\n unit_price NUMERIC(10,2) NOT NULL,\n quantity INTEGER NOT NULL,\n FOREIGN KEY (invoice_id) REFERENCES invoices (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (track_id) REFERENCES tracks (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE playlists\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE playlist_tracks\n(\n playlist_id INTEGER NOT NULL,\n track_id INTEGER NOT NULL,\n CONSTRAINT PK_PlaylistTrack PRIMARY KEY (playlist_id, track_id),\n FOREIGN KEY (playlist_id) REFERENCES playlists (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (track_id) REFERENCES tracks (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);" ]
How much money did Lucas Mancini spend?
SELECT sum(T2.total) FROM customers AS T1 JOIN invoices AS T2 ON T1.id = T2.customer_id WHERE T1.first_name = "Lucas" AND T1.last_name = "Mancini";
[ "SELECT", "sum", "(", "T2.total", ")", "FROM", "customers", "AS", "T1", "JOIN", "invoices", "AS", "T2", "ON", "T1.id", "=", "T2.customer_id", "WHERE", "T1.first_name", "=", "``", "Lucas", "''", "AND", "T1.last_name", "=", "``", "Mancini", "''", ";" ]
[ "select", "sum", "(", "t2", ".", "total", ")", "from", "customers", "as", "t1", "join", "invoices", "as", "t2", "on", "t1", ".", "id", "=", "t2", ".", "customer_id", "where", "t1", ".", "first_name", "=", "value", "and", "t1", ".", "last_name", "=", "value" ]
[ "How", "much", "money", "did", "Lucas", "Mancini", "spend", "?" ]
store_1
[ "Create Tables\n********************************************************************************/\nCREATE TABLE artists\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE albums\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n title VARCHAR(160) NOT NULL,\n artist_id INTEGER NOT NULL,\n FOREIGN KEY (artist_id) REFERENCES artists (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE employees\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n last_name VARCHAR(20) NOT NULL,\n first_name VARCHAR(20) NOT NULL,\n title VARCHAR(30),\n reports_to INTEGER,\n birth_date TIMESTAMP,\n hire_date TIMESTAMP,\n address VARCHAR(70),\n city VARCHAR(40),\n state VARCHAR(40),\n country VARCHAR(40),\n postal_code VARCHAR(10),\n phone VARCHAR(24),\n fax VARCHAR(24),\n email VARCHAR(60),\n FOREIGN KEY (reports_to) REFERENCES employees (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE customers\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n first_name VARCHAR(40) NOT NULL,\n last_name VARCHAR(20) NOT NULL,\n company VARCHAR(80),\n address VARCHAR(70),\n city VARCHAR(40),\n state VARCHAR(40),\n country VARCHAR(40),\n postal_code VARCHAR(10),\n phone VARCHAR(24),\n fax VARCHAR(24),\n email VARCHAR(60) NOT NULL,\n support_rep_id INTEGER,\n FOREIGN KEY (support_rep_id) REFERENCES employees (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE genres\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE invoices\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n customer_id INTEGER NOT NULL,\n invoice_date TIMESTAMP NOT NULL,\n billing_address VARCHAR(70),\n billing_city VARCHAR(40),\n billing_state VARCHAR(40),\n billing_country VARCHAR(40),\n billing_postal_code VARCHAR(10),\n total NUMERIC(10,2) NOT NULL,\n FOREIGN KEY (customer_id) REFERENCES customers (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE media_types\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE tracks\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(200) NOT NULL,\n album_id INTEGER,\n media_type_id INTEGER NOT NULL,\n genre_id INTEGER,\n composer VARCHAR(220),\n milliseconds INTEGER NOT NULL,\n bytes INTEGER,\n unit_price NUMERIC(10,2) NOT NULL,\n FOREIGN KEY (album_id) REFERENCES albums (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (genre_id) REFERENCES genres (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (media_type_id) REFERENCES media_types (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE invoice_lines\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n invoice_id INTEGER NOT NULL,\n track_id INTEGER NOT NULL,\n unit_price NUMERIC(10,2) NOT NULL,\n quantity INTEGER NOT NULL,\n FOREIGN KEY (invoice_id) REFERENCES invoices (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (track_id) REFERENCES tracks (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE playlists\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE playlist_tracks\n(\n playlist_id INTEGER NOT NULL,\n track_id INTEGER NOT NULL,\n CONSTRAINT PK_PlaylistTrack PRIMARY KEY (playlist_id, track_id),\n FOREIGN KEY (playlist_id) REFERENCES playlists (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (track_id) REFERENCES tracks (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);" ]
List all media types.
SELECT name FROM media_types;
[ "SELECT", "name", "FROM", "media_types", ";" ]
[ "select", "name", "from", "media_types" ]
[ "List", "all", "media", "types", "." ]
store_1
[ "Create Tables\n********************************************************************************/\nCREATE TABLE artists\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE albums\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n title VARCHAR(160) NOT NULL,\n artist_id INTEGER NOT NULL,\n FOREIGN KEY (artist_id) REFERENCES artists (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE employees\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n last_name VARCHAR(20) NOT NULL,\n first_name VARCHAR(20) NOT NULL,\n title VARCHAR(30),\n reports_to INTEGER,\n birth_date TIMESTAMP,\n hire_date TIMESTAMP,\n address VARCHAR(70),\n city VARCHAR(40),\n state VARCHAR(40),\n country VARCHAR(40),\n postal_code VARCHAR(10),\n phone VARCHAR(24),\n fax VARCHAR(24),\n email VARCHAR(60),\n FOREIGN KEY (reports_to) REFERENCES employees (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE customers\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n first_name VARCHAR(40) NOT NULL,\n last_name VARCHAR(20) NOT NULL,\n company VARCHAR(80),\n address VARCHAR(70),\n city VARCHAR(40),\n state VARCHAR(40),\n country VARCHAR(40),\n postal_code VARCHAR(10),\n phone VARCHAR(24),\n fax VARCHAR(24),\n email VARCHAR(60) NOT NULL,\n support_rep_id INTEGER,\n FOREIGN KEY (support_rep_id) REFERENCES employees (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE genres\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE invoices\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n customer_id INTEGER NOT NULL,\n invoice_date TIMESTAMP NOT NULL,\n billing_address VARCHAR(70),\n billing_city VARCHAR(40),\n billing_state VARCHAR(40),\n billing_country VARCHAR(40),\n billing_postal_code VARCHAR(10),\n total NUMERIC(10,2) NOT NULL,\n FOREIGN KEY (customer_id) REFERENCES customers (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE media_types\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE tracks\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(200) NOT NULL,\n album_id INTEGER,\n media_type_id INTEGER NOT NULL,\n genre_id INTEGER,\n composer VARCHAR(220),\n milliseconds INTEGER NOT NULL,\n bytes INTEGER,\n unit_price NUMERIC(10,2) NOT NULL,\n FOREIGN KEY (album_id) REFERENCES albums (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (genre_id) REFERENCES genres (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (media_type_id) REFERENCES media_types (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE invoice_lines\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n invoice_id INTEGER NOT NULL,\n track_id INTEGER NOT NULL,\n unit_price NUMERIC(10,2) NOT NULL,\n quantity INTEGER NOT NULL,\n FOREIGN KEY (invoice_id) REFERENCES invoices (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (track_id) REFERENCES tracks (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE playlists\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE playlist_tracks\n(\n playlist_id INTEGER NOT NULL,\n track_id INTEGER NOT NULL,\n CONSTRAINT PK_PlaylistTrack PRIMARY KEY (playlist_id, track_id),\n FOREIGN KEY (playlist_id) REFERENCES playlists (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (track_id) REFERENCES tracks (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);" ]
What are the names of all the media types?
SELECT name FROM media_types;
[ "SELECT", "name", "FROM", "media_types", ";" ]
[ "select", "name", "from", "media_types" ]
[ "What", "are", "the", "names", "of", "all", "the", "media", "types", "?" ]
store_1
[ "Create Tables\n********************************************************************************/\nCREATE TABLE artists\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE albums\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n title VARCHAR(160) NOT NULL,\n artist_id INTEGER NOT NULL,\n FOREIGN KEY (artist_id) REFERENCES artists (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE employees\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n last_name VARCHAR(20) NOT NULL,\n first_name VARCHAR(20) NOT NULL,\n title VARCHAR(30),\n reports_to INTEGER,\n birth_date TIMESTAMP,\n hire_date TIMESTAMP,\n address VARCHAR(70),\n city VARCHAR(40),\n state VARCHAR(40),\n country VARCHAR(40),\n postal_code VARCHAR(10),\n phone VARCHAR(24),\n fax VARCHAR(24),\n email VARCHAR(60),\n FOREIGN KEY (reports_to) REFERENCES employees (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE customers\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n first_name VARCHAR(40) NOT NULL,\n last_name VARCHAR(20) NOT NULL,\n company VARCHAR(80),\n address VARCHAR(70),\n city VARCHAR(40),\n state VARCHAR(40),\n country VARCHAR(40),\n postal_code VARCHAR(10),\n phone VARCHAR(24),\n fax VARCHAR(24),\n email VARCHAR(60) NOT NULL,\n support_rep_id INTEGER,\n FOREIGN KEY (support_rep_id) REFERENCES employees (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE genres\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE invoices\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n customer_id INTEGER NOT NULL,\n invoice_date TIMESTAMP NOT NULL,\n billing_address VARCHAR(70),\n billing_city VARCHAR(40),\n billing_state VARCHAR(40),\n billing_country VARCHAR(40),\n billing_postal_code VARCHAR(10),\n total NUMERIC(10,2) NOT NULL,\n FOREIGN KEY (customer_id) REFERENCES customers (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE media_types\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE tracks\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(200) NOT NULL,\n album_id INTEGER,\n media_type_id INTEGER NOT NULL,\n genre_id INTEGER,\n composer VARCHAR(220),\n milliseconds INTEGER NOT NULL,\n bytes INTEGER,\n unit_price NUMERIC(10,2) NOT NULL,\n FOREIGN KEY (album_id) REFERENCES albums (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (genre_id) REFERENCES genres (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (media_type_id) REFERENCES media_types (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE invoice_lines\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n invoice_id INTEGER NOT NULL,\n track_id INTEGER NOT NULL,\n unit_price NUMERIC(10,2) NOT NULL,\n quantity INTEGER NOT NULL,\n FOREIGN KEY (invoice_id) REFERENCES invoices (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (track_id) REFERENCES tracks (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE playlists\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE playlist_tracks\n(\n playlist_id INTEGER NOT NULL,\n track_id INTEGER NOT NULL,\n CONSTRAINT PK_PlaylistTrack PRIMARY KEY (playlist_id, track_id),\n FOREIGN KEY (playlist_id) REFERENCES playlists (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (track_id) REFERENCES tracks (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);" ]
List all different genre types.
SELECT DISTINCT name FROM genres;
[ "SELECT", "DISTINCT", "name", "FROM", "genres", ";" ]
[ "select", "distinct", "name", "from", "genres" ]
[ "List", "all", "different", "genre", "types", "." ]
store_1
[ "Create Tables\n********************************************************************************/\nCREATE TABLE artists\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE albums\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n title VARCHAR(160) NOT NULL,\n artist_id INTEGER NOT NULL,\n FOREIGN KEY (artist_id) REFERENCES artists (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE employees\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n last_name VARCHAR(20) NOT NULL,\n first_name VARCHAR(20) NOT NULL,\n title VARCHAR(30),\n reports_to INTEGER,\n birth_date TIMESTAMP,\n hire_date TIMESTAMP,\n address VARCHAR(70),\n city VARCHAR(40),\n state VARCHAR(40),\n country VARCHAR(40),\n postal_code VARCHAR(10),\n phone VARCHAR(24),\n fax VARCHAR(24),\n email VARCHAR(60),\n FOREIGN KEY (reports_to) REFERENCES employees (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE customers\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n first_name VARCHAR(40) NOT NULL,\n last_name VARCHAR(20) NOT NULL,\n company VARCHAR(80),\n address VARCHAR(70),\n city VARCHAR(40),\n state VARCHAR(40),\n country VARCHAR(40),\n postal_code VARCHAR(10),\n phone VARCHAR(24),\n fax VARCHAR(24),\n email VARCHAR(60) NOT NULL,\n support_rep_id INTEGER,\n FOREIGN KEY (support_rep_id) REFERENCES employees (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE genres\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE invoices\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n customer_id INTEGER NOT NULL,\n invoice_date TIMESTAMP NOT NULL,\n billing_address VARCHAR(70),\n billing_city VARCHAR(40),\n billing_state VARCHAR(40),\n billing_country VARCHAR(40),\n billing_postal_code VARCHAR(10),\n total NUMERIC(10,2) NOT NULL,\n FOREIGN KEY (customer_id) REFERENCES customers (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE media_types\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE tracks\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(200) NOT NULL,\n album_id INTEGER,\n media_type_id INTEGER NOT NULL,\n genre_id INTEGER,\n composer VARCHAR(220),\n milliseconds INTEGER NOT NULL,\n bytes INTEGER,\n unit_price NUMERIC(10,2) NOT NULL,\n FOREIGN KEY (album_id) REFERENCES albums (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (genre_id) REFERENCES genres (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (media_type_id) REFERENCES media_types (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE invoice_lines\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n invoice_id INTEGER NOT NULL,\n track_id INTEGER NOT NULL,\n unit_price NUMERIC(10,2) NOT NULL,\n quantity INTEGER NOT NULL,\n FOREIGN KEY (invoice_id) REFERENCES invoices (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (track_id) REFERENCES tracks (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE playlists\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE playlist_tracks\n(\n playlist_id INTEGER NOT NULL,\n track_id INTEGER NOT NULL,\n CONSTRAINT PK_PlaylistTrack PRIMARY KEY (playlist_id, track_id),\n FOREIGN KEY (playlist_id) REFERENCES playlists (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (track_id) REFERENCES tracks (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);" ]
What are the different names of the genres?
SELECT DISTINCT name FROM genres;
[ "SELECT", "DISTINCT", "name", "FROM", "genres", ";" ]
[ "select", "distinct", "name", "from", "genres" ]
[ "What", "are", "the", "different", "names", "of", "the", "genres", "?" ]
store_1
[ "Create Tables\n********************************************************************************/\nCREATE TABLE artists\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE albums\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n title VARCHAR(160) NOT NULL,\n artist_id INTEGER NOT NULL,\n FOREIGN KEY (artist_id) REFERENCES artists (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE employees\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n last_name VARCHAR(20) NOT NULL,\n first_name VARCHAR(20) NOT NULL,\n title VARCHAR(30),\n reports_to INTEGER,\n birth_date TIMESTAMP,\n hire_date TIMESTAMP,\n address VARCHAR(70),\n city VARCHAR(40),\n state VARCHAR(40),\n country VARCHAR(40),\n postal_code VARCHAR(10),\n phone VARCHAR(24),\n fax VARCHAR(24),\n email VARCHAR(60),\n FOREIGN KEY (reports_to) REFERENCES employees (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE customers\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n first_name VARCHAR(40) NOT NULL,\n last_name VARCHAR(20) NOT NULL,\n company VARCHAR(80),\n address VARCHAR(70),\n city VARCHAR(40),\n state VARCHAR(40),\n country VARCHAR(40),\n postal_code VARCHAR(10),\n phone VARCHAR(24),\n fax VARCHAR(24),\n email VARCHAR(60) NOT NULL,\n support_rep_id INTEGER,\n FOREIGN KEY (support_rep_id) REFERENCES employees (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE genres\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE invoices\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n customer_id INTEGER NOT NULL,\n invoice_date TIMESTAMP NOT NULL,\n billing_address VARCHAR(70),\n billing_city VARCHAR(40),\n billing_state VARCHAR(40),\n billing_country VARCHAR(40),\n billing_postal_code VARCHAR(10),\n total NUMERIC(10,2) NOT NULL,\n FOREIGN KEY (customer_id) REFERENCES customers (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE media_types\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE tracks\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(200) NOT NULL,\n album_id INTEGER,\n media_type_id INTEGER NOT NULL,\n genre_id INTEGER,\n composer VARCHAR(220),\n milliseconds INTEGER NOT NULL,\n bytes INTEGER,\n unit_price NUMERIC(10,2) NOT NULL,\n FOREIGN KEY (album_id) REFERENCES albums (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (genre_id) REFERENCES genres (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (media_type_id) REFERENCES media_types (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE invoice_lines\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n invoice_id INTEGER NOT NULL,\n track_id INTEGER NOT NULL,\n unit_price NUMERIC(10,2) NOT NULL,\n quantity INTEGER NOT NULL,\n FOREIGN KEY (invoice_id) REFERENCES invoices (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (track_id) REFERENCES tracks (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE playlists\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE playlist_tracks\n(\n playlist_id INTEGER NOT NULL,\n track_id INTEGER NOT NULL,\n CONSTRAINT PK_PlaylistTrack PRIMARY KEY (playlist_id, track_id),\n FOREIGN KEY (playlist_id) REFERENCES playlists (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (track_id) REFERENCES tracks (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);" ]
List the name of all playlist.
SELECT name FROM playlists;
[ "SELECT", "name", "FROM", "playlists", ";" ]
[ "select", "name", "from", "playlists" ]
[ "List", "the", "name", "of", "all", "playlist", "." ]
store_1
[ "Create Tables\n********************************************************************************/\nCREATE TABLE artists\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE albums\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n title VARCHAR(160) NOT NULL,\n artist_id INTEGER NOT NULL,\n FOREIGN KEY (artist_id) REFERENCES artists (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE employees\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n last_name VARCHAR(20) NOT NULL,\n first_name VARCHAR(20) NOT NULL,\n title VARCHAR(30),\n reports_to INTEGER,\n birth_date TIMESTAMP,\n hire_date TIMESTAMP,\n address VARCHAR(70),\n city VARCHAR(40),\n state VARCHAR(40),\n country VARCHAR(40),\n postal_code VARCHAR(10),\n phone VARCHAR(24),\n fax VARCHAR(24),\n email VARCHAR(60),\n FOREIGN KEY (reports_to) REFERENCES employees (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE customers\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n first_name VARCHAR(40) NOT NULL,\n last_name VARCHAR(20) NOT NULL,\n company VARCHAR(80),\n address VARCHAR(70),\n city VARCHAR(40),\n state VARCHAR(40),\n country VARCHAR(40),\n postal_code VARCHAR(10),\n phone VARCHAR(24),\n fax VARCHAR(24),\n email VARCHAR(60) NOT NULL,\n support_rep_id INTEGER,\n FOREIGN KEY (support_rep_id) REFERENCES employees (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE genres\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE invoices\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n customer_id INTEGER NOT NULL,\n invoice_date TIMESTAMP NOT NULL,\n billing_address VARCHAR(70),\n billing_city VARCHAR(40),\n billing_state VARCHAR(40),\n billing_country VARCHAR(40),\n billing_postal_code VARCHAR(10),\n total NUMERIC(10,2) NOT NULL,\n FOREIGN KEY (customer_id) REFERENCES customers (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE media_types\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE tracks\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(200) NOT NULL,\n album_id INTEGER,\n media_type_id INTEGER NOT NULL,\n genre_id INTEGER,\n composer VARCHAR(220),\n milliseconds INTEGER NOT NULL,\n bytes INTEGER,\n unit_price NUMERIC(10,2) NOT NULL,\n FOREIGN KEY (album_id) REFERENCES albums (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (genre_id) REFERENCES genres (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (media_type_id) REFERENCES media_types (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE invoice_lines\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n invoice_id INTEGER NOT NULL,\n track_id INTEGER NOT NULL,\n unit_price NUMERIC(10,2) NOT NULL,\n quantity INTEGER NOT NULL,\n FOREIGN KEY (invoice_id) REFERENCES invoices (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (track_id) REFERENCES tracks (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE playlists\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE playlist_tracks\n(\n playlist_id INTEGER NOT NULL,\n track_id INTEGER NOT NULL,\n CONSTRAINT PK_PlaylistTrack PRIMARY KEY (playlist_id, track_id),\n FOREIGN KEY (playlist_id) REFERENCES playlists (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (track_id) REFERENCES tracks (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);" ]
What are the names of all the playlists?
SELECT name FROM playlists;
[ "SELECT", "name", "FROM", "playlists", ";" ]
[ "select", "name", "from", "playlists" ]
[ "What", "are", "the", "names", "of", "all", "the", "playlists", "?" ]
store_1
[ "Create Tables\n********************************************************************************/\nCREATE TABLE artists\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE albums\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n title VARCHAR(160) NOT NULL,\n artist_id INTEGER NOT NULL,\n FOREIGN KEY (artist_id) REFERENCES artists (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE employees\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n last_name VARCHAR(20) NOT NULL,\n first_name VARCHAR(20) NOT NULL,\n title VARCHAR(30),\n reports_to INTEGER,\n birth_date TIMESTAMP,\n hire_date TIMESTAMP,\n address VARCHAR(70),\n city VARCHAR(40),\n state VARCHAR(40),\n country VARCHAR(40),\n postal_code VARCHAR(10),\n phone VARCHAR(24),\n fax VARCHAR(24),\n email VARCHAR(60),\n FOREIGN KEY (reports_to) REFERENCES employees (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE customers\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n first_name VARCHAR(40) NOT NULL,\n last_name VARCHAR(20) NOT NULL,\n company VARCHAR(80),\n address VARCHAR(70),\n city VARCHAR(40),\n state VARCHAR(40),\n country VARCHAR(40),\n postal_code VARCHAR(10),\n phone VARCHAR(24),\n fax VARCHAR(24),\n email VARCHAR(60) NOT NULL,\n support_rep_id INTEGER,\n FOREIGN KEY (support_rep_id) REFERENCES employees (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE genres\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE invoices\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n customer_id INTEGER NOT NULL,\n invoice_date TIMESTAMP NOT NULL,\n billing_address VARCHAR(70),\n billing_city VARCHAR(40),\n billing_state VARCHAR(40),\n billing_country VARCHAR(40),\n billing_postal_code VARCHAR(10),\n total NUMERIC(10,2) NOT NULL,\n FOREIGN KEY (customer_id) REFERENCES customers (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE media_types\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE tracks\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(200) NOT NULL,\n album_id INTEGER,\n media_type_id INTEGER NOT NULL,\n genre_id INTEGER,\n composer VARCHAR(220),\n milliseconds INTEGER NOT NULL,\n bytes INTEGER,\n unit_price NUMERIC(10,2) NOT NULL,\n FOREIGN KEY (album_id) REFERENCES albums (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (genre_id) REFERENCES genres (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (media_type_id) REFERENCES media_types (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE invoice_lines\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n invoice_id INTEGER NOT NULL,\n track_id INTEGER NOT NULL,\n unit_price NUMERIC(10,2) NOT NULL,\n quantity INTEGER NOT NULL,\n FOREIGN KEY (invoice_id) REFERENCES invoices (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (track_id) REFERENCES tracks (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE playlists\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE playlist_tracks\n(\n playlist_id INTEGER NOT NULL,\n track_id INTEGER NOT NULL,\n CONSTRAINT PK_PlaylistTrack PRIMARY KEY (playlist_id, track_id),\n FOREIGN KEY (playlist_id) REFERENCES playlists (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (track_id) REFERENCES tracks (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);" ]
Who is the composer of track Fast As a Shark?
SELECT composer FROM tracks WHERE name = "Fast As a Shark";
[ "SELECT", "composer", "FROM", "tracks", "WHERE", "name", "=", "``", "Fast", "As", "a", "Shark", "''", ";" ]
[ "select", "composer", "from", "tracks", "where", "name", "=", "value" ]
[ "Who", "is", "the", "composer", "of", "track", "Fast", "As", "a", "Shark", "?" ]
store_1
[ "Create Tables\n********************************************************************************/\nCREATE TABLE artists\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE albums\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n title VARCHAR(160) NOT NULL,\n artist_id INTEGER NOT NULL,\n FOREIGN KEY (artist_id) REFERENCES artists (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE employees\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n last_name VARCHAR(20) NOT NULL,\n first_name VARCHAR(20) NOT NULL,\n title VARCHAR(30),\n reports_to INTEGER,\n birth_date TIMESTAMP,\n hire_date TIMESTAMP,\n address VARCHAR(70),\n city VARCHAR(40),\n state VARCHAR(40),\n country VARCHAR(40),\n postal_code VARCHAR(10),\n phone VARCHAR(24),\n fax VARCHAR(24),\n email VARCHAR(60),\n FOREIGN KEY (reports_to) REFERENCES employees (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE customers\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n first_name VARCHAR(40) NOT NULL,\n last_name VARCHAR(20) NOT NULL,\n company VARCHAR(80),\n address VARCHAR(70),\n city VARCHAR(40),\n state VARCHAR(40),\n country VARCHAR(40),\n postal_code VARCHAR(10),\n phone VARCHAR(24),\n fax VARCHAR(24),\n email VARCHAR(60) NOT NULL,\n support_rep_id INTEGER,\n FOREIGN KEY (support_rep_id) REFERENCES employees (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE genres\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE invoices\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n customer_id INTEGER NOT NULL,\n invoice_date TIMESTAMP NOT NULL,\n billing_address VARCHAR(70),\n billing_city VARCHAR(40),\n billing_state VARCHAR(40),\n billing_country VARCHAR(40),\n billing_postal_code VARCHAR(10),\n total NUMERIC(10,2) NOT NULL,\n FOREIGN KEY (customer_id) REFERENCES customers (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE media_types\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE tracks\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(200) NOT NULL,\n album_id INTEGER,\n media_type_id INTEGER NOT NULL,\n genre_id INTEGER,\n composer VARCHAR(220),\n milliseconds INTEGER NOT NULL,\n bytes INTEGER,\n unit_price NUMERIC(10,2) NOT NULL,\n FOREIGN KEY (album_id) REFERENCES albums (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (genre_id) REFERENCES genres (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (media_type_id) REFERENCES media_types (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE invoice_lines\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n invoice_id INTEGER NOT NULL,\n track_id INTEGER NOT NULL,\n unit_price NUMERIC(10,2) NOT NULL,\n quantity INTEGER NOT NULL,\n FOREIGN KEY (invoice_id) REFERENCES invoices (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (track_id) REFERENCES tracks (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE playlists\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE playlist_tracks\n(\n playlist_id INTEGER NOT NULL,\n track_id INTEGER NOT NULL,\n CONSTRAINT PK_PlaylistTrack PRIMARY KEY (playlist_id, track_id),\n FOREIGN KEY (playlist_id) REFERENCES playlists (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (track_id) REFERENCES tracks (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);" ]
What is the composer who created the track "Fast As a Shark"?
SELECT composer FROM tracks WHERE name = "Fast As a Shark";
[ "SELECT", "composer", "FROM", "tracks", "WHERE", "name", "=", "``", "Fast", "As", "a", "Shark", "''", ";" ]
[ "select", "composer", "from", "tracks", "where", "name", "=", "value" ]
[ "What", "is", "the", "composer", "who", "created", "the", "track", "``", "Fast", "As", "a", "Shark", "''", "?" ]
store_1
[ "Create Tables\n********************************************************************************/\nCREATE TABLE artists\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE albums\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n title VARCHAR(160) NOT NULL,\n artist_id INTEGER NOT NULL,\n FOREIGN KEY (artist_id) REFERENCES artists (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE employees\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n last_name VARCHAR(20) NOT NULL,\n first_name VARCHAR(20) NOT NULL,\n title VARCHAR(30),\n reports_to INTEGER,\n birth_date TIMESTAMP,\n hire_date TIMESTAMP,\n address VARCHAR(70),\n city VARCHAR(40),\n state VARCHAR(40),\n country VARCHAR(40),\n postal_code VARCHAR(10),\n phone VARCHAR(24),\n fax VARCHAR(24),\n email VARCHAR(60),\n FOREIGN KEY (reports_to) REFERENCES employees (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE customers\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n first_name VARCHAR(40) NOT NULL,\n last_name VARCHAR(20) NOT NULL,\n company VARCHAR(80),\n address VARCHAR(70),\n city VARCHAR(40),\n state VARCHAR(40),\n country VARCHAR(40),\n postal_code VARCHAR(10),\n phone VARCHAR(24),\n fax VARCHAR(24),\n email VARCHAR(60) NOT NULL,\n support_rep_id INTEGER,\n FOREIGN KEY (support_rep_id) REFERENCES employees (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE genres\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE invoices\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n customer_id INTEGER NOT NULL,\n invoice_date TIMESTAMP NOT NULL,\n billing_address VARCHAR(70),\n billing_city VARCHAR(40),\n billing_state VARCHAR(40),\n billing_country VARCHAR(40),\n billing_postal_code VARCHAR(10),\n total NUMERIC(10,2) NOT NULL,\n FOREIGN KEY (customer_id) REFERENCES customers (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE media_types\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE tracks\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(200) NOT NULL,\n album_id INTEGER,\n media_type_id INTEGER NOT NULL,\n genre_id INTEGER,\n composer VARCHAR(220),\n milliseconds INTEGER NOT NULL,\n bytes INTEGER,\n unit_price NUMERIC(10,2) NOT NULL,\n FOREIGN KEY (album_id) REFERENCES albums (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (genre_id) REFERENCES genres (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (media_type_id) REFERENCES media_types (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE invoice_lines\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n invoice_id INTEGER NOT NULL,\n track_id INTEGER NOT NULL,\n unit_price NUMERIC(10,2) NOT NULL,\n quantity INTEGER NOT NULL,\n FOREIGN KEY (invoice_id) REFERENCES invoices (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (track_id) REFERENCES tracks (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE playlists\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE playlist_tracks\n(\n playlist_id INTEGER NOT NULL,\n track_id INTEGER NOT NULL,\n CONSTRAINT PK_PlaylistTrack PRIMARY KEY (playlist_id, track_id),\n FOREIGN KEY (playlist_id) REFERENCES playlists (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (track_id) REFERENCES tracks (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);" ]
How long does track Fast As a Shark has?
SELECT milliseconds FROM tracks WHERE name = "Fast As a Shark";
[ "SELECT", "milliseconds", "FROM", "tracks", "WHERE", "name", "=", "``", "Fast", "As", "a", "Shark", "''", ";" ]
[ "select", "milliseconds", "from", "tracks", "where", "name", "=", "value" ]
[ "How", "long", "does", "track", "Fast", "As", "a", "Shark", "has", "?" ]
store_1
[ "Create Tables\n********************************************************************************/\nCREATE TABLE artists\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE albums\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n title VARCHAR(160) NOT NULL,\n artist_id INTEGER NOT NULL,\n FOREIGN KEY (artist_id) REFERENCES artists (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE employees\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n last_name VARCHAR(20) NOT NULL,\n first_name VARCHAR(20) NOT NULL,\n title VARCHAR(30),\n reports_to INTEGER,\n birth_date TIMESTAMP,\n hire_date TIMESTAMP,\n address VARCHAR(70),\n city VARCHAR(40),\n state VARCHAR(40),\n country VARCHAR(40),\n postal_code VARCHAR(10),\n phone VARCHAR(24),\n fax VARCHAR(24),\n email VARCHAR(60),\n FOREIGN KEY (reports_to) REFERENCES employees (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE customers\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n first_name VARCHAR(40) NOT NULL,\n last_name VARCHAR(20) NOT NULL,\n company VARCHAR(80),\n address VARCHAR(70),\n city VARCHAR(40),\n state VARCHAR(40),\n country VARCHAR(40),\n postal_code VARCHAR(10),\n phone VARCHAR(24),\n fax VARCHAR(24),\n email VARCHAR(60) NOT NULL,\n support_rep_id INTEGER,\n FOREIGN KEY (support_rep_id) REFERENCES employees (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE genres\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE invoices\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n customer_id INTEGER NOT NULL,\n invoice_date TIMESTAMP NOT NULL,\n billing_address VARCHAR(70),\n billing_city VARCHAR(40),\n billing_state VARCHAR(40),\n billing_country VARCHAR(40),\n billing_postal_code VARCHAR(10),\n total NUMERIC(10,2) NOT NULL,\n FOREIGN KEY (customer_id) REFERENCES customers (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE media_types\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE tracks\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(200) NOT NULL,\n album_id INTEGER,\n media_type_id INTEGER NOT NULL,\n genre_id INTEGER,\n composer VARCHAR(220),\n milliseconds INTEGER NOT NULL,\n bytes INTEGER,\n unit_price NUMERIC(10,2) NOT NULL,\n FOREIGN KEY (album_id) REFERENCES albums (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (genre_id) REFERENCES genres (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (media_type_id) REFERENCES media_types (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE invoice_lines\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n invoice_id INTEGER NOT NULL,\n track_id INTEGER NOT NULL,\n unit_price NUMERIC(10,2) NOT NULL,\n quantity INTEGER NOT NULL,\n FOREIGN KEY (invoice_id) REFERENCES invoices (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (track_id) REFERENCES tracks (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE playlists\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE playlist_tracks\n(\n playlist_id INTEGER NOT NULL,\n track_id INTEGER NOT NULL,\n CONSTRAINT PK_PlaylistTrack PRIMARY KEY (playlist_id, track_id),\n FOREIGN KEY (playlist_id) REFERENCES playlists (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (track_id) REFERENCES tracks (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);" ]
How many milliseconds long is Fast As a Shark?
SELECT milliseconds FROM tracks WHERE name = "Fast As a Shark";
[ "SELECT", "milliseconds", "FROM", "tracks", "WHERE", "name", "=", "``", "Fast", "As", "a", "Shark", "''", ";" ]
[ "select", "milliseconds", "from", "tracks", "where", "name", "=", "value" ]
[ "How", "many", "milliseconds", "long", "is", "Fast", "As", "a", "Shark", "?" ]
store_1
[ "Create Tables\n********************************************************************************/\nCREATE TABLE artists\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE albums\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n title VARCHAR(160) NOT NULL,\n artist_id INTEGER NOT NULL,\n FOREIGN KEY (artist_id) REFERENCES artists (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE employees\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n last_name VARCHAR(20) NOT NULL,\n first_name VARCHAR(20) NOT NULL,\n title VARCHAR(30),\n reports_to INTEGER,\n birth_date TIMESTAMP,\n hire_date TIMESTAMP,\n address VARCHAR(70),\n city VARCHAR(40),\n state VARCHAR(40),\n country VARCHAR(40),\n postal_code VARCHAR(10),\n phone VARCHAR(24),\n fax VARCHAR(24),\n email VARCHAR(60),\n FOREIGN KEY (reports_to) REFERENCES employees (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE customers\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n first_name VARCHAR(40) NOT NULL,\n last_name VARCHAR(20) NOT NULL,\n company VARCHAR(80),\n address VARCHAR(70),\n city VARCHAR(40),\n state VARCHAR(40),\n country VARCHAR(40),\n postal_code VARCHAR(10),\n phone VARCHAR(24),\n fax VARCHAR(24),\n email VARCHAR(60) NOT NULL,\n support_rep_id INTEGER,\n FOREIGN KEY (support_rep_id) REFERENCES employees (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE genres\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE invoices\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n customer_id INTEGER NOT NULL,\n invoice_date TIMESTAMP NOT NULL,\n billing_address VARCHAR(70),\n billing_city VARCHAR(40),\n billing_state VARCHAR(40),\n billing_country VARCHAR(40),\n billing_postal_code VARCHAR(10),\n total NUMERIC(10,2) NOT NULL,\n FOREIGN KEY (customer_id) REFERENCES customers (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE media_types\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE tracks\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(200) NOT NULL,\n album_id INTEGER,\n media_type_id INTEGER NOT NULL,\n genre_id INTEGER,\n composer VARCHAR(220),\n milliseconds INTEGER NOT NULL,\n bytes INTEGER,\n unit_price NUMERIC(10,2) NOT NULL,\n FOREIGN KEY (album_id) REFERENCES albums (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (genre_id) REFERENCES genres (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (media_type_id) REFERENCES media_types (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE invoice_lines\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n invoice_id INTEGER NOT NULL,\n track_id INTEGER NOT NULL,\n unit_price NUMERIC(10,2) NOT NULL,\n quantity INTEGER NOT NULL,\n FOREIGN KEY (invoice_id) REFERENCES invoices (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (track_id) REFERENCES tracks (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE playlists\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE playlist_tracks\n(\n playlist_id INTEGER NOT NULL,\n track_id INTEGER NOT NULL,\n CONSTRAINT PK_PlaylistTrack PRIMARY KEY (playlist_id, track_id),\n FOREIGN KEY (playlist_id) REFERENCES playlists (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (track_id) REFERENCES tracks (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);" ]
What is the name of tracks whose genre is Rock?
SELECT T2.name FROM genres AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id WHERE T1.name = "Rock";
[ "SELECT", "T2.name", "FROM", "genres", "AS", "T1", "JOIN", "tracks", "AS", "T2", "ON", "T1.id", "=", "T2.genre_id", "WHERE", "T1.name", "=", "``", "Rock", "''", ";" ]
[ "select", "t2", ".", "name", "from", "genres", "as", "t1", "join", "tracks", "as", "t2", "on", "t1", ".", "id", "=", "t2", ".", "genre_id", "where", "t1", ".", "name", "=", "value" ]
[ "What", "is", "the", "name", "of", "tracks", "whose", "genre", "is", "Rock", "?" ]
store_1
[ "Create Tables\n********************************************************************************/\nCREATE TABLE artists\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE albums\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n title VARCHAR(160) NOT NULL,\n artist_id INTEGER NOT NULL,\n FOREIGN KEY (artist_id) REFERENCES artists (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE employees\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n last_name VARCHAR(20) NOT NULL,\n first_name VARCHAR(20) NOT NULL,\n title VARCHAR(30),\n reports_to INTEGER,\n birth_date TIMESTAMP,\n hire_date TIMESTAMP,\n address VARCHAR(70),\n city VARCHAR(40),\n state VARCHAR(40),\n country VARCHAR(40),\n postal_code VARCHAR(10),\n phone VARCHAR(24),\n fax VARCHAR(24),\n email VARCHAR(60),\n FOREIGN KEY (reports_to) REFERENCES employees (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE customers\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n first_name VARCHAR(40) NOT NULL,\n last_name VARCHAR(20) NOT NULL,\n company VARCHAR(80),\n address VARCHAR(70),\n city VARCHAR(40),\n state VARCHAR(40),\n country VARCHAR(40),\n postal_code VARCHAR(10),\n phone VARCHAR(24),\n fax VARCHAR(24),\n email VARCHAR(60) NOT NULL,\n support_rep_id INTEGER,\n FOREIGN KEY (support_rep_id) REFERENCES employees (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE genres\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE invoices\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n customer_id INTEGER NOT NULL,\n invoice_date TIMESTAMP NOT NULL,\n billing_address VARCHAR(70),\n billing_city VARCHAR(40),\n billing_state VARCHAR(40),\n billing_country VARCHAR(40),\n billing_postal_code VARCHAR(10),\n total NUMERIC(10,2) NOT NULL,\n FOREIGN KEY (customer_id) REFERENCES customers (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE media_types\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE tracks\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(200) NOT NULL,\n album_id INTEGER,\n media_type_id INTEGER NOT NULL,\n genre_id INTEGER,\n composer VARCHAR(220),\n milliseconds INTEGER NOT NULL,\n bytes INTEGER,\n unit_price NUMERIC(10,2) NOT NULL,\n FOREIGN KEY (album_id) REFERENCES albums (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (genre_id) REFERENCES genres (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (media_type_id) REFERENCES media_types (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE invoice_lines\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n invoice_id INTEGER NOT NULL,\n track_id INTEGER NOT NULL,\n unit_price NUMERIC(10,2) NOT NULL,\n quantity INTEGER NOT NULL,\n FOREIGN KEY (invoice_id) REFERENCES invoices (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (track_id) REFERENCES tracks (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE playlists\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE playlist_tracks\n(\n playlist_id INTEGER NOT NULL,\n track_id INTEGER NOT NULL,\n CONSTRAINT PK_PlaylistTrack PRIMARY KEY (playlist_id, track_id),\n FOREIGN KEY (playlist_id) REFERENCES playlists (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (track_id) REFERENCES tracks (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);" ]
What is the name of all tracks in the Rock genre?
SELECT T2.name FROM genres AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id WHERE T1.name = "Rock";
[ "SELECT", "T2.name", "FROM", "genres", "AS", "T1", "JOIN", "tracks", "AS", "T2", "ON", "T1.id", "=", "T2.genre_id", "WHERE", "T1.name", "=", "``", "Rock", "''", ";" ]
[ "select", "t2", ".", "name", "from", "genres", "as", "t1", "join", "tracks", "as", "t2", "on", "t1", ".", "id", "=", "t2", ".", "genre_id", "where", "t1", ".", "name", "=", "value" ]
[ "What", "is", "the", "name", "of", "all", "tracks", "in", "the", "Rock", "genre", "?" ]
store_1
[ "Create Tables\n********************************************************************************/\nCREATE TABLE artists\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE albums\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n title VARCHAR(160) NOT NULL,\n artist_id INTEGER NOT NULL,\n FOREIGN KEY (artist_id) REFERENCES artists (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE employees\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n last_name VARCHAR(20) NOT NULL,\n first_name VARCHAR(20) NOT NULL,\n title VARCHAR(30),\n reports_to INTEGER,\n birth_date TIMESTAMP,\n hire_date TIMESTAMP,\n address VARCHAR(70),\n city VARCHAR(40),\n state VARCHAR(40),\n country VARCHAR(40),\n postal_code VARCHAR(10),\n phone VARCHAR(24),\n fax VARCHAR(24),\n email VARCHAR(60),\n FOREIGN KEY (reports_to) REFERENCES employees (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE customers\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n first_name VARCHAR(40) NOT NULL,\n last_name VARCHAR(20) NOT NULL,\n company VARCHAR(80),\n address VARCHAR(70),\n city VARCHAR(40),\n state VARCHAR(40),\n country VARCHAR(40),\n postal_code VARCHAR(10),\n phone VARCHAR(24),\n fax VARCHAR(24),\n email VARCHAR(60) NOT NULL,\n support_rep_id INTEGER,\n FOREIGN KEY (support_rep_id) REFERENCES employees (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE genres\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE invoices\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n customer_id INTEGER NOT NULL,\n invoice_date TIMESTAMP NOT NULL,\n billing_address VARCHAR(70),\n billing_city VARCHAR(40),\n billing_state VARCHAR(40),\n billing_country VARCHAR(40),\n billing_postal_code VARCHAR(10),\n total NUMERIC(10,2) NOT NULL,\n FOREIGN KEY (customer_id) REFERENCES customers (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE media_types\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE tracks\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(200) NOT NULL,\n album_id INTEGER,\n media_type_id INTEGER NOT NULL,\n genre_id INTEGER,\n composer VARCHAR(220),\n milliseconds INTEGER NOT NULL,\n bytes INTEGER,\n unit_price NUMERIC(10,2) NOT NULL,\n FOREIGN KEY (album_id) REFERENCES albums (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (genre_id) REFERENCES genres (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (media_type_id) REFERENCES media_types (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE invoice_lines\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n invoice_id INTEGER NOT NULL,\n track_id INTEGER NOT NULL,\n unit_price NUMERIC(10,2) NOT NULL,\n quantity INTEGER NOT NULL,\n FOREIGN KEY (invoice_id) REFERENCES invoices (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (track_id) REFERENCES tracks (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE playlists\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE playlist_tracks\n(\n playlist_id INTEGER NOT NULL,\n track_id INTEGER NOT NULL,\n CONSTRAINT PK_PlaylistTrack PRIMARY KEY (playlist_id, track_id),\n FOREIGN KEY (playlist_id) REFERENCES playlists (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (track_id) REFERENCES tracks (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);" ]
What is title of album which track Balls to the Wall belongs to?
SELECT T1.title FROM albums AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id WHERE T2.name = "Balls to the Wall";
[ "SELECT", "T1.title", "FROM", "albums", "AS", "T1", "JOIN", "tracks", "AS", "T2", "ON", "T1.id", "=", "T2.genre_id", "WHERE", "T2.name", "=", "``", "Balls", "to", "the", "Wall", "''", ";" ]
[ "select", "t1", ".", "title", "from", "albums", "as", "t1", "join", "tracks", "as", "t2", "on", "t1", ".", "id", "=", "t2", ".", "genre_id", "where", "t2", ".", "name", "=", "value" ]
[ "What", "is", "title", "of", "album", "which", "track", "Balls", "to", "the", "Wall", "belongs", "to", "?" ]
store_1
[ "Create Tables\n********************************************************************************/\nCREATE TABLE artists\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE albums\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n title VARCHAR(160) NOT NULL,\n artist_id INTEGER NOT NULL,\n FOREIGN KEY (artist_id) REFERENCES artists (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE employees\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n last_name VARCHAR(20) NOT NULL,\n first_name VARCHAR(20) NOT NULL,\n title VARCHAR(30),\n reports_to INTEGER,\n birth_date TIMESTAMP,\n hire_date TIMESTAMP,\n address VARCHAR(70),\n city VARCHAR(40),\n state VARCHAR(40),\n country VARCHAR(40),\n postal_code VARCHAR(10),\n phone VARCHAR(24),\n fax VARCHAR(24),\n email VARCHAR(60),\n FOREIGN KEY (reports_to) REFERENCES employees (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE customers\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n first_name VARCHAR(40) NOT NULL,\n last_name VARCHAR(20) NOT NULL,\n company VARCHAR(80),\n address VARCHAR(70),\n city VARCHAR(40),\n state VARCHAR(40),\n country VARCHAR(40),\n postal_code VARCHAR(10),\n phone VARCHAR(24),\n fax VARCHAR(24),\n email VARCHAR(60) NOT NULL,\n support_rep_id INTEGER,\n FOREIGN KEY (support_rep_id) REFERENCES employees (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE genres\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE invoices\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n customer_id INTEGER NOT NULL,\n invoice_date TIMESTAMP NOT NULL,\n billing_address VARCHAR(70),\n billing_city VARCHAR(40),\n billing_state VARCHAR(40),\n billing_country VARCHAR(40),\n billing_postal_code VARCHAR(10),\n total NUMERIC(10,2) NOT NULL,\n FOREIGN KEY (customer_id) REFERENCES customers (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE media_types\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE tracks\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(200) NOT NULL,\n album_id INTEGER,\n media_type_id INTEGER NOT NULL,\n genre_id INTEGER,\n composer VARCHAR(220),\n milliseconds INTEGER NOT NULL,\n bytes INTEGER,\n unit_price NUMERIC(10,2) NOT NULL,\n FOREIGN KEY (album_id) REFERENCES albums (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (genre_id) REFERENCES genres (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (media_type_id) REFERENCES media_types (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE invoice_lines\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n invoice_id INTEGER NOT NULL,\n track_id INTEGER NOT NULL,\n unit_price NUMERIC(10,2) NOT NULL,\n quantity INTEGER NOT NULL,\n FOREIGN KEY (invoice_id) REFERENCES invoices (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (track_id) REFERENCES tracks (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE playlists\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE playlist_tracks\n(\n playlist_id INTEGER NOT NULL,\n track_id INTEGER NOT NULL,\n CONSTRAINT PK_PlaylistTrack PRIMARY KEY (playlist_id, track_id),\n FOREIGN KEY (playlist_id) REFERENCES playlists (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (track_id) REFERENCES tracks (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);" ]
What is the name of the album that has the track Ball to the Wall?
SELECT T1.title FROM albums AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id WHERE T2.name = "Balls to the Wall";
[ "SELECT", "T1.title", "FROM", "albums", "AS", "T1", "JOIN", "tracks", "AS", "T2", "ON", "T1.id", "=", "T2.genre_id", "WHERE", "T2.name", "=", "``", "Balls", "to", "the", "Wall", "''", ";" ]
[ "select", "t1", ".", "title", "from", "albums", "as", "t1", "join", "tracks", "as", "t2", "on", "t1", ".", "id", "=", "t2", ".", "genre_id", "where", "t2", ".", "name", "=", "value" ]
[ "What", "is", "the", "name", "of", "the", "album", "that", "has", "the", "track", "Ball", "to", "the", "Wall", "?" ]
store_1
[ "Create Tables\n********************************************************************************/\nCREATE TABLE artists\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE albums\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n title VARCHAR(160) NOT NULL,\n artist_id INTEGER NOT NULL,\n FOREIGN KEY (artist_id) REFERENCES artists (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE employees\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n last_name VARCHAR(20) NOT NULL,\n first_name VARCHAR(20) NOT NULL,\n title VARCHAR(30),\n reports_to INTEGER,\n birth_date TIMESTAMP,\n hire_date TIMESTAMP,\n address VARCHAR(70),\n city VARCHAR(40),\n state VARCHAR(40),\n country VARCHAR(40),\n postal_code VARCHAR(10),\n phone VARCHAR(24),\n fax VARCHAR(24),\n email VARCHAR(60),\n FOREIGN KEY (reports_to) REFERENCES employees (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE customers\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n first_name VARCHAR(40) NOT NULL,\n last_name VARCHAR(20) NOT NULL,\n company VARCHAR(80),\n address VARCHAR(70),\n city VARCHAR(40),\n state VARCHAR(40),\n country VARCHAR(40),\n postal_code VARCHAR(10),\n phone VARCHAR(24),\n fax VARCHAR(24),\n email VARCHAR(60) NOT NULL,\n support_rep_id INTEGER,\n FOREIGN KEY (support_rep_id) REFERENCES employees (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE genres\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE invoices\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n customer_id INTEGER NOT NULL,\n invoice_date TIMESTAMP NOT NULL,\n billing_address VARCHAR(70),\n billing_city VARCHAR(40),\n billing_state VARCHAR(40),\n billing_country VARCHAR(40),\n billing_postal_code VARCHAR(10),\n total NUMERIC(10,2) NOT NULL,\n FOREIGN KEY (customer_id) REFERENCES customers (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE media_types\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE tracks\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(200) NOT NULL,\n album_id INTEGER,\n media_type_id INTEGER NOT NULL,\n genre_id INTEGER,\n composer VARCHAR(220),\n milliseconds INTEGER NOT NULL,\n bytes INTEGER,\n unit_price NUMERIC(10,2) NOT NULL,\n FOREIGN KEY (album_id) REFERENCES albums (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (genre_id) REFERENCES genres (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (media_type_id) REFERENCES media_types (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE invoice_lines\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n invoice_id INTEGER NOT NULL,\n track_id INTEGER NOT NULL,\n unit_price NUMERIC(10,2) NOT NULL,\n quantity INTEGER NOT NULL,\n FOREIGN KEY (invoice_id) REFERENCES invoices (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (track_id) REFERENCES tracks (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE playlists\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE playlist_tracks\n(\n playlist_id INTEGER NOT NULL,\n track_id INTEGER NOT NULL,\n CONSTRAINT PK_PlaylistTrack PRIMARY KEY (playlist_id, track_id),\n FOREIGN KEY (playlist_id) REFERENCES playlists (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (track_id) REFERENCES tracks (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);" ]
List name of all tracks in Balls to the Wall.
SELECT T2.name FROM albums AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id WHERE T1.title = "Balls to the Wall";
[ "SELECT", "T2.name", "FROM", "albums", "AS", "T1", "JOIN", "tracks", "AS", "T2", "ON", "T1.id", "=", "T2.genre_id", "WHERE", "T1.title", "=", "``", "Balls", "to", "the", "Wall", "''", ";" ]
[ "select", "t2", ".", "name", "from", "albums", "as", "t1", "join", "tracks", "as", "t2", "on", "t1", ".", "id", "=", "t2", ".", "genre_id", "where", "t1", ".", "title", "=", "value" ]
[ "List", "name", "of", "all", "tracks", "in", "Balls", "to", "the", "Wall", "." ]
store_1
[ "Create Tables\n********************************************************************************/\nCREATE TABLE artists\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE albums\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n title VARCHAR(160) NOT NULL,\n artist_id INTEGER NOT NULL,\n FOREIGN KEY (artist_id) REFERENCES artists (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE employees\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n last_name VARCHAR(20) NOT NULL,\n first_name VARCHAR(20) NOT NULL,\n title VARCHAR(30),\n reports_to INTEGER,\n birth_date TIMESTAMP,\n hire_date TIMESTAMP,\n address VARCHAR(70),\n city VARCHAR(40),\n state VARCHAR(40),\n country VARCHAR(40),\n postal_code VARCHAR(10),\n phone VARCHAR(24),\n fax VARCHAR(24),\n email VARCHAR(60),\n FOREIGN KEY (reports_to) REFERENCES employees (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE customers\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n first_name VARCHAR(40) NOT NULL,\n last_name VARCHAR(20) NOT NULL,\n company VARCHAR(80),\n address VARCHAR(70),\n city VARCHAR(40),\n state VARCHAR(40),\n country VARCHAR(40),\n postal_code VARCHAR(10),\n phone VARCHAR(24),\n fax VARCHAR(24),\n email VARCHAR(60) NOT NULL,\n support_rep_id INTEGER,\n FOREIGN KEY (support_rep_id) REFERENCES employees (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE genres\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE invoices\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n customer_id INTEGER NOT NULL,\n invoice_date TIMESTAMP NOT NULL,\n billing_address VARCHAR(70),\n billing_city VARCHAR(40),\n billing_state VARCHAR(40),\n billing_country VARCHAR(40),\n billing_postal_code VARCHAR(10),\n total NUMERIC(10,2) NOT NULL,\n FOREIGN KEY (customer_id) REFERENCES customers (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE media_types\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE tracks\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(200) NOT NULL,\n album_id INTEGER,\n media_type_id INTEGER NOT NULL,\n genre_id INTEGER,\n composer VARCHAR(220),\n milliseconds INTEGER NOT NULL,\n bytes INTEGER,\n unit_price NUMERIC(10,2) NOT NULL,\n FOREIGN KEY (album_id) REFERENCES albums (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (genre_id) REFERENCES genres (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (media_type_id) REFERENCES media_types (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE invoice_lines\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n invoice_id INTEGER NOT NULL,\n track_id INTEGER NOT NULL,\n unit_price NUMERIC(10,2) NOT NULL,\n quantity INTEGER NOT NULL,\n FOREIGN KEY (invoice_id) REFERENCES invoices (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (track_id) REFERENCES tracks (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE playlists\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE playlist_tracks\n(\n playlist_id INTEGER NOT NULL,\n track_id INTEGER NOT NULL,\n CONSTRAINT PK_PlaylistTrack PRIMARY KEY (playlist_id, track_id),\n FOREIGN KEY (playlist_id) REFERENCES playlists (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (track_id) REFERENCES tracks (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);" ]
What is the name of all tracks in the album named Balls to the Wall?
SELECT T2.name FROM albums AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id WHERE T1.title = "Balls to the Wall";
[ "SELECT", "T2.name", "FROM", "albums", "AS", "T1", "JOIN", "tracks", "AS", "T2", "ON", "T1.id", "=", "T2.genre_id", "WHERE", "T1.title", "=", "``", "Balls", "to", "the", "Wall", "''", ";" ]
[ "select", "t2", ".", "name", "from", "albums", "as", "t1", "join", "tracks", "as", "t2", "on", "t1", ".", "id", "=", "t2", ".", "genre_id", "where", "t1", ".", "title", "=", "value" ]
[ "What", "is", "the", "name", "of", "all", "tracks", "in", "the", "album", "named", "Balls", "to", "the", "Wall", "?" ]
store_1
[ "Create Tables\n********************************************************************************/\nCREATE TABLE artists\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE albums\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n title VARCHAR(160) NOT NULL,\n artist_id INTEGER NOT NULL,\n FOREIGN KEY (artist_id) REFERENCES artists (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE employees\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n last_name VARCHAR(20) NOT NULL,\n first_name VARCHAR(20) NOT NULL,\n title VARCHAR(30),\n reports_to INTEGER,\n birth_date TIMESTAMP,\n hire_date TIMESTAMP,\n address VARCHAR(70),\n city VARCHAR(40),\n state VARCHAR(40),\n country VARCHAR(40),\n postal_code VARCHAR(10),\n phone VARCHAR(24),\n fax VARCHAR(24),\n email VARCHAR(60),\n FOREIGN KEY (reports_to) REFERENCES employees (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE customers\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n first_name VARCHAR(40) NOT NULL,\n last_name VARCHAR(20) NOT NULL,\n company VARCHAR(80),\n address VARCHAR(70),\n city VARCHAR(40),\n state VARCHAR(40),\n country VARCHAR(40),\n postal_code VARCHAR(10),\n phone VARCHAR(24),\n fax VARCHAR(24),\n email VARCHAR(60) NOT NULL,\n support_rep_id INTEGER,\n FOREIGN KEY (support_rep_id) REFERENCES employees (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE genres\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE invoices\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n customer_id INTEGER NOT NULL,\n invoice_date TIMESTAMP NOT NULL,\n billing_address VARCHAR(70),\n billing_city VARCHAR(40),\n billing_state VARCHAR(40),\n billing_country VARCHAR(40),\n billing_postal_code VARCHAR(10),\n total NUMERIC(10,2) NOT NULL,\n FOREIGN KEY (customer_id) REFERENCES customers (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE media_types\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE tracks\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(200) NOT NULL,\n album_id INTEGER,\n media_type_id INTEGER NOT NULL,\n genre_id INTEGER,\n composer VARCHAR(220),\n milliseconds INTEGER NOT NULL,\n bytes INTEGER,\n unit_price NUMERIC(10,2) NOT NULL,\n FOREIGN KEY (album_id) REFERENCES albums (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (genre_id) REFERENCES genres (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (media_type_id) REFERENCES media_types (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE invoice_lines\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n invoice_id INTEGER NOT NULL,\n track_id INTEGER NOT NULL,\n unit_price NUMERIC(10,2) NOT NULL,\n quantity INTEGER NOT NULL,\n FOREIGN KEY (invoice_id) REFERENCES invoices (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (track_id) REFERENCES tracks (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE playlists\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE playlist_tracks\n(\n playlist_id INTEGER NOT NULL,\n track_id INTEGER NOT NULL,\n CONSTRAINT PK_PlaylistTrack PRIMARY KEY (playlist_id, track_id),\n FOREIGN KEY (playlist_id) REFERENCES playlists (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (track_id) REFERENCES tracks (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);" ]
List title of albums have the number of tracks greater than 10.
SELECT T1.title FROM albums AS T1 JOIN tracks AS T2 ON T1.id = T2.album_id GROUP BY T1.id HAVING count(T1.id) > 10;
[ "SELECT", "T1.title", "FROM", "albums", "AS", "T1", "JOIN", "tracks", "AS", "T2", "ON", "T1.id", "=", "T2.album_id", "GROUP", "BY", "T1.id", "HAVING", "count", "(", "T1.id", ")", ">", "10", ";" ]
[ "select", "t1", ".", "title", "from", "albums", "as", "t1", "join", "tracks", "as", "t2", "on", "t1", ".", "id", "=", "t2", ".", "album_id", "group", "by", "t1", ".", "id", "having", "count", "(", "t1", ".", "id", ")", ">", "value" ]
[ "List", "title", "of", "albums", "have", "the", "number", "of", "tracks", "greater", "than", "10", "." ]
store_1
[ "Create Tables\n********************************************************************************/\nCREATE TABLE artists\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE albums\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n title VARCHAR(160) NOT NULL,\n artist_id INTEGER NOT NULL,\n FOREIGN KEY (artist_id) REFERENCES artists (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE employees\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n last_name VARCHAR(20) NOT NULL,\n first_name VARCHAR(20) NOT NULL,\n title VARCHAR(30),\n reports_to INTEGER,\n birth_date TIMESTAMP,\n hire_date TIMESTAMP,\n address VARCHAR(70),\n city VARCHAR(40),\n state VARCHAR(40),\n country VARCHAR(40),\n postal_code VARCHAR(10),\n phone VARCHAR(24),\n fax VARCHAR(24),\n email VARCHAR(60),\n FOREIGN KEY (reports_to) REFERENCES employees (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE customers\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n first_name VARCHAR(40) NOT NULL,\n last_name VARCHAR(20) NOT NULL,\n company VARCHAR(80),\n address VARCHAR(70),\n city VARCHAR(40),\n state VARCHAR(40),\n country VARCHAR(40),\n postal_code VARCHAR(10),\n phone VARCHAR(24),\n fax VARCHAR(24),\n email VARCHAR(60) NOT NULL,\n support_rep_id INTEGER,\n FOREIGN KEY (support_rep_id) REFERENCES employees (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE genres\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE invoices\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n customer_id INTEGER NOT NULL,\n invoice_date TIMESTAMP NOT NULL,\n billing_address VARCHAR(70),\n billing_city VARCHAR(40),\n billing_state VARCHAR(40),\n billing_country VARCHAR(40),\n billing_postal_code VARCHAR(10),\n total NUMERIC(10,2) NOT NULL,\n FOREIGN KEY (customer_id) REFERENCES customers (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE media_types\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE tracks\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(200) NOT NULL,\n album_id INTEGER,\n media_type_id INTEGER NOT NULL,\n genre_id INTEGER,\n composer VARCHAR(220),\n milliseconds INTEGER NOT NULL,\n bytes INTEGER,\n unit_price NUMERIC(10,2) NOT NULL,\n FOREIGN KEY (album_id) REFERENCES albums (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (genre_id) REFERENCES genres (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (media_type_id) REFERENCES media_types (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE invoice_lines\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n invoice_id INTEGER NOT NULL,\n track_id INTEGER NOT NULL,\n unit_price NUMERIC(10,2) NOT NULL,\n quantity INTEGER NOT NULL,\n FOREIGN KEY (invoice_id) REFERENCES invoices (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (track_id) REFERENCES tracks (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE playlists\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE playlist_tracks\n(\n playlist_id INTEGER NOT NULL,\n track_id INTEGER NOT NULL,\n CONSTRAINT PK_PlaylistTrack PRIMARY KEY (playlist_id, track_id),\n FOREIGN KEY (playlist_id) REFERENCES playlists (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (track_id) REFERENCES tracks (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);" ]
What are the names of the albums that have more than 10 tracks?
SELECT T1.title FROM albums AS T1 JOIN tracks AS T2 ON T1.id = T2.album_id GROUP BY T1.id HAVING count(T1.id) > 10;
[ "SELECT", "T1.title", "FROM", "albums", "AS", "T1", "JOIN", "tracks", "AS", "T2", "ON", "T1.id", "=", "T2.album_id", "GROUP", "BY", "T1.id", "HAVING", "count", "(", "T1.id", ")", ">", "10", ";" ]
[ "select", "t1", ".", "title", "from", "albums", "as", "t1", "join", "tracks", "as", "t2", "on", "t1", ".", "id", "=", "t2", ".", "album_id", "group", "by", "t1", ".", "id", "having", "count", "(", "t1", ".", "id", ")", ">", "value" ]
[ "What", "are", "the", "names", "of", "the", "albums", "that", "have", "more", "than", "10", "tracks", "?" ]
store_1
[ "Create Tables\n********************************************************************************/\nCREATE TABLE artists\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE albums\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n title VARCHAR(160) NOT NULL,\n artist_id INTEGER NOT NULL,\n FOREIGN KEY (artist_id) REFERENCES artists (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE employees\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n last_name VARCHAR(20) NOT NULL,\n first_name VARCHAR(20) NOT NULL,\n title VARCHAR(30),\n reports_to INTEGER,\n birth_date TIMESTAMP,\n hire_date TIMESTAMP,\n address VARCHAR(70),\n city VARCHAR(40),\n state VARCHAR(40),\n country VARCHAR(40),\n postal_code VARCHAR(10),\n phone VARCHAR(24),\n fax VARCHAR(24),\n email VARCHAR(60),\n FOREIGN KEY (reports_to) REFERENCES employees (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE customers\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n first_name VARCHAR(40) NOT NULL,\n last_name VARCHAR(20) NOT NULL,\n company VARCHAR(80),\n address VARCHAR(70),\n city VARCHAR(40),\n state VARCHAR(40),\n country VARCHAR(40),\n postal_code VARCHAR(10),\n phone VARCHAR(24),\n fax VARCHAR(24),\n email VARCHAR(60) NOT NULL,\n support_rep_id INTEGER,\n FOREIGN KEY (support_rep_id) REFERENCES employees (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE genres\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE invoices\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n customer_id INTEGER NOT NULL,\n invoice_date TIMESTAMP NOT NULL,\n billing_address VARCHAR(70),\n billing_city VARCHAR(40),\n billing_state VARCHAR(40),\n billing_country VARCHAR(40),\n billing_postal_code VARCHAR(10),\n total NUMERIC(10,2) NOT NULL,\n FOREIGN KEY (customer_id) REFERENCES customers (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE media_types\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE tracks\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(200) NOT NULL,\n album_id INTEGER,\n media_type_id INTEGER NOT NULL,\n genre_id INTEGER,\n composer VARCHAR(220),\n milliseconds INTEGER NOT NULL,\n bytes INTEGER,\n unit_price NUMERIC(10,2) NOT NULL,\n FOREIGN KEY (album_id) REFERENCES albums (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (genre_id) REFERENCES genres (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (media_type_id) REFERENCES media_types (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE invoice_lines\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n invoice_id INTEGER NOT NULL,\n track_id INTEGER NOT NULL,\n unit_price NUMERIC(10,2) NOT NULL,\n quantity INTEGER NOT NULL,\n FOREIGN KEY (invoice_id) REFERENCES invoices (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (track_id) REFERENCES tracks (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE playlists\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE playlist_tracks\n(\n playlist_id INTEGER NOT NULL,\n track_id INTEGER NOT NULL,\n CONSTRAINT PK_PlaylistTrack PRIMARY KEY (playlist_id, track_id),\n FOREIGN KEY (playlist_id) REFERENCES playlists (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (track_id) REFERENCES tracks (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);" ]
List the name of tracks belongs to genre Rock and whose media type is MPEG audio file.
SELECT T2.name FROM genres AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id JOIN media_types AS T3 ON T3.id = T2.media_type_id WHERE T1.name = "Rock" AND T3.name = "MPEG audio file";
[ "SELECT", "T2.name", "FROM", "genres", "AS", "T1", "JOIN", "tracks", "AS", "T2", "ON", "T1.id", "=", "T2.genre_id", "JOIN", "media_types", "AS", "T3", "ON", "T3.id", "=", "T2.media_type_id", "WHERE", "T1.name", "=", "``", "Rock", "''", "AND", "T3.name", "=", "``", "MPEG", "audio", "file", "''", ";" ]
[ "select", "t2", ".", "name", "from", "genres", "as", "t1", "join", "tracks", "as", "t2", "on", "t1", ".", "id", "=", "t2", ".", "genre_id", "join", "media_types", "as", "t3", "on", "t3", ".", "id", "=", "t2", ".", "media_type_id", "where", "t1", ".", "name", "=", "value", "and", "t3", ".", "name", "=", "value" ]
[ "List", "the", "name", "of", "tracks", "belongs", "to", "genre", "Rock", "and", "whose", "media", "type", "is", "MPEG", "audio", "file", "." ]
store_1
[ "Create Tables\n********************************************************************************/\nCREATE TABLE artists\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE albums\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n title VARCHAR(160) NOT NULL,\n artist_id INTEGER NOT NULL,\n FOREIGN KEY (artist_id) REFERENCES artists (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE employees\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n last_name VARCHAR(20) NOT NULL,\n first_name VARCHAR(20) NOT NULL,\n title VARCHAR(30),\n reports_to INTEGER,\n birth_date TIMESTAMP,\n hire_date TIMESTAMP,\n address VARCHAR(70),\n city VARCHAR(40),\n state VARCHAR(40),\n country VARCHAR(40),\n postal_code VARCHAR(10),\n phone VARCHAR(24),\n fax VARCHAR(24),\n email VARCHAR(60),\n FOREIGN KEY (reports_to) REFERENCES employees (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE customers\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n first_name VARCHAR(40) NOT NULL,\n last_name VARCHAR(20) NOT NULL,\n company VARCHAR(80),\n address VARCHAR(70),\n city VARCHAR(40),\n state VARCHAR(40),\n country VARCHAR(40),\n postal_code VARCHAR(10),\n phone VARCHAR(24),\n fax VARCHAR(24),\n email VARCHAR(60) NOT NULL,\n support_rep_id INTEGER,\n FOREIGN KEY (support_rep_id) REFERENCES employees (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE genres\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE invoices\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n customer_id INTEGER NOT NULL,\n invoice_date TIMESTAMP NOT NULL,\n billing_address VARCHAR(70),\n billing_city VARCHAR(40),\n billing_state VARCHAR(40),\n billing_country VARCHAR(40),\n billing_postal_code VARCHAR(10),\n total NUMERIC(10,2) NOT NULL,\n FOREIGN KEY (customer_id) REFERENCES customers (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE media_types\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE tracks\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(200) NOT NULL,\n album_id INTEGER,\n media_type_id INTEGER NOT NULL,\n genre_id INTEGER,\n composer VARCHAR(220),\n milliseconds INTEGER NOT NULL,\n bytes INTEGER,\n unit_price NUMERIC(10,2) NOT NULL,\n FOREIGN KEY (album_id) REFERENCES albums (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (genre_id) REFERENCES genres (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (media_type_id) REFERENCES media_types (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE invoice_lines\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n invoice_id INTEGER NOT NULL,\n track_id INTEGER NOT NULL,\n unit_price NUMERIC(10,2) NOT NULL,\n quantity INTEGER NOT NULL,\n FOREIGN KEY (invoice_id) REFERENCES invoices (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (track_id) REFERENCES tracks (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE playlists\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE playlist_tracks\n(\n playlist_id INTEGER NOT NULL,\n track_id INTEGER NOT NULL,\n CONSTRAINT PK_PlaylistTrack PRIMARY KEY (playlist_id, track_id),\n FOREIGN KEY (playlist_id) REFERENCES playlists (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (track_id) REFERENCES tracks (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);" ]
What are the names of all Rock tracks that are stored on MPEG audio files?
SELECT T2.name FROM genres AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id JOIN media_types AS T3 ON T3.id = T2.media_type_id WHERE T1.name = "Rock" AND T3.name = "MPEG audio file";
[ "SELECT", "T2.name", "FROM", "genres", "AS", "T1", "JOIN", "tracks", "AS", "T2", "ON", "T1.id", "=", "T2.genre_id", "JOIN", "media_types", "AS", "T3", "ON", "T3.id", "=", "T2.media_type_id", "WHERE", "T1.name", "=", "``", "Rock", "''", "AND", "T3.name", "=", "``", "MPEG", "audio", "file", "''", ";" ]
[ "select", "t2", ".", "name", "from", "genres", "as", "t1", "join", "tracks", "as", "t2", "on", "t1", ".", "id", "=", "t2", ".", "genre_id", "join", "media_types", "as", "t3", "on", "t3", ".", "id", "=", "t2", ".", "media_type_id", "where", "t1", ".", "name", "=", "value", "and", "t3", ".", "name", "=", "value" ]
[ "What", "are", "the", "names", "of", "all", "Rock", "tracks", "that", "are", "stored", "on", "MPEG", "audio", "files", "?" ]
store_1
[ "Create Tables\n********************************************************************************/\nCREATE TABLE artists\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE albums\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n title VARCHAR(160) NOT NULL,\n artist_id INTEGER NOT NULL,\n FOREIGN KEY (artist_id) REFERENCES artists (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE employees\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n last_name VARCHAR(20) NOT NULL,\n first_name VARCHAR(20) NOT NULL,\n title VARCHAR(30),\n reports_to INTEGER,\n birth_date TIMESTAMP,\n hire_date TIMESTAMP,\n address VARCHAR(70),\n city VARCHAR(40),\n state VARCHAR(40),\n country VARCHAR(40),\n postal_code VARCHAR(10),\n phone VARCHAR(24),\n fax VARCHAR(24),\n email VARCHAR(60),\n FOREIGN KEY (reports_to) REFERENCES employees (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE customers\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n first_name VARCHAR(40) NOT NULL,\n last_name VARCHAR(20) NOT NULL,\n company VARCHAR(80),\n address VARCHAR(70),\n city VARCHAR(40),\n state VARCHAR(40),\n country VARCHAR(40),\n postal_code VARCHAR(10),\n phone VARCHAR(24),\n fax VARCHAR(24),\n email VARCHAR(60) NOT NULL,\n support_rep_id INTEGER,\n FOREIGN KEY (support_rep_id) REFERENCES employees (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE genres\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE invoices\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n customer_id INTEGER NOT NULL,\n invoice_date TIMESTAMP NOT NULL,\n billing_address VARCHAR(70),\n billing_city VARCHAR(40),\n billing_state VARCHAR(40),\n billing_country VARCHAR(40),\n billing_postal_code VARCHAR(10),\n total NUMERIC(10,2) NOT NULL,\n FOREIGN KEY (customer_id) REFERENCES customers (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE media_types\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE tracks\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(200) NOT NULL,\n album_id INTEGER,\n media_type_id INTEGER NOT NULL,\n genre_id INTEGER,\n composer VARCHAR(220),\n milliseconds INTEGER NOT NULL,\n bytes INTEGER,\n unit_price NUMERIC(10,2) NOT NULL,\n FOREIGN KEY (album_id) REFERENCES albums (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (genre_id) REFERENCES genres (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (media_type_id) REFERENCES media_types (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE invoice_lines\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n invoice_id INTEGER NOT NULL,\n track_id INTEGER NOT NULL,\n unit_price NUMERIC(10,2) NOT NULL,\n quantity INTEGER NOT NULL,\n FOREIGN KEY (invoice_id) REFERENCES invoices (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (track_id) REFERENCES tracks (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE playlists\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE playlist_tracks\n(\n playlist_id INTEGER NOT NULL,\n track_id INTEGER NOT NULL,\n CONSTRAINT PK_PlaylistTrack PRIMARY KEY (playlist_id, track_id),\n FOREIGN KEY (playlist_id) REFERENCES playlists (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (track_id) REFERENCES tracks (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);" ]
List the name of tracks belongs to genre Rock or media type is MPEG audio file.
SELECT T2.name FROM genres AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id JOIN media_types AS T3 ON T3.id = T2.media_type_id WHERE T1.name = "Rock" OR T3.name = "MPEG audio file";
[ "SELECT", "T2.name", "FROM", "genres", "AS", "T1", "JOIN", "tracks", "AS", "T2", "ON", "T1.id", "=", "T2.genre_id", "JOIN", "media_types", "AS", "T3", "ON", "T3.id", "=", "T2.media_type_id", "WHERE", "T1.name", "=", "``", "Rock", "''", "OR", "T3.name", "=", "``", "MPEG", "audio", "file", "''", ";" ]
[ "select", "t2", ".", "name", "from", "genres", "as", "t1", "join", "tracks", "as", "t2", "on", "t1", ".", "id", "=", "t2", ".", "genre_id", "join", "media_types", "as", "t3", "on", "t3", ".", "id", "=", "t2", ".", "media_type_id", "where", "t1", ".", "name", "=", "value", "or", "t3", ".", "name", "=", "value" ]
[ "List", "the", "name", "of", "tracks", "belongs", "to", "genre", "Rock", "or", "media", "type", "is", "MPEG", "audio", "file", "." ]
store_1
[ "Create Tables\n********************************************************************************/\nCREATE TABLE artists\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE albums\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n title VARCHAR(160) NOT NULL,\n artist_id INTEGER NOT NULL,\n FOREIGN KEY (artist_id) REFERENCES artists (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE employees\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n last_name VARCHAR(20) NOT NULL,\n first_name VARCHAR(20) NOT NULL,\n title VARCHAR(30),\n reports_to INTEGER,\n birth_date TIMESTAMP,\n hire_date TIMESTAMP,\n address VARCHAR(70),\n city VARCHAR(40),\n state VARCHAR(40),\n country VARCHAR(40),\n postal_code VARCHAR(10),\n phone VARCHAR(24),\n fax VARCHAR(24),\n email VARCHAR(60),\n FOREIGN KEY (reports_to) REFERENCES employees (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE customers\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n first_name VARCHAR(40) NOT NULL,\n last_name VARCHAR(20) NOT NULL,\n company VARCHAR(80),\n address VARCHAR(70),\n city VARCHAR(40),\n state VARCHAR(40),\n country VARCHAR(40),\n postal_code VARCHAR(10),\n phone VARCHAR(24),\n fax VARCHAR(24),\n email VARCHAR(60) NOT NULL,\n support_rep_id INTEGER,\n FOREIGN KEY (support_rep_id) REFERENCES employees (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE genres\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE invoices\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n customer_id INTEGER NOT NULL,\n invoice_date TIMESTAMP NOT NULL,\n billing_address VARCHAR(70),\n billing_city VARCHAR(40),\n billing_state VARCHAR(40),\n billing_country VARCHAR(40),\n billing_postal_code VARCHAR(10),\n total NUMERIC(10,2) NOT NULL,\n FOREIGN KEY (customer_id) REFERENCES customers (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE media_types\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE tracks\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(200) NOT NULL,\n album_id INTEGER,\n media_type_id INTEGER NOT NULL,\n genre_id INTEGER,\n composer VARCHAR(220),\n milliseconds INTEGER NOT NULL,\n bytes INTEGER,\n unit_price NUMERIC(10,2) NOT NULL,\n FOREIGN KEY (album_id) REFERENCES albums (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (genre_id) REFERENCES genres (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (media_type_id) REFERENCES media_types (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE invoice_lines\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n invoice_id INTEGER NOT NULL,\n track_id INTEGER NOT NULL,\n unit_price NUMERIC(10,2) NOT NULL,\n quantity INTEGER NOT NULL,\n FOREIGN KEY (invoice_id) REFERENCES invoices (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (track_id) REFERENCES tracks (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE playlists\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE playlist_tracks\n(\n playlist_id INTEGER NOT NULL,\n track_id INTEGER NOT NULL,\n CONSTRAINT PK_PlaylistTrack PRIMARY KEY (playlist_id, track_id),\n FOREIGN KEY (playlist_id) REFERENCES playlists (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (track_id) REFERENCES tracks (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);" ]
What are the names of all tracks that belong to the Rock genre and whose media type is MPEG?
SELECT T2.name FROM genres AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id JOIN media_types AS T3 ON T3.id = T2.media_type_id WHERE T1.name = "Rock" OR T3.name = "MPEG audio file";
[ "SELECT", "T2.name", "FROM", "genres", "AS", "T1", "JOIN", "tracks", "AS", "T2", "ON", "T1.id", "=", "T2.genre_id", "JOIN", "media_types", "AS", "T3", "ON", "T3.id", "=", "T2.media_type_id", "WHERE", "T1.name", "=", "``", "Rock", "''", "OR", "T3.name", "=", "``", "MPEG", "audio", "file", "''", ";" ]
[ "select", "t2", ".", "name", "from", "genres", "as", "t1", "join", "tracks", "as", "t2", "on", "t1", ".", "id", "=", "t2", ".", "genre_id", "join", "media_types", "as", "t3", "on", "t3", ".", "id", "=", "t2", ".", "media_type_id", "where", "t1", ".", "name", "=", "value", "or", "t3", ".", "name", "=", "value" ]
[ "What", "are", "the", "names", "of", "all", "tracks", "that", "belong", "to", "the", "Rock", "genre", "and", "whose", "media", "type", "is", "MPEG", "?" ]
store_1
[ "Create Tables\n********************************************************************************/\nCREATE TABLE artists\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE albums\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n title VARCHAR(160) NOT NULL,\n artist_id INTEGER NOT NULL,\n FOREIGN KEY (artist_id) REFERENCES artists (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE employees\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n last_name VARCHAR(20) NOT NULL,\n first_name VARCHAR(20) NOT NULL,\n title VARCHAR(30),\n reports_to INTEGER,\n birth_date TIMESTAMP,\n hire_date TIMESTAMP,\n address VARCHAR(70),\n city VARCHAR(40),\n state VARCHAR(40),\n country VARCHAR(40),\n postal_code VARCHAR(10),\n phone VARCHAR(24),\n fax VARCHAR(24),\n email VARCHAR(60),\n FOREIGN KEY (reports_to) REFERENCES employees (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE customers\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n first_name VARCHAR(40) NOT NULL,\n last_name VARCHAR(20) NOT NULL,\n company VARCHAR(80),\n address VARCHAR(70),\n city VARCHAR(40),\n state VARCHAR(40),\n country VARCHAR(40),\n postal_code VARCHAR(10),\n phone VARCHAR(24),\n fax VARCHAR(24),\n email VARCHAR(60) NOT NULL,\n support_rep_id INTEGER,\n FOREIGN KEY (support_rep_id) REFERENCES employees (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE genres\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE invoices\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n customer_id INTEGER NOT NULL,\n invoice_date TIMESTAMP NOT NULL,\n billing_address VARCHAR(70),\n billing_city VARCHAR(40),\n billing_state VARCHAR(40),\n billing_country VARCHAR(40),\n billing_postal_code VARCHAR(10),\n total NUMERIC(10,2) NOT NULL,\n FOREIGN KEY (customer_id) REFERENCES customers (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE media_types\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE tracks\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(200) NOT NULL,\n album_id INTEGER,\n media_type_id INTEGER NOT NULL,\n genre_id INTEGER,\n composer VARCHAR(220),\n milliseconds INTEGER NOT NULL,\n bytes INTEGER,\n unit_price NUMERIC(10,2) NOT NULL,\n FOREIGN KEY (album_id) REFERENCES albums (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (genre_id) REFERENCES genres (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (media_type_id) REFERENCES media_types (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE invoice_lines\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n invoice_id INTEGER NOT NULL,\n track_id INTEGER NOT NULL,\n unit_price NUMERIC(10,2) NOT NULL,\n quantity INTEGER NOT NULL,\n FOREIGN KEY (invoice_id) REFERENCES invoices (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (track_id) REFERENCES tracks (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE playlists\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE playlist_tracks\n(\n playlist_id INTEGER NOT NULL,\n track_id INTEGER NOT NULL,\n CONSTRAINT PK_PlaylistTrack PRIMARY KEY (playlist_id, track_id),\n FOREIGN KEY (playlist_id) REFERENCES playlists (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (track_id) REFERENCES tracks (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);" ]
List the name of tracks belongs to genre Rock or genre Jazz.
SELECT T2.name FROM genres AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id WHERE T1.name = "Rock" OR T1.name = "Jazz"
[ "SELECT", "T2.name", "FROM", "genres", "AS", "T1", "JOIN", "tracks", "AS", "T2", "ON", "T1.id", "=", "T2.genre_id", "WHERE", "T1.name", "=", "``", "Rock", "''", "OR", "T1.name", "=", "``", "Jazz", "''" ]
[ "select", "t2", ".", "name", "from", "genres", "as", "t1", "join", "tracks", "as", "t2", "on", "t1", ".", "id", "=", "t2", ".", "genre_id", "where", "t1", ".", "name", "=", "value", "or", "t1", ".", "name", "=", "value" ]
[ "List", "the", "name", "of", "tracks", "belongs", "to", "genre", "Rock", "or", "genre", "Jazz", "." ]
store_1
[ "Create Tables\n********************************************************************************/\nCREATE TABLE artists\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE albums\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n title VARCHAR(160) NOT NULL,\n artist_id INTEGER NOT NULL,\n FOREIGN KEY (artist_id) REFERENCES artists (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE employees\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n last_name VARCHAR(20) NOT NULL,\n first_name VARCHAR(20) NOT NULL,\n title VARCHAR(30),\n reports_to INTEGER,\n birth_date TIMESTAMP,\n hire_date TIMESTAMP,\n address VARCHAR(70),\n city VARCHAR(40),\n state VARCHAR(40),\n country VARCHAR(40),\n postal_code VARCHAR(10),\n phone VARCHAR(24),\n fax VARCHAR(24),\n email VARCHAR(60),\n FOREIGN KEY (reports_to) REFERENCES employees (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE customers\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n first_name VARCHAR(40) NOT NULL,\n last_name VARCHAR(20) NOT NULL,\n company VARCHAR(80),\n address VARCHAR(70),\n city VARCHAR(40),\n state VARCHAR(40),\n country VARCHAR(40),\n postal_code VARCHAR(10),\n phone VARCHAR(24),\n fax VARCHAR(24),\n email VARCHAR(60) NOT NULL,\n support_rep_id INTEGER,\n FOREIGN KEY (support_rep_id) REFERENCES employees (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE genres\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE invoices\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n customer_id INTEGER NOT NULL,\n invoice_date TIMESTAMP NOT NULL,\n billing_address VARCHAR(70),\n billing_city VARCHAR(40),\n billing_state VARCHAR(40),\n billing_country VARCHAR(40),\n billing_postal_code VARCHAR(10),\n total NUMERIC(10,2) NOT NULL,\n FOREIGN KEY (customer_id) REFERENCES customers (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE media_types\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE tracks\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(200) NOT NULL,\n album_id INTEGER,\n media_type_id INTEGER NOT NULL,\n genre_id INTEGER,\n composer VARCHAR(220),\n milliseconds INTEGER NOT NULL,\n bytes INTEGER,\n unit_price NUMERIC(10,2) NOT NULL,\n FOREIGN KEY (album_id) REFERENCES albums (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (genre_id) REFERENCES genres (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (media_type_id) REFERENCES media_types (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE invoice_lines\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n invoice_id INTEGER NOT NULL,\n track_id INTEGER NOT NULL,\n unit_price NUMERIC(10,2) NOT NULL,\n quantity INTEGER NOT NULL,\n FOREIGN KEY (invoice_id) REFERENCES invoices (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (track_id) REFERENCES tracks (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE playlists\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE playlist_tracks\n(\n playlist_id INTEGER NOT NULL,\n track_id INTEGER NOT NULL,\n CONSTRAINT PK_PlaylistTrack PRIMARY KEY (playlist_id, track_id),\n FOREIGN KEY (playlist_id) REFERENCES playlists (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (track_id) REFERENCES tracks (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);" ]
What are the names of the tracks that are Rock or Jazz songs?
SELECT T2.name FROM genres AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id WHERE T1.name = "Rock" OR T1.name = "Jazz"
[ "SELECT", "T2.name", "FROM", "genres", "AS", "T1", "JOIN", "tracks", "AS", "T2", "ON", "T1.id", "=", "T2.genre_id", "WHERE", "T1.name", "=", "``", "Rock", "''", "OR", "T1.name", "=", "``", "Jazz", "''" ]
[ "select", "t2", ".", "name", "from", "genres", "as", "t1", "join", "tracks", "as", "t2", "on", "t1", ".", "id", "=", "t2", ".", "genre_id", "where", "t1", ".", "name", "=", "value", "or", "t1", ".", "name", "=", "value" ]
[ "What", "are", "the", "names", "of", "the", "tracks", "that", "are", "Rock", "or", "Jazz", "songs", "?" ]
store_1
[ "Create Tables\n********************************************************************************/\nCREATE TABLE artists\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE albums\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n title VARCHAR(160) NOT NULL,\n artist_id INTEGER NOT NULL,\n FOREIGN KEY (artist_id) REFERENCES artists (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE employees\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n last_name VARCHAR(20) NOT NULL,\n first_name VARCHAR(20) NOT NULL,\n title VARCHAR(30),\n reports_to INTEGER,\n birth_date TIMESTAMP,\n hire_date TIMESTAMP,\n address VARCHAR(70),\n city VARCHAR(40),\n state VARCHAR(40),\n country VARCHAR(40),\n postal_code VARCHAR(10),\n phone VARCHAR(24),\n fax VARCHAR(24),\n email VARCHAR(60),\n FOREIGN KEY (reports_to) REFERENCES employees (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE customers\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n first_name VARCHAR(40) NOT NULL,\n last_name VARCHAR(20) NOT NULL,\n company VARCHAR(80),\n address VARCHAR(70),\n city VARCHAR(40),\n state VARCHAR(40),\n country VARCHAR(40),\n postal_code VARCHAR(10),\n phone VARCHAR(24),\n fax VARCHAR(24),\n email VARCHAR(60) NOT NULL,\n support_rep_id INTEGER,\n FOREIGN KEY (support_rep_id) REFERENCES employees (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE genres\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE invoices\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n customer_id INTEGER NOT NULL,\n invoice_date TIMESTAMP NOT NULL,\n billing_address VARCHAR(70),\n billing_city VARCHAR(40),\n billing_state VARCHAR(40),\n billing_country VARCHAR(40),\n billing_postal_code VARCHAR(10),\n total NUMERIC(10,2) NOT NULL,\n FOREIGN KEY (customer_id) REFERENCES customers (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE media_types\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE tracks\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(200) NOT NULL,\n album_id INTEGER,\n media_type_id INTEGER NOT NULL,\n genre_id INTEGER,\n composer VARCHAR(220),\n milliseconds INTEGER NOT NULL,\n bytes INTEGER,\n unit_price NUMERIC(10,2) NOT NULL,\n FOREIGN KEY (album_id) REFERENCES albums (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (genre_id) REFERENCES genres (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (media_type_id) REFERENCES media_types (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE invoice_lines\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n invoice_id INTEGER NOT NULL,\n track_id INTEGER NOT NULL,\n unit_price NUMERIC(10,2) NOT NULL,\n quantity INTEGER NOT NULL,\n FOREIGN KEY (invoice_id) REFERENCES invoices (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (track_id) REFERENCES tracks (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE playlists\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE playlist_tracks\n(\n playlist_id INTEGER NOT NULL,\n track_id INTEGER NOT NULL,\n CONSTRAINT PK_PlaylistTrack PRIMARY KEY (playlist_id, track_id),\n FOREIGN KEY (playlist_id) REFERENCES playlists (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (track_id) REFERENCES tracks (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);" ]
List the name of all tracks in the playlists of Movies.
SELECT T1.name FROM tracks AS T1 JOIN playlist_tracks AS T2 ON T1.id = T2.track_id JOIN playlists AS T3 ON T3.id = T2.playlist_id WHERE T3.name = "Movies";
[ "SELECT", "T1.name", "FROM", "tracks", "AS", "T1", "JOIN", "playlist_tracks", "AS", "T2", "ON", "T1.id", "=", "T2.track_id", "JOIN", "playlists", "AS", "T3", "ON", "T3.id", "=", "T2.playlist_id", "WHERE", "T3.name", "=", "``", "Movies", "''", ";" ]
[ "select", "t1", ".", "name", "from", "tracks", "as", "t1", "join", "playlist_tracks", "as", "t2", "on", "t1", ".", "id", "=", "t2", ".", "track_id", "join", "playlists", "as", "t3", "on", "t3", ".", "id", "=", "t2", ".", "playlist_id", "where", "t3", ".", "name", "=", "value" ]
[ "List", "the", "name", "of", "all", "tracks", "in", "the", "playlists", "of", "Movies", "." ]
store_1
[ "Create Tables\n********************************************************************************/\nCREATE TABLE artists\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE albums\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n title VARCHAR(160) NOT NULL,\n artist_id INTEGER NOT NULL,\n FOREIGN KEY (artist_id) REFERENCES artists (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE employees\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n last_name VARCHAR(20) NOT NULL,\n first_name VARCHAR(20) NOT NULL,\n title VARCHAR(30),\n reports_to INTEGER,\n birth_date TIMESTAMP,\n hire_date TIMESTAMP,\n address VARCHAR(70),\n city VARCHAR(40),\n state VARCHAR(40),\n country VARCHAR(40),\n postal_code VARCHAR(10),\n phone VARCHAR(24),\n fax VARCHAR(24),\n email VARCHAR(60),\n FOREIGN KEY (reports_to) REFERENCES employees (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE customers\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n first_name VARCHAR(40) NOT NULL,\n last_name VARCHAR(20) NOT NULL,\n company VARCHAR(80),\n address VARCHAR(70),\n city VARCHAR(40),\n state VARCHAR(40),\n country VARCHAR(40),\n postal_code VARCHAR(10),\n phone VARCHAR(24),\n fax VARCHAR(24),\n email VARCHAR(60) NOT NULL,\n support_rep_id INTEGER,\n FOREIGN KEY (support_rep_id) REFERENCES employees (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE genres\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE invoices\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n customer_id INTEGER NOT NULL,\n invoice_date TIMESTAMP NOT NULL,\n billing_address VARCHAR(70),\n billing_city VARCHAR(40),\n billing_state VARCHAR(40),\n billing_country VARCHAR(40),\n billing_postal_code VARCHAR(10),\n total NUMERIC(10,2) NOT NULL,\n FOREIGN KEY (customer_id) REFERENCES customers (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE media_types\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE tracks\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(200) NOT NULL,\n album_id INTEGER,\n media_type_id INTEGER NOT NULL,\n genre_id INTEGER,\n composer VARCHAR(220),\n milliseconds INTEGER NOT NULL,\n bytes INTEGER,\n unit_price NUMERIC(10,2) NOT NULL,\n FOREIGN KEY (album_id) REFERENCES albums (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (genre_id) REFERENCES genres (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (media_type_id) REFERENCES media_types (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE invoice_lines\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n invoice_id INTEGER NOT NULL,\n track_id INTEGER NOT NULL,\n unit_price NUMERIC(10,2) NOT NULL,\n quantity INTEGER NOT NULL,\n FOREIGN KEY (invoice_id) REFERENCES invoices (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (track_id) REFERENCES tracks (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE playlists\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE playlist_tracks\n(\n playlist_id INTEGER NOT NULL,\n track_id INTEGER NOT NULL,\n CONSTRAINT PK_PlaylistTrack PRIMARY KEY (playlist_id, track_id),\n FOREIGN KEY (playlist_id) REFERENCES playlists (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (track_id) REFERENCES tracks (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);" ]
What are the names of all tracks that are on playlists titled Movies?
SELECT T1.name FROM tracks AS T1 JOIN playlist_tracks AS T2 ON T1.id = T2.track_id JOIN playlists AS T3 ON T3.id = T2.playlist_id WHERE T3.name = "Movies";
[ "SELECT", "T1.name", "FROM", "tracks", "AS", "T1", "JOIN", "playlist_tracks", "AS", "T2", "ON", "T1.id", "=", "T2.track_id", "JOIN", "playlists", "AS", "T3", "ON", "T3.id", "=", "T2.playlist_id", "WHERE", "T3.name", "=", "``", "Movies", "''", ";" ]
[ "select", "t1", ".", "name", "from", "tracks", "as", "t1", "join", "playlist_tracks", "as", "t2", "on", "t1", ".", "id", "=", "t2", ".", "track_id", "join", "playlists", "as", "t3", "on", "t3", ".", "id", "=", "t2", ".", "playlist_id", "where", "t3", ".", "name", "=", "value" ]
[ "What", "are", "the", "names", "of", "all", "tracks", "that", "are", "on", "playlists", "titled", "Movies", "?" ]
store_1
[ "Create Tables\n********************************************************************************/\nCREATE TABLE artists\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE albums\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n title VARCHAR(160) NOT NULL,\n artist_id INTEGER NOT NULL,\n FOREIGN KEY (artist_id) REFERENCES artists (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE employees\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n last_name VARCHAR(20) NOT NULL,\n first_name VARCHAR(20) NOT NULL,\n title VARCHAR(30),\n reports_to INTEGER,\n birth_date TIMESTAMP,\n hire_date TIMESTAMP,\n address VARCHAR(70),\n city VARCHAR(40),\n state VARCHAR(40),\n country VARCHAR(40),\n postal_code VARCHAR(10),\n phone VARCHAR(24),\n fax VARCHAR(24),\n email VARCHAR(60),\n FOREIGN KEY (reports_to) REFERENCES employees (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE customers\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n first_name VARCHAR(40) NOT NULL,\n last_name VARCHAR(20) NOT NULL,\n company VARCHAR(80),\n address VARCHAR(70),\n city VARCHAR(40),\n state VARCHAR(40),\n country VARCHAR(40),\n postal_code VARCHAR(10),\n phone VARCHAR(24),\n fax VARCHAR(24),\n email VARCHAR(60) NOT NULL,\n support_rep_id INTEGER,\n FOREIGN KEY (support_rep_id) REFERENCES employees (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE genres\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE invoices\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n customer_id INTEGER NOT NULL,\n invoice_date TIMESTAMP NOT NULL,\n billing_address VARCHAR(70),\n billing_city VARCHAR(40),\n billing_state VARCHAR(40),\n billing_country VARCHAR(40),\n billing_postal_code VARCHAR(10),\n total NUMERIC(10,2) NOT NULL,\n FOREIGN KEY (customer_id) REFERENCES customers (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE media_types\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE tracks\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(200) NOT NULL,\n album_id INTEGER,\n media_type_id INTEGER NOT NULL,\n genre_id INTEGER,\n composer VARCHAR(220),\n milliseconds INTEGER NOT NULL,\n bytes INTEGER,\n unit_price NUMERIC(10,2) NOT NULL,\n FOREIGN KEY (album_id) REFERENCES albums (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (genre_id) REFERENCES genres (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (media_type_id) REFERENCES media_types (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE invoice_lines\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n invoice_id INTEGER NOT NULL,\n track_id INTEGER NOT NULL,\n unit_price NUMERIC(10,2) NOT NULL,\n quantity INTEGER NOT NULL,\n FOREIGN KEY (invoice_id) REFERENCES invoices (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (track_id) REFERENCES tracks (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE playlists\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE playlist_tracks\n(\n playlist_id INTEGER NOT NULL,\n track_id INTEGER NOT NULL,\n CONSTRAINT PK_PlaylistTrack PRIMARY KEY (playlist_id, track_id),\n FOREIGN KEY (playlist_id) REFERENCES playlists (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (track_id) REFERENCES tracks (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);" ]
List the name of playlist which has number of tracks greater than 100.
SELECT T2.name FROM playlist_tracks AS T1 JOIN playlists AS T2 ON T2.id = T1.playlist_id GROUP BY T1.playlist_id HAVING count(T1.track_id) > 100;
[ "SELECT", "T2.name", "FROM", "playlist_tracks", "AS", "T1", "JOIN", "playlists", "AS", "T2", "ON", "T2.id", "=", "T1.playlist_id", "GROUP", "BY", "T1.playlist_id", "HAVING", "count", "(", "T1.track_id", ")", ">", "100", ";" ]
[ "select", "t2", ".", "name", "from", "playlist_tracks", "as", "t1", "join", "playlists", "as", "t2", "on", "t2", ".", "id", "=", "t1", ".", "playlist_id", "group", "by", "t1", ".", "playlist_id", "having", "count", "(", "t1", ".", "track_id", ")", ">", "value" ]
[ "List", "the", "name", "of", "playlist", "which", "has", "number", "of", "tracks", "greater", "than", "100", "." ]
store_1
[ "Create Tables\n********************************************************************************/\nCREATE TABLE artists\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE albums\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n title VARCHAR(160) NOT NULL,\n artist_id INTEGER NOT NULL,\n FOREIGN KEY (artist_id) REFERENCES artists (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE employees\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n last_name VARCHAR(20) NOT NULL,\n first_name VARCHAR(20) NOT NULL,\n title VARCHAR(30),\n reports_to INTEGER,\n birth_date TIMESTAMP,\n hire_date TIMESTAMP,\n address VARCHAR(70),\n city VARCHAR(40),\n state VARCHAR(40),\n country VARCHAR(40),\n postal_code VARCHAR(10),\n phone VARCHAR(24),\n fax VARCHAR(24),\n email VARCHAR(60),\n FOREIGN KEY (reports_to) REFERENCES employees (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE customers\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n first_name VARCHAR(40) NOT NULL,\n last_name VARCHAR(20) NOT NULL,\n company VARCHAR(80),\n address VARCHAR(70),\n city VARCHAR(40),\n state VARCHAR(40),\n country VARCHAR(40),\n postal_code VARCHAR(10),\n phone VARCHAR(24),\n fax VARCHAR(24),\n email VARCHAR(60) NOT NULL,\n support_rep_id INTEGER,\n FOREIGN KEY (support_rep_id) REFERENCES employees (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE genres\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE invoices\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n customer_id INTEGER NOT NULL,\n invoice_date TIMESTAMP NOT NULL,\n billing_address VARCHAR(70),\n billing_city VARCHAR(40),\n billing_state VARCHAR(40),\n billing_country VARCHAR(40),\n billing_postal_code VARCHAR(10),\n total NUMERIC(10,2) NOT NULL,\n FOREIGN KEY (customer_id) REFERENCES customers (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE media_types\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE tracks\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(200) NOT NULL,\n album_id INTEGER,\n media_type_id INTEGER NOT NULL,\n genre_id INTEGER,\n composer VARCHAR(220),\n milliseconds INTEGER NOT NULL,\n bytes INTEGER,\n unit_price NUMERIC(10,2) NOT NULL,\n FOREIGN KEY (album_id) REFERENCES albums (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (genre_id) REFERENCES genres (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (media_type_id) REFERENCES media_types (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE invoice_lines\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n invoice_id INTEGER NOT NULL,\n track_id INTEGER NOT NULL,\n unit_price NUMERIC(10,2) NOT NULL,\n quantity INTEGER NOT NULL,\n FOREIGN KEY (invoice_id) REFERENCES invoices (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (track_id) REFERENCES tracks (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE playlists\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE playlist_tracks\n(\n playlist_id INTEGER NOT NULL,\n track_id INTEGER NOT NULL,\n CONSTRAINT PK_PlaylistTrack PRIMARY KEY (playlist_id, track_id),\n FOREIGN KEY (playlist_id) REFERENCES playlists (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (track_id) REFERENCES tracks (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);" ]
What are the names of all playlists that have more than 100 tracks?
SELECT T2.name FROM playlist_tracks AS T1 JOIN playlists AS T2 ON T2.id = T1.playlist_id GROUP BY T1.playlist_id HAVING count(T1.track_id) > 100;
[ "SELECT", "T2.name", "FROM", "playlist_tracks", "AS", "T1", "JOIN", "playlists", "AS", "T2", "ON", "T2.id", "=", "T1.playlist_id", "GROUP", "BY", "T1.playlist_id", "HAVING", "count", "(", "T1.track_id", ")", ">", "100", ";" ]
[ "select", "t2", ".", "name", "from", "playlist_tracks", "as", "t1", "join", "playlists", "as", "t2", "on", "t2", ".", "id", "=", "t1", ".", "playlist_id", "group", "by", "t1", ".", "playlist_id", "having", "count", "(", "t1", ".", "track_id", ")", ">", "value" ]
[ "What", "are", "the", "names", "of", "all", "playlists", "that", "have", "more", "than", "100", "tracks", "?" ]
store_1
[ "Create Tables\n********************************************************************************/\nCREATE TABLE artists\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE albums\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n title VARCHAR(160) NOT NULL,\n artist_id INTEGER NOT NULL,\n FOREIGN KEY (artist_id) REFERENCES artists (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE employees\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n last_name VARCHAR(20) NOT NULL,\n first_name VARCHAR(20) NOT NULL,\n title VARCHAR(30),\n reports_to INTEGER,\n birth_date TIMESTAMP,\n hire_date TIMESTAMP,\n address VARCHAR(70),\n city VARCHAR(40),\n state VARCHAR(40),\n country VARCHAR(40),\n postal_code VARCHAR(10),\n phone VARCHAR(24),\n fax VARCHAR(24),\n email VARCHAR(60),\n FOREIGN KEY (reports_to) REFERENCES employees (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE customers\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n first_name VARCHAR(40) NOT NULL,\n last_name VARCHAR(20) NOT NULL,\n company VARCHAR(80),\n address VARCHAR(70),\n city VARCHAR(40),\n state VARCHAR(40),\n country VARCHAR(40),\n postal_code VARCHAR(10),\n phone VARCHAR(24),\n fax VARCHAR(24),\n email VARCHAR(60) NOT NULL,\n support_rep_id INTEGER,\n FOREIGN KEY (support_rep_id) REFERENCES employees (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE genres\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE invoices\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n customer_id INTEGER NOT NULL,\n invoice_date TIMESTAMP NOT NULL,\n billing_address VARCHAR(70),\n billing_city VARCHAR(40),\n billing_state VARCHAR(40),\n billing_country VARCHAR(40),\n billing_postal_code VARCHAR(10),\n total NUMERIC(10,2) NOT NULL,\n FOREIGN KEY (customer_id) REFERENCES customers (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE media_types\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE tracks\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(200) NOT NULL,\n album_id INTEGER,\n media_type_id INTEGER NOT NULL,\n genre_id INTEGER,\n composer VARCHAR(220),\n milliseconds INTEGER NOT NULL,\n bytes INTEGER,\n unit_price NUMERIC(10,2) NOT NULL,\n FOREIGN KEY (album_id) REFERENCES albums (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (genre_id) REFERENCES genres (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (media_type_id) REFERENCES media_types (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE invoice_lines\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n invoice_id INTEGER NOT NULL,\n track_id INTEGER NOT NULL,\n unit_price NUMERIC(10,2) NOT NULL,\n quantity INTEGER NOT NULL,\n FOREIGN KEY (invoice_id) REFERENCES invoices (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (track_id) REFERENCES tracks (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE playlists\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE playlist_tracks\n(\n playlist_id INTEGER NOT NULL,\n track_id INTEGER NOT NULL,\n CONSTRAINT PK_PlaylistTrack PRIMARY KEY (playlist_id, track_id),\n FOREIGN KEY (playlist_id) REFERENCES playlists (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (track_id) REFERENCES tracks (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);" ]
List all tracks bought by customer Daan Peeters.
SELECT T1.name FROM tracks AS T1 JOIN invoice_lines AS T2 ON T1.id = T2.track_id JOIN invoices AS T3 ON T3.id = T2.invoice_id JOIN customers AS T4 ON T4.id = T3.customer_id WHERE T4.first_name = "Daan" AND T4.last_name = "Peeters";
[ "SELECT", "T1.name", "FROM", "tracks", "AS", "T1", "JOIN", "invoice_lines", "AS", "T2", "ON", "T1.id", "=", "T2.track_id", "JOIN", "invoices", "AS", "T3", "ON", "T3.id", "=", "T2.invoice_id", "JOIN", "customers", "AS", "T4", "ON", "T4.id", "=", "T3.customer_id", "WHERE", "T4.first_name", "=", "``", "Daan", "''", "AND", "T4.last_name", "=", "``", "Peeters", "''", ";" ]
[ "select", "t1", ".", "name", "from", "tracks", "as", "t1", "join", "invoice_lines", "as", "t2", "on", "t1", ".", "id", "=", "t2", ".", "track_id", "join", "invoices", "as", "t3", "on", "t3", ".", "id", "=", "t2", ".", "invoice_id", "join", "customers", "as", "t4", "on", "t4", ".", "id", "=", "t3", ".", "customer_id", "where", "t4", ".", "first_name", "=", "value", "and", "t4", ".", "last_name", "=", "value" ]
[ "List", "all", "tracks", "bought", "by", "customer", "Daan", "Peeters", "." ]
store_1
[ "Create Tables\n********************************************************************************/\nCREATE TABLE artists\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE albums\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n title VARCHAR(160) NOT NULL,\n artist_id INTEGER NOT NULL,\n FOREIGN KEY (artist_id) REFERENCES artists (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE employees\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n last_name VARCHAR(20) NOT NULL,\n first_name VARCHAR(20) NOT NULL,\n title VARCHAR(30),\n reports_to INTEGER,\n birth_date TIMESTAMP,\n hire_date TIMESTAMP,\n address VARCHAR(70),\n city VARCHAR(40),\n state VARCHAR(40),\n country VARCHAR(40),\n postal_code VARCHAR(10),\n phone VARCHAR(24),\n fax VARCHAR(24),\n email VARCHAR(60),\n FOREIGN KEY (reports_to) REFERENCES employees (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE customers\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n first_name VARCHAR(40) NOT NULL,\n last_name VARCHAR(20) NOT NULL,\n company VARCHAR(80),\n address VARCHAR(70),\n city VARCHAR(40),\n state VARCHAR(40),\n country VARCHAR(40),\n postal_code VARCHAR(10),\n phone VARCHAR(24),\n fax VARCHAR(24),\n email VARCHAR(60) NOT NULL,\n support_rep_id INTEGER,\n FOREIGN KEY (support_rep_id) REFERENCES employees (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE genres\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE invoices\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n customer_id INTEGER NOT NULL,\n invoice_date TIMESTAMP NOT NULL,\n billing_address VARCHAR(70),\n billing_city VARCHAR(40),\n billing_state VARCHAR(40),\n billing_country VARCHAR(40),\n billing_postal_code VARCHAR(10),\n total NUMERIC(10,2) NOT NULL,\n FOREIGN KEY (customer_id) REFERENCES customers (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE media_types\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE tracks\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(200) NOT NULL,\n album_id INTEGER,\n media_type_id INTEGER NOT NULL,\n genre_id INTEGER,\n composer VARCHAR(220),\n milliseconds INTEGER NOT NULL,\n bytes INTEGER,\n unit_price NUMERIC(10,2) NOT NULL,\n FOREIGN KEY (album_id) REFERENCES albums (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (genre_id) REFERENCES genres (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (media_type_id) REFERENCES media_types (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE invoice_lines\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n invoice_id INTEGER NOT NULL,\n track_id INTEGER NOT NULL,\n unit_price NUMERIC(10,2) NOT NULL,\n quantity INTEGER NOT NULL,\n FOREIGN KEY (invoice_id) REFERENCES invoices (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (track_id) REFERENCES tracks (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE playlists\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE playlist_tracks\n(\n playlist_id INTEGER NOT NULL,\n track_id INTEGER NOT NULL,\n CONSTRAINT PK_PlaylistTrack PRIMARY KEY (playlist_id, track_id),\n FOREIGN KEY (playlist_id) REFERENCES playlists (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (track_id) REFERENCES tracks (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);" ]
What are the tracks that Dean Peeters bought?
SELECT T1.name FROM tracks AS T1 JOIN invoice_lines AS T2 ON T1.id = T2.track_id JOIN invoices AS T3 ON T3.id = T2.invoice_id JOIN customers AS T4 ON T4.id = T3.customer_id WHERE T4.first_name = "Daan" AND T4.last_name = "Peeters";
[ "SELECT", "T1.name", "FROM", "tracks", "AS", "T1", "JOIN", "invoice_lines", "AS", "T2", "ON", "T1.id", "=", "T2.track_id", "JOIN", "invoices", "AS", "T3", "ON", "T3.id", "=", "T2.invoice_id", "JOIN", "customers", "AS", "T4", "ON", "T4.id", "=", "T3.customer_id", "WHERE", "T4.first_name", "=", "``", "Daan", "''", "AND", "T4.last_name", "=", "``", "Peeters", "''", ";" ]
[ "select", "t1", ".", "name", "from", "tracks", "as", "t1", "join", "invoice_lines", "as", "t2", "on", "t1", ".", "id", "=", "t2", ".", "track_id", "join", "invoices", "as", "t3", "on", "t3", ".", "id", "=", "t2", ".", "invoice_id", "join", "customers", "as", "t4", "on", "t4", ".", "id", "=", "t3", ".", "customer_id", "where", "t4", ".", "first_name", "=", "value", "and", "t4", ".", "last_name", "=", "value" ]
[ "What", "are", "the", "tracks", "that", "Dean", "Peeters", "bought", "?" ]
store_1
[ "Create Tables\n********************************************************************************/\nCREATE TABLE artists\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE albums\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n title VARCHAR(160) NOT NULL,\n artist_id INTEGER NOT NULL,\n FOREIGN KEY (artist_id) REFERENCES artists (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE employees\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n last_name VARCHAR(20) NOT NULL,\n first_name VARCHAR(20) NOT NULL,\n title VARCHAR(30),\n reports_to INTEGER,\n birth_date TIMESTAMP,\n hire_date TIMESTAMP,\n address VARCHAR(70),\n city VARCHAR(40),\n state VARCHAR(40),\n country VARCHAR(40),\n postal_code VARCHAR(10),\n phone VARCHAR(24),\n fax VARCHAR(24),\n email VARCHAR(60),\n FOREIGN KEY (reports_to) REFERENCES employees (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE customers\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n first_name VARCHAR(40) NOT NULL,\n last_name VARCHAR(20) NOT NULL,\n company VARCHAR(80),\n address VARCHAR(70),\n city VARCHAR(40),\n state VARCHAR(40),\n country VARCHAR(40),\n postal_code VARCHAR(10),\n phone VARCHAR(24),\n fax VARCHAR(24),\n email VARCHAR(60) NOT NULL,\n support_rep_id INTEGER,\n FOREIGN KEY (support_rep_id) REFERENCES employees (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE genres\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE invoices\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n customer_id INTEGER NOT NULL,\n invoice_date TIMESTAMP NOT NULL,\n billing_address VARCHAR(70),\n billing_city VARCHAR(40),\n billing_state VARCHAR(40),\n billing_country VARCHAR(40),\n billing_postal_code VARCHAR(10),\n total NUMERIC(10,2) NOT NULL,\n FOREIGN KEY (customer_id) REFERENCES customers (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE media_types\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE tracks\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(200) NOT NULL,\n album_id INTEGER,\n media_type_id INTEGER NOT NULL,\n genre_id INTEGER,\n composer VARCHAR(220),\n milliseconds INTEGER NOT NULL,\n bytes INTEGER,\n unit_price NUMERIC(10,2) NOT NULL,\n FOREIGN KEY (album_id) REFERENCES albums (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (genre_id) REFERENCES genres (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (media_type_id) REFERENCES media_types (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE invoice_lines\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n invoice_id INTEGER NOT NULL,\n track_id INTEGER NOT NULL,\n unit_price NUMERIC(10,2) NOT NULL,\n quantity INTEGER NOT NULL,\n FOREIGN KEY (invoice_id) REFERENCES invoices (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (track_id) REFERENCES tracks (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE playlists\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE playlist_tracks\n(\n playlist_id INTEGER NOT NULL,\n track_id INTEGER NOT NULL,\n CONSTRAINT PK_PlaylistTrack PRIMARY KEY (playlist_id, track_id),\n FOREIGN KEY (playlist_id) REFERENCES playlists (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (track_id) REFERENCES tracks (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);" ]
How much is the track Fast As a Shark?
SELECT unit_price FROM tracks WHERE name = "Fast As a Shark";
[ "SELECT", "unit_price", "FROM", "tracks", "WHERE", "name", "=", "``", "Fast", "As", "a", "Shark", "''", ";" ]
[ "select", "unit_price", "from", "tracks", "where", "name", "=", "value" ]
[ "How", "much", "is", "the", "track", "Fast", "As", "a", "Shark", "?" ]
store_1
[ "Create Tables\n********************************************************************************/\nCREATE TABLE artists\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE albums\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n title VARCHAR(160) NOT NULL,\n artist_id INTEGER NOT NULL,\n FOREIGN KEY (artist_id) REFERENCES artists (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE employees\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n last_name VARCHAR(20) NOT NULL,\n first_name VARCHAR(20) NOT NULL,\n title VARCHAR(30),\n reports_to INTEGER,\n birth_date TIMESTAMP,\n hire_date TIMESTAMP,\n address VARCHAR(70),\n city VARCHAR(40),\n state VARCHAR(40),\n country VARCHAR(40),\n postal_code VARCHAR(10),\n phone VARCHAR(24),\n fax VARCHAR(24),\n email VARCHAR(60),\n FOREIGN KEY (reports_to) REFERENCES employees (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE customers\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n first_name VARCHAR(40) NOT NULL,\n last_name VARCHAR(20) NOT NULL,\n company VARCHAR(80),\n address VARCHAR(70),\n city VARCHAR(40),\n state VARCHAR(40),\n country VARCHAR(40),\n postal_code VARCHAR(10),\n phone VARCHAR(24),\n fax VARCHAR(24),\n email VARCHAR(60) NOT NULL,\n support_rep_id INTEGER,\n FOREIGN KEY (support_rep_id) REFERENCES employees (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE genres\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE invoices\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n customer_id INTEGER NOT NULL,\n invoice_date TIMESTAMP NOT NULL,\n billing_address VARCHAR(70),\n billing_city VARCHAR(40),\n billing_state VARCHAR(40),\n billing_country VARCHAR(40),\n billing_postal_code VARCHAR(10),\n total NUMERIC(10,2) NOT NULL,\n FOREIGN KEY (customer_id) REFERENCES customers (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE media_types\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE tracks\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(200) NOT NULL,\n album_id INTEGER,\n media_type_id INTEGER NOT NULL,\n genre_id INTEGER,\n composer VARCHAR(220),\n milliseconds INTEGER NOT NULL,\n bytes INTEGER,\n unit_price NUMERIC(10,2) NOT NULL,\n FOREIGN KEY (album_id) REFERENCES albums (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (genre_id) REFERENCES genres (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (media_type_id) REFERENCES media_types (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE invoice_lines\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n invoice_id INTEGER NOT NULL,\n track_id INTEGER NOT NULL,\n unit_price NUMERIC(10,2) NOT NULL,\n quantity INTEGER NOT NULL,\n FOREIGN KEY (invoice_id) REFERENCES invoices (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (track_id) REFERENCES tracks (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE playlists\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE playlist_tracks\n(\n playlist_id INTEGER NOT NULL,\n track_id INTEGER NOT NULL,\n CONSTRAINT PK_PlaylistTrack PRIMARY KEY (playlist_id, track_id),\n FOREIGN KEY (playlist_id) REFERENCES playlists (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (track_id) REFERENCES tracks (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);" ]
What is the unit price of the tune "Fast As a Shark"?
SELECT unit_price FROM tracks WHERE name = "Fast As a Shark";
[ "SELECT", "unit_price", "FROM", "tracks", "WHERE", "name", "=", "``", "Fast", "As", "a", "Shark", "''", ";" ]
[ "select", "unit_price", "from", "tracks", "where", "name", "=", "value" ]
[ "What", "is", "the", "unit", "price", "of", "the", "tune", "``", "Fast", "As", "a", "Shark", "''", "?" ]
store_1
[ "Create Tables\n********************************************************************************/\nCREATE TABLE artists\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE albums\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n title VARCHAR(160) NOT NULL,\n artist_id INTEGER NOT NULL,\n FOREIGN KEY (artist_id) REFERENCES artists (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE employees\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n last_name VARCHAR(20) NOT NULL,\n first_name VARCHAR(20) NOT NULL,\n title VARCHAR(30),\n reports_to INTEGER,\n birth_date TIMESTAMP,\n hire_date TIMESTAMP,\n address VARCHAR(70),\n city VARCHAR(40),\n state VARCHAR(40),\n country VARCHAR(40),\n postal_code VARCHAR(10),\n phone VARCHAR(24),\n fax VARCHAR(24),\n email VARCHAR(60),\n FOREIGN KEY (reports_to) REFERENCES employees (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE customers\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n first_name VARCHAR(40) NOT NULL,\n last_name VARCHAR(20) NOT NULL,\n company VARCHAR(80),\n address VARCHAR(70),\n city VARCHAR(40),\n state VARCHAR(40),\n country VARCHAR(40),\n postal_code VARCHAR(10),\n phone VARCHAR(24),\n fax VARCHAR(24),\n email VARCHAR(60) NOT NULL,\n support_rep_id INTEGER,\n FOREIGN KEY (support_rep_id) REFERENCES employees (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE genres\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE invoices\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n customer_id INTEGER NOT NULL,\n invoice_date TIMESTAMP NOT NULL,\n billing_address VARCHAR(70),\n billing_city VARCHAR(40),\n billing_state VARCHAR(40),\n billing_country VARCHAR(40),\n billing_postal_code VARCHAR(10),\n total NUMERIC(10,2) NOT NULL,\n FOREIGN KEY (customer_id) REFERENCES customers (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE media_types\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE tracks\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(200) NOT NULL,\n album_id INTEGER,\n media_type_id INTEGER NOT NULL,\n genre_id INTEGER,\n composer VARCHAR(220),\n milliseconds INTEGER NOT NULL,\n bytes INTEGER,\n unit_price NUMERIC(10,2) NOT NULL,\n FOREIGN KEY (album_id) REFERENCES albums (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (genre_id) REFERENCES genres (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (media_type_id) REFERENCES media_types (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE invoice_lines\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n invoice_id INTEGER NOT NULL,\n track_id INTEGER NOT NULL,\n unit_price NUMERIC(10,2) NOT NULL,\n quantity INTEGER NOT NULL,\n FOREIGN KEY (invoice_id) REFERENCES invoices (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (track_id) REFERENCES tracks (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE playlists\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE playlist_tracks\n(\n playlist_id INTEGER NOT NULL,\n track_id INTEGER NOT NULL,\n CONSTRAINT PK_PlaylistTrack PRIMARY KEY (playlist_id, track_id),\n FOREIGN KEY (playlist_id) REFERENCES playlists (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (track_id) REFERENCES tracks (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);" ]
Find the name of tracks which are in Movies playlist but not in music playlist.
SELECT T1.name FROM tracks AS T1 JOIN playlist_tracks AS T2 ON T1.id = T2.track_id JOIN playlists AS T3 ON T2.playlist_id = T3.id WHERE T3.name = 'Movies' EXCEPT SELECT T1.name FROM tracks AS T1 JOIN playlist_tracks AS T2 ON T1.id = T2.track_id JOIN playlists AS T3 ON T2.playlist_id = T3.id WHERE T3.name = 'Music'
[ "SELECT", "T1.name", "FROM", "tracks", "AS", "T1", "JOIN", "playlist_tracks", "AS", "T2", "ON", "T1.id", "=", "T2.track_id", "JOIN", "playlists", "AS", "T3", "ON", "T2.playlist_id", "=", "T3.id", "WHERE", "T3.name", "=", "'Movies", "'", "EXCEPT", "SELECT", "T1.name", "FROM", "tracks", "AS", "T1", "JOIN", "playlist_tracks", "AS", "T2", "ON", "T1.id", "=", "T2.track_id", "JOIN", "playlists", "AS", "T3", "ON", "T2.playlist_id", "=", "T3.id", "WHERE", "T3.name", "=", "'Music", "'" ]
[ "select", "t1", ".", "name", "from", "tracks", "as", "t1", "join", "playlist_tracks", "as", "t2", "on", "t1", ".", "id", "=", "t2", ".", "track_id", "join", "playlists", "as", "t3", "on", "t2", ".", "playlist_id", "=", "t3", ".", "id", "where", "t3", ".", "name", "=", "value", "except", "select", "t1", ".", "name", "from", "tracks", "as", "t1", "join", "playlist_tracks", "as", "t2", "on", "t1", ".", "id", "=", "t2", ".", "track_id", "join", "playlists", "as", "t3", "on", "t2", ".", "playlist_id", "=", "t3", ".", "id", "where", "t3", ".", "name", "=", "value" ]
[ "Find", "the", "name", "of", "tracks", "which", "are", "in", "Movies", "playlist", "but", "not", "in", "music", "playlist", "." ]
store_1
[ "Create Tables\n********************************************************************************/\nCREATE TABLE artists\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE albums\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n title VARCHAR(160) NOT NULL,\n artist_id INTEGER NOT NULL,\n FOREIGN KEY (artist_id) REFERENCES artists (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE employees\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n last_name VARCHAR(20) NOT NULL,\n first_name VARCHAR(20) NOT NULL,\n title VARCHAR(30),\n reports_to INTEGER,\n birth_date TIMESTAMP,\n hire_date TIMESTAMP,\n address VARCHAR(70),\n city VARCHAR(40),\n state VARCHAR(40),\n country VARCHAR(40),\n postal_code VARCHAR(10),\n phone VARCHAR(24),\n fax VARCHAR(24),\n email VARCHAR(60),\n FOREIGN KEY (reports_to) REFERENCES employees (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE customers\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n first_name VARCHAR(40) NOT NULL,\n last_name VARCHAR(20) NOT NULL,\n company VARCHAR(80),\n address VARCHAR(70),\n city VARCHAR(40),\n state VARCHAR(40),\n country VARCHAR(40),\n postal_code VARCHAR(10),\n phone VARCHAR(24),\n fax VARCHAR(24),\n email VARCHAR(60) NOT NULL,\n support_rep_id INTEGER,\n FOREIGN KEY (support_rep_id) REFERENCES employees (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE genres\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE invoices\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n customer_id INTEGER NOT NULL,\n invoice_date TIMESTAMP NOT NULL,\n billing_address VARCHAR(70),\n billing_city VARCHAR(40),\n billing_state VARCHAR(40),\n billing_country VARCHAR(40),\n billing_postal_code VARCHAR(10),\n total NUMERIC(10,2) NOT NULL,\n FOREIGN KEY (customer_id) REFERENCES customers (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE media_types\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE tracks\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(200) NOT NULL,\n album_id INTEGER,\n media_type_id INTEGER NOT NULL,\n genre_id INTEGER,\n composer VARCHAR(220),\n milliseconds INTEGER NOT NULL,\n bytes INTEGER,\n unit_price NUMERIC(10,2) NOT NULL,\n FOREIGN KEY (album_id) REFERENCES albums (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (genre_id) REFERENCES genres (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (media_type_id) REFERENCES media_types (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE invoice_lines\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n invoice_id INTEGER NOT NULL,\n track_id INTEGER NOT NULL,\n unit_price NUMERIC(10,2) NOT NULL,\n quantity INTEGER NOT NULL,\n FOREIGN KEY (invoice_id) REFERENCES invoices (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (track_id) REFERENCES tracks (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE playlists\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE playlist_tracks\n(\n playlist_id INTEGER NOT NULL,\n track_id INTEGER NOT NULL,\n CONSTRAINT PK_PlaylistTrack PRIMARY KEY (playlist_id, track_id),\n FOREIGN KEY (playlist_id) REFERENCES playlists (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (track_id) REFERENCES tracks (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);" ]
What are the names of all tracks that are on the Movies playlist but not in the music playlist?
SELECT T1.name FROM tracks AS T1 JOIN playlist_tracks AS T2 ON T1.id = T2.track_id JOIN playlists AS T3 ON T2.playlist_id = T3.id WHERE T3.name = 'Movies' EXCEPT SELECT T1.name FROM tracks AS T1 JOIN playlist_tracks AS T2 ON T1.id = T2.track_id JOIN playlists AS T3 ON T2.playlist_id = T3.id WHERE T3.name = 'Music'
[ "SELECT", "T1.name", "FROM", "tracks", "AS", "T1", "JOIN", "playlist_tracks", "AS", "T2", "ON", "T1.id", "=", "T2.track_id", "JOIN", "playlists", "AS", "T3", "ON", "T2.playlist_id", "=", "T3.id", "WHERE", "T3.name", "=", "'Movies", "'", "EXCEPT", "SELECT", "T1.name", "FROM", "tracks", "AS", "T1", "JOIN", "playlist_tracks", "AS", "T2", "ON", "T1.id", "=", "T2.track_id", "JOIN", "playlists", "AS", "T3", "ON", "T2.playlist_id", "=", "T3.id", "WHERE", "T3.name", "=", "'Music", "'" ]
[ "select", "t1", ".", "name", "from", "tracks", "as", "t1", "join", "playlist_tracks", "as", "t2", "on", "t1", ".", "id", "=", "t2", ".", "track_id", "join", "playlists", "as", "t3", "on", "t2", ".", "playlist_id", "=", "t3", ".", "id", "where", "t3", ".", "name", "=", "value", "except", "select", "t1", ".", "name", "from", "tracks", "as", "t1", "join", "playlist_tracks", "as", "t2", "on", "t1", ".", "id", "=", "t2", ".", "track_id", "join", "playlists", "as", "t3", "on", "t2", ".", "playlist_id", "=", "t3", ".", "id", "where", "t3", ".", "name", "=", "value" ]
[ "What", "are", "the", "names", "of", "all", "tracks", "that", "are", "on", "the", "Movies", "playlist", "but", "not", "in", "the", "music", "playlist", "?" ]
store_1
[ "Create Tables\n********************************************************************************/\nCREATE TABLE artists\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE albums\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n title VARCHAR(160) NOT NULL,\n artist_id INTEGER NOT NULL,\n FOREIGN KEY (artist_id) REFERENCES artists (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE employees\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n last_name VARCHAR(20) NOT NULL,\n first_name VARCHAR(20) NOT NULL,\n title VARCHAR(30),\n reports_to INTEGER,\n birth_date TIMESTAMP,\n hire_date TIMESTAMP,\n address VARCHAR(70),\n city VARCHAR(40),\n state VARCHAR(40),\n country VARCHAR(40),\n postal_code VARCHAR(10),\n phone VARCHAR(24),\n fax VARCHAR(24),\n email VARCHAR(60),\n FOREIGN KEY (reports_to) REFERENCES employees (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE customers\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n first_name VARCHAR(40) NOT NULL,\n last_name VARCHAR(20) NOT NULL,\n company VARCHAR(80),\n address VARCHAR(70),\n city VARCHAR(40),\n state VARCHAR(40),\n country VARCHAR(40),\n postal_code VARCHAR(10),\n phone VARCHAR(24),\n fax VARCHAR(24),\n email VARCHAR(60) NOT NULL,\n support_rep_id INTEGER,\n FOREIGN KEY (support_rep_id) REFERENCES employees (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE genres\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE invoices\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n customer_id INTEGER NOT NULL,\n invoice_date TIMESTAMP NOT NULL,\n billing_address VARCHAR(70),\n billing_city VARCHAR(40),\n billing_state VARCHAR(40),\n billing_country VARCHAR(40),\n billing_postal_code VARCHAR(10),\n total NUMERIC(10,2) NOT NULL,\n FOREIGN KEY (customer_id) REFERENCES customers (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE media_types\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE tracks\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(200) NOT NULL,\n album_id INTEGER,\n media_type_id INTEGER NOT NULL,\n genre_id INTEGER,\n composer VARCHAR(220),\n milliseconds INTEGER NOT NULL,\n bytes INTEGER,\n unit_price NUMERIC(10,2) NOT NULL,\n FOREIGN KEY (album_id) REFERENCES albums (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (genre_id) REFERENCES genres (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (media_type_id) REFERENCES media_types (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE invoice_lines\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n invoice_id INTEGER NOT NULL,\n track_id INTEGER NOT NULL,\n unit_price NUMERIC(10,2) NOT NULL,\n quantity INTEGER NOT NULL,\n FOREIGN KEY (invoice_id) REFERENCES invoices (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (track_id) REFERENCES tracks (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE playlists\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE playlist_tracks\n(\n playlist_id INTEGER NOT NULL,\n track_id INTEGER NOT NULL,\n CONSTRAINT PK_PlaylistTrack PRIMARY KEY (playlist_id, track_id),\n FOREIGN KEY (playlist_id) REFERENCES playlists (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (track_id) REFERENCES tracks (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);" ]
Find the name of tracks which are in both Movies and music playlists.
SELECT T1.name FROM tracks AS T1 JOIN playlist_tracks AS T2 ON T1.id = T2.track_id JOIN playlists AS T3 ON T2.playlist_id = T3.id WHERE T3.name = 'Movies' INTERSECT SELECT T1.name FROM tracks AS T1 JOIN playlist_tracks AS T2 ON T1.id = T2.track_id JOIN playlists AS T3 ON T2.playlist_id = T3.id WHERE T3.name = 'Music'
[ "SELECT", "T1.name", "FROM", "tracks", "AS", "T1", "JOIN", "playlist_tracks", "AS", "T2", "ON", "T1.id", "=", "T2.track_id", "JOIN", "playlists", "AS", "T3", "ON", "T2.playlist_id", "=", "T3.id", "WHERE", "T3.name", "=", "'Movies", "'", "INTERSECT", "SELECT", "T1.name", "FROM", "tracks", "AS", "T1", "JOIN", "playlist_tracks", "AS", "T2", "ON", "T1.id", "=", "T2.track_id", "JOIN", "playlists", "AS", "T3", "ON", "T2.playlist_id", "=", "T3.id", "WHERE", "T3.name", "=", "'Music", "'" ]
[ "select", "t1", ".", "name", "from", "tracks", "as", "t1", "join", "playlist_tracks", "as", "t2", "on", "t1", ".", "id", "=", "t2", ".", "track_id", "join", "playlists", "as", "t3", "on", "t2", ".", "playlist_id", "=", "t3", ".", "id", "where", "t3", ".", "name", "=", "value", "intersect", "select", "t1", ".", "name", "from", "tracks", "as", "t1", "join", "playlist_tracks", "as", "t2", "on", "t1", ".", "id", "=", "t2", ".", "track_id", "join", "playlists", "as", "t3", "on", "t2", ".", "playlist_id", "=", "t3", ".", "id", "where", "t3", ".", "name", "=", "value" ]
[ "Find", "the", "name", "of", "tracks", "which", "are", "in", "both", "Movies", "and", "music", "playlists", "." ]
store_1
[ "Create Tables\n********************************************************************************/\nCREATE TABLE artists\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE albums\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n title VARCHAR(160) NOT NULL,\n artist_id INTEGER NOT NULL,\n FOREIGN KEY (artist_id) REFERENCES artists (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE employees\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n last_name VARCHAR(20) NOT NULL,\n first_name VARCHAR(20) NOT NULL,\n title VARCHAR(30),\n reports_to INTEGER,\n birth_date TIMESTAMP,\n hire_date TIMESTAMP,\n address VARCHAR(70),\n city VARCHAR(40),\n state VARCHAR(40),\n country VARCHAR(40),\n postal_code VARCHAR(10),\n phone VARCHAR(24),\n fax VARCHAR(24),\n email VARCHAR(60),\n FOREIGN KEY (reports_to) REFERENCES employees (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE customers\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n first_name VARCHAR(40) NOT NULL,\n last_name VARCHAR(20) NOT NULL,\n company VARCHAR(80),\n address VARCHAR(70),\n city VARCHAR(40),\n state VARCHAR(40),\n country VARCHAR(40),\n postal_code VARCHAR(10),\n phone VARCHAR(24),\n fax VARCHAR(24),\n email VARCHAR(60) NOT NULL,\n support_rep_id INTEGER,\n FOREIGN KEY (support_rep_id) REFERENCES employees (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE genres\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE invoices\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n customer_id INTEGER NOT NULL,\n invoice_date TIMESTAMP NOT NULL,\n billing_address VARCHAR(70),\n billing_city VARCHAR(40),\n billing_state VARCHAR(40),\n billing_country VARCHAR(40),\n billing_postal_code VARCHAR(10),\n total NUMERIC(10,2) NOT NULL,\n FOREIGN KEY (customer_id) REFERENCES customers (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE media_types\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE tracks\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(200) NOT NULL,\n album_id INTEGER,\n media_type_id INTEGER NOT NULL,\n genre_id INTEGER,\n composer VARCHAR(220),\n milliseconds INTEGER NOT NULL,\n bytes INTEGER,\n unit_price NUMERIC(10,2) NOT NULL,\n FOREIGN KEY (album_id) REFERENCES albums (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (genre_id) REFERENCES genres (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (media_type_id) REFERENCES media_types (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE invoice_lines\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n invoice_id INTEGER NOT NULL,\n track_id INTEGER NOT NULL,\n unit_price NUMERIC(10,2) NOT NULL,\n quantity INTEGER NOT NULL,\n FOREIGN KEY (invoice_id) REFERENCES invoices (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (track_id) REFERENCES tracks (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE playlists\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE playlist_tracks\n(\n playlist_id INTEGER NOT NULL,\n track_id INTEGER NOT NULL,\n CONSTRAINT PK_PlaylistTrack PRIMARY KEY (playlist_id, track_id),\n FOREIGN KEY (playlist_id) REFERENCES playlists (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (track_id) REFERENCES tracks (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);" ]
What are the names of all the tracks that are in both the Movies and music playlists?
SELECT T1.name FROM tracks AS T1 JOIN playlist_tracks AS T2 ON T1.id = T2.track_id JOIN playlists AS T3 ON T2.playlist_id = T3.id WHERE T3.name = 'Movies' INTERSECT SELECT T1.name FROM tracks AS T1 JOIN playlist_tracks AS T2 ON T1.id = T2.track_id JOIN playlists AS T3 ON T2.playlist_id = T3.id WHERE T3.name = 'Music'
[ "SELECT", "T1.name", "FROM", "tracks", "AS", "T1", "JOIN", "playlist_tracks", "AS", "T2", "ON", "T1.id", "=", "T2.track_id", "JOIN", "playlists", "AS", "T3", "ON", "T2.playlist_id", "=", "T3.id", "WHERE", "T3.name", "=", "'Movies", "'", "INTERSECT", "SELECT", "T1.name", "FROM", "tracks", "AS", "T1", "JOIN", "playlist_tracks", "AS", "T2", "ON", "T1.id", "=", "T2.track_id", "JOIN", "playlists", "AS", "T3", "ON", "T2.playlist_id", "=", "T3.id", "WHERE", "T3.name", "=", "'Music", "'" ]
[ "select", "t1", ".", "name", "from", "tracks", "as", "t1", "join", "playlist_tracks", "as", "t2", "on", "t1", ".", "id", "=", "t2", ".", "track_id", "join", "playlists", "as", "t3", "on", "t2", ".", "playlist_id", "=", "t3", ".", "id", "where", "t3", ".", "name", "=", "value", "intersect", "select", "t1", ".", "name", "from", "tracks", "as", "t1", "join", "playlist_tracks", "as", "t2", "on", "t1", ".", "id", "=", "t2", ".", "track_id", "join", "playlists", "as", "t3", "on", "t2", ".", "playlist_id", "=", "t3", ".", "id", "where", "t3", ".", "name", "=", "value" ]
[ "What", "are", "the", "names", "of", "all", "the", "tracks", "that", "are", "in", "both", "the", "Movies", "and", "music", "playlists", "?" ]
store_1
[ "Create Tables\n********************************************************************************/\nCREATE TABLE artists\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE albums\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n title VARCHAR(160) NOT NULL,\n artist_id INTEGER NOT NULL,\n FOREIGN KEY (artist_id) REFERENCES artists (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE employees\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n last_name VARCHAR(20) NOT NULL,\n first_name VARCHAR(20) NOT NULL,\n title VARCHAR(30),\n reports_to INTEGER,\n birth_date TIMESTAMP,\n hire_date TIMESTAMP,\n address VARCHAR(70),\n city VARCHAR(40),\n state VARCHAR(40),\n country VARCHAR(40),\n postal_code VARCHAR(10),\n phone VARCHAR(24),\n fax VARCHAR(24),\n email VARCHAR(60),\n FOREIGN KEY (reports_to) REFERENCES employees (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE customers\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n first_name VARCHAR(40) NOT NULL,\n last_name VARCHAR(20) NOT NULL,\n company VARCHAR(80),\n address VARCHAR(70),\n city VARCHAR(40),\n state VARCHAR(40),\n country VARCHAR(40),\n postal_code VARCHAR(10),\n phone VARCHAR(24),\n fax VARCHAR(24),\n email VARCHAR(60) NOT NULL,\n support_rep_id INTEGER,\n FOREIGN KEY (support_rep_id) REFERENCES employees (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE genres\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE invoices\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n customer_id INTEGER NOT NULL,\n invoice_date TIMESTAMP NOT NULL,\n billing_address VARCHAR(70),\n billing_city VARCHAR(40),\n billing_state VARCHAR(40),\n billing_country VARCHAR(40),\n billing_postal_code VARCHAR(10),\n total NUMERIC(10,2) NOT NULL,\n FOREIGN KEY (customer_id) REFERENCES customers (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE media_types\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE tracks\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(200) NOT NULL,\n album_id INTEGER,\n media_type_id INTEGER NOT NULL,\n genre_id INTEGER,\n composer VARCHAR(220),\n milliseconds INTEGER NOT NULL,\n bytes INTEGER,\n unit_price NUMERIC(10,2) NOT NULL,\n FOREIGN KEY (album_id) REFERENCES albums (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (genre_id) REFERENCES genres (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (media_type_id) REFERENCES media_types (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE invoice_lines\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n invoice_id INTEGER NOT NULL,\n track_id INTEGER NOT NULL,\n unit_price NUMERIC(10,2) NOT NULL,\n quantity INTEGER NOT NULL,\n FOREIGN KEY (invoice_id) REFERENCES invoices (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (track_id) REFERENCES tracks (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE playlists\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE playlist_tracks\n(\n playlist_id INTEGER NOT NULL,\n track_id INTEGER NOT NULL,\n CONSTRAINT PK_PlaylistTrack PRIMARY KEY (playlist_id, track_id),\n FOREIGN KEY (playlist_id) REFERENCES playlists (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (track_id) REFERENCES tracks (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);" ]
Find number of tracks in each genre?
SELECT count(*) , T1.name FROM genres AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id GROUP BY T1.name;
[ "SELECT", "count", "(", "*", ")", ",", "T1.name", "FROM", "genres", "AS", "T1", "JOIN", "tracks", "AS", "T2", "ON", "T1.id", "=", "T2.genre_id", "GROUP", "BY", "T1.name", ";" ]
[ "select", "count", "(", "*", ")", ",", "t1", ".", "name", "from", "genres", "as", "t1", "join", "tracks", "as", "t2", "on", "t1", ".", "id", "=", "t2", ".", "genre_id", "group", "by", "t1", ".", "name" ]
[ "Find", "number", "of", "tracks", "in", "each", "genre", "?" ]
store_1
[ "Create Tables\n********************************************************************************/\nCREATE TABLE artists\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE albums\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n title VARCHAR(160) NOT NULL,\n artist_id INTEGER NOT NULL,\n FOREIGN KEY (artist_id) REFERENCES artists (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE employees\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n last_name VARCHAR(20) NOT NULL,\n first_name VARCHAR(20) NOT NULL,\n title VARCHAR(30),\n reports_to INTEGER,\n birth_date TIMESTAMP,\n hire_date TIMESTAMP,\n address VARCHAR(70),\n city VARCHAR(40),\n state VARCHAR(40),\n country VARCHAR(40),\n postal_code VARCHAR(10),\n phone VARCHAR(24),\n fax VARCHAR(24),\n email VARCHAR(60),\n FOREIGN KEY (reports_to) REFERENCES employees (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE customers\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n first_name VARCHAR(40) NOT NULL,\n last_name VARCHAR(20) NOT NULL,\n company VARCHAR(80),\n address VARCHAR(70),\n city VARCHAR(40),\n state VARCHAR(40),\n country VARCHAR(40),\n postal_code VARCHAR(10),\n phone VARCHAR(24),\n fax VARCHAR(24),\n email VARCHAR(60) NOT NULL,\n support_rep_id INTEGER,\n FOREIGN KEY (support_rep_id) REFERENCES employees (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE genres\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE invoices\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n customer_id INTEGER NOT NULL,\n invoice_date TIMESTAMP NOT NULL,\n billing_address VARCHAR(70),\n billing_city VARCHAR(40),\n billing_state VARCHAR(40),\n billing_country VARCHAR(40),\n billing_postal_code VARCHAR(10),\n total NUMERIC(10,2) NOT NULL,\n FOREIGN KEY (customer_id) REFERENCES customers (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE media_types\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE tracks\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(200) NOT NULL,\n album_id INTEGER,\n media_type_id INTEGER NOT NULL,\n genre_id INTEGER,\n composer VARCHAR(220),\n milliseconds INTEGER NOT NULL,\n bytes INTEGER,\n unit_price NUMERIC(10,2) NOT NULL,\n FOREIGN KEY (album_id) REFERENCES albums (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (genre_id) REFERENCES genres (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (media_type_id) REFERENCES media_types (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE invoice_lines\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n invoice_id INTEGER NOT NULL,\n track_id INTEGER NOT NULL,\n unit_price NUMERIC(10,2) NOT NULL,\n quantity INTEGER NOT NULL,\n FOREIGN KEY (invoice_id) REFERENCES invoices (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (track_id) REFERENCES tracks (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);", "CREATE TABLE playlists\n(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n name VARCHAR(120)\n);", "CREATE TABLE playlist_tracks\n(\n playlist_id INTEGER NOT NULL,\n track_id INTEGER NOT NULL,\n CONSTRAINT PK_PlaylistTrack PRIMARY KEY (playlist_id, track_id),\n FOREIGN KEY (playlist_id) REFERENCES playlists (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION,\n FOREIGN KEY (track_id) REFERENCES tracks (id)\n ON DELETE NO ACTION ON UPDATE NO ACTION\n);" ]
How many tracks are in each genre?
SELECT count(*) , T1.name FROM genres AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id GROUP BY T1.name;
[ "SELECT", "count", "(", "*", ")", ",", "T1.name", "FROM", "genres", "AS", "T1", "JOIN", "tracks", "AS", "T2", "ON", "T1.id", "=", "T2.genre_id", "GROUP", "BY", "T1.name", ";" ]
[ "select", "count", "(", "*", ")", ",", "t1", ".", "name", "from", "genres", "as", "t1", "join", "tracks", "as", "t2", "on", "t1", ".", "id", "=", "t2", ".", "genre_id", "group", "by", "t1", ".", "name" ]
[ "How", "many", "tracks", "are", "in", "each", "genre", "?" ]
journal_committee
[ "CREATE TABLE IF NOT EXISTS \"journal\" (\n\"Journal_ID\" int,\n\"Date\" text,\n\"Theme\" text,\n\"Sales\" int,\nPRIMARY KEY (\"Journal_ID\")\n);", "CREATE TABLE IF NOT EXISTS \"editor\" (\n\"Editor_ID\" int,\n\"Name\" text,\n\"Age\" real,\nPRIMARY KEY (\"Editor_ID\")\n);", "CREATE TABLE IF NOT EXISTS \"journal_committee\" (\n\"Editor_ID\" int,\n\"Journal_ID\" int,\n\"Work_Type\" text,\nPRIMARY KEY (\"Editor_ID\",\"Journal_ID\"),\nFOREIGN KEY (\"Editor_ID\") REFERENCES `editor`(\"Editor_ID\"),\nFOREIGN KEY (\"Journal_ID\") REFERENCES `journal`(\"Journal_ID\")\n);" ]
How many editors are there?
SELECT count(*) FROM editor
[ "SELECT", "count", "(", "*", ")", "FROM", "editor" ]
[ "select", "count", "(", "*", ")", "from", "editor" ]
[ "How", "many", "editors", "are", "there", "?" ]
journal_committee
[ "CREATE TABLE IF NOT EXISTS \"journal\" (\n\"Journal_ID\" int,\n\"Date\" text,\n\"Theme\" text,\n\"Sales\" int,\nPRIMARY KEY (\"Journal_ID\")\n);", "CREATE TABLE IF NOT EXISTS \"editor\" (\n\"Editor_ID\" int,\n\"Name\" text,\n\"Age\" real,\nPRIMARY KEY (\"Editor_ID\")\n);", "CREATE TABLE IF NOT EXISTS \"journal_committee\" (\n\"Editor_ID\" int,\n\"Journal_ID\" int,\n\"Work_Type\" text,\nPRIMARY KEY (\"Editor_ID\",\"Journal_ID\"),\nFOREIGN KEY (\"Editor_ID\") REFERENCES `editor`(\"Editor_ID\"),\nFOREIGN KEY (\"Journal_ID\") REFERENCES `journal`(\"Journal_ID\")\n);" ]
List the names of editors in ascending order of age.
SELECT Name FROM editor ORDER BY Age ASC
[ "SELECT", "Name", "FROM", "editor", "ORDER", "BY", "Age", "ASC" ]
[ "select", "name", "from", "editor", "order", "by", "age", "asc" ]
[ "List", "the", "names", "of", "editors", "in", "ascending", "order", "of", "age", "." ]
journal_committee
[ "CREATE TABLE IF NOT EXISTS \"journal\" (\n\"Journal_ID\" int,\n\"Date\" text,\n\"Theme\" text,\n\"Sales\" int,\nPRIMARY KEY (\"Journal_ID\")\n);", "CREATE TABLE IF NOT EXISTS \"editor\" (\n\"Editor_ID\" int,\n\"Name\" text,\n\"Age\" real,\nPRIMARY KEY (\"Editor_ID\")\n);", "CREATE TABLE IF NOT EXISTS \"journal_committee\" (\n\"Editor_ID\" int,\n\"Journal_ID\" int,\n\"Work_Type\" text,\nPRIMARY KEY (\"Editor_ID\",\"Journal_ID\"),\nFOREIGN KEY (\"Editor_ID\") REFERENCES `editor`(\"Editor_ID\"),\nFOREIGN KEY (\"Journal_ID\") REFERENCES `journal`(\"Journal_ID\")\n);" ]
What are the names and ages of editors?
SELECT Name , Age FROM editor
[ "SELECT", "Name", ",", "Age", "FROM", "editor" ]
[ "select", "name", ",", "age", "from", "editor" ]
[ "What", "are", "the", "names", "and", "ages", "of", "editors", "?" ]
journal_committee
[ "CREATE TABLE IF NOT EXISTS \"journal\" (\n\"Journal_ID\" int,\n\"Date\" text,\n\"Theme\" text,\n\"Sales\" int,\nPRIMARY KEY (\"Journal_ID\")\n);", "CREATE TABLE IF NOT EXISTS \"editor\" (\n\"Editor_ID\" int,\n\"Name\" text,\n\"Age\" real,\nPRIMARY KEY (\"Editor_ID\")\n);", "CREATE TABLE IF NOT EXISTS \"journal_committee\" (\n\"Editor_ID\" int,\n\"Journal_ID\" int,\n\"Work_Type\" text,\nPRIMARY KEY (\"Editor_ID\",\"Journal_ID\"),\nFOREIGN KEY (\"Editor_ID\") REFERENCES `editor`(\"Editor_ID\"),\nFOREIGN KEY (\"Journal_ID\") REFERENCES `journal`(\"Journal_ID\")\n);" ]
List the names of editors who are older than 25.
SELECT Name FROM editor WHERE Age > 25
[ "SELECT", "Name", "FROM", "editor", "WHERE", "Age", ">", "25" ]
[ "select", "name", "from", "editor", "where", "age", ">", "value" ]
[ "List", "the", "names", "of", "editors", "who", "are", "older", "than", "25", "." ]
journal_committee
[ "CREATE TABLE IF NOT EXISTS \"journal\" (\n\"Journal_ID\" int,\n\"Date\" text,\n\"Theme\" text,\n\"Sales\" int,\nPRIMARY KEY (\"Journal_ID\")\n);", "CREATE TABLE IF NOT EXISTS \"editor\" (\n\"Editor_ID\" int,\n\"Name\" text,\n\"Age\" real,\nPRIMARY KEY (\"Editor_ID\")\n);", "CREATE TABLE IF NOT EXISTS \"journal_committee\" (\n\"Editor_ID\" int,\n\"Journal_ID\" int,\n\"Work_Type\" text,\nPRIMARY KEY (\"Editor_ID\",\"Journal_ID\"),\nFOREIGN KEY (\"Editor_ID\") REFERENCES `editor`(\"Editor_ID\"),\nFOREIGN KEY (\"Journal_ID\") REFERENCES `journal`(\"Journal_ID\")\n);" ]
Show the names of editors of age either 24 or 25.
SELECT Name FROM editor WHERE Age = 24 OR Age = 25
[ "SELECT", "Name", "FROM", "editor", "WHERE", "Age", "=", "24", "OR", "Age", "=", "25" ]
[ "select", "name", "from", "editor", "where", "age", "=", "value", "or", "age", "=", "value" ]
[ "Show", "the", "names", "of", "editors", "of", "age", "either", "24", "or", "25", "." ]
journal_committee
[ "CREATE TABLE IF NOT EXISTS \"journal\" (\n\"Journal_ID\" int,\n\"Date\" text,\n\"Theme\" text,\n\"Sales\" int,\nPRIMARY KEY (\"Journal_ID\")\n);", "CREATE TABLE IF NOT EXISTS \"editor\" (\n\"Editor_ID\" int,\n\"Name\" text,\n\"Age\" real,\nPRIMARY KEY (\"Editor_ID\")\n);", "CREATE TABLE IF NOT EXISTS \"journal_committee\" (\n\"Editor_ID\" int,\n\"Journal_ID\" int,\n\"Work_Type\" text,\nPRIMARY KEY (\"Editor_ID\",\"Journal_ID\"),\nFOREIGN KEY (\"Editor_ID\") REFERENCES `editor`(\"Editor_ID\"),\nFOREIGN KEY (\"Journal_ID\") REFERENCES `journal`(\"Journal_ID\")\n);" ]
What is the name of the youngest editor?
SELECT Name FROM editor ORDER BY Age ASC LIMIT 1
[ "SELECT", "Name", "FROM", "editor", "ORDER", "BY", "Age", "ASC", "LIMIT", "1" ]
[ "select", "name", "from", "editor", "order", "by", "age", "asc", "limit", "value" ]
[ "What", "is", "the", "name", "of", "the", "youngest", "editor", "?" ]
journal_committee
[ "CREATE TABLE IF NOT EXISTS \"journal\" (\n\"Journal_ID\" int,\n\"Date\" text,\n\"Theme\" text,\n\"Sales\" int,\nPRIMARY KEY (\"Journal_ID\")\n);", "CREATE TABLE IF NOT EXISTS \"editor\" (\n\"Editor_ID\" int,\n\"Name\" text,\n\"Age\" real,\nPRIMARY KEY (\"Editor_ID\")\n);", "CREATE TABLE IF NOT EXISTS \"journal_committee\" (\n\"Editor_ID\" int,\n\"Journal_ID\" int,\n\"Work_Type\" text,\nPRIMARY KEY (\"Editor_ID\",\"Journal_ID\"),\nFOREIGN KEY (\"Editor_ID\") REFERENCES `editor`(\"Editor_ID\"),\nFOREIGN KEY (\"Journal_ID\") REFERENCES `journal`(\"Journal_ID\")\n);" ]
What are the different ages of editors? Show each age along with the number of editors of that age.
SELECT Age , COUNT(*) FROM editor GROUP BY Age
[ "SELECT", "Age", ",", "COUNT", "(", "*", ")", "FROM", "editor", "GROUP", "BY", "Age" ]
[ "select", "age", ",", "count", "(", "*", ")", "from", "editor", "group", "by", "age" ]
[ "What", "are", "the", "different", "ages", "of", "editors", "?", "Show", "each", "age", "along", "with", "the", "number", "of", "editors", "of", "that", "age", "." ]
journal_committee
[ "CREATE TABLE IF NOT EXISTS \"journal\" (\n\"Journal_ID\" int,\n\"Date\" text,\n\"Theme\" text,\n\"Sales\" int,\nPRIMARY KEY (\"Journal_ID\")\n);", "CREATE TABLE IF NOT EXISTS \"editor\" (\n\"Editor_ID\" int,\n\"Name\" text,\n\"Age\" real,\nPRIMARY KEY (\"Editor_ID\")\n);", "CREATE TABLE IF NOT EXISTS \"journal_committee\" (\n\"Editor_ID\" int,\n\"Journal_ID\" int,\n\"Work_Type\" text,\nPRIMARY KEY (\"Editor_ID\",\"Journal_ID\"),\nFOREIGN KEY (\"Editor_ID\") REFERENCES `editor`(\"Editor_ID\"),\nFOREIGN KEY (\"Journal_ID\") REFERENCES `journal`(\"Journal_ID\")\n);" ]
Please show the most common age of editors.
SELECT Age FROM editor GROUP BY Age ORDER BY COUNT(*) DESC LIMIT 1
[ "SELECT", "Age", "FROM", "editor", "GROUP", "BY", "Age", "ORDER", "BY", "COUNT", "(", "*", ")", "DESC", "LIMIT", "1" ]
[ "select", "age", "from", "editor", "group", "by", "age", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ]
[ "Please", "show", "the", "most", "common", "age", "of", "editors", "." ]
journal_committee
[ "CREATE TABLE IF NOT EXISTS \"journal\" (\n\"Journal_ID\" int,\n\"Date\" text,\n\"Theme\" text,\n\"Sales\" int,\nPRIMARY KEY (\"Journal_ID\")\n);", "CREATE TABLE IF NOT EXISTS \"editor\" (\n\"Editor_ID\" int,\n\"Name\" text,\n\"Age\" real,\nPRIMARY KEY (\"Editor_ID\")\n);", "CREATE TABLE IF NOT EXISTS \"journal_committee\" (\n\"Editor_ID\" int,\n\"Journal_ID\" int,\n\"Work_Type\" text,\nPRIMARY KEY (\"Editor_ID\",\"Journal_ID\"),\nFOREIGN KEY (\"Editor_ID\") REFERENCES `editor`(\"Editor_ID\"),\nFOREIGN KEY (\"Journal_ID\") REFERENCES `journal`(\"Journal_ID\")\n);" ]
Show the distinct themes of journals.
SELECT DISTINCT Theme FROM journal
[ "SELECT", "DISTINCT", "Theme", "FROM", "journal" ]
[ "select", "distinct", "theme", "from", "journal" ]
[ "Show", "the", "distinct", "themes", "of", "journals", "." ]
journal_committee
[ "CREATE TABLE IF NOT EXISTS \"journal\" (\n\"Journal_ID\" int,\n\"Date\" text,\n\"Theme\" text,\n\"Sales\" int,\nPRIMARY KEY (\"Journal_ID\")\n);", "CREATE TABLE IF NOT EXISTS \"editor\" (\n\"Editor_ID\" int,\n\"Name\" text,\n\"Age\" real,\nPRIMARY KEY (\"Editor_ID\")\n);", "CREATE TABLE IF NOT EXISTS \"journal_committee\" (\n\"Editor_ID\" int,\n\"Journal_ID\" int,\n\"Work_Type\" text,\nPRIMARY KEY (\"Editor_ID\",\"Journal_ID\"),\nFOREIGN KEY (\"Editor_ID\") REFERENCES `editor`(\"Editor_ID\"),\nFOREIGN KEY (\"Journal_ID\") REFERENCES `journal`(\"Journal_ID\")\n);" ]
Show the names of editors and the theme of journals for which they serve on committees.
SELECT T2.Name , T3.Theme FROM journal_committee AS T1 JOIN editor AS T2 ON T1.Editor_ID = T2.Editor_ID JOIN journal AS T3 ON T1.Journal_ID = T3.Journal_ID
[ "SELECT", "T2.Name", ",", "T3.Theme", "FROM", "journal_committee", "AS", "T1", "JOIN", "editor", "AS", "T2", "ON", "T1.Editor_ID", "=", "T2.Editor_ID", "JOIN", "journal", "AS", "T3", "ON", "T1.Journal_ID", "=", "T3.Journal_ID" ]
[ "select", "t2", ".", "name", ",", "t3", ".", "theme", "from", "journal_committee", "as", "t1", "join", "editor", "as", "t2", "on", "t1", ".", "editor_id", "=", "t2", ".", "editor_id", "join", "journal", "as", "t3", "on", "t1", ".", "journal_id", "=", "t3", ".", "journal_id" ]
[ "Show", "the", "names", "of", "editors", "and", "the", "theme", "of", "journals", "for", "which", "they", "serve", "on", "committees", "." ]
journal_committee
[ "CREATE TABLE IF NOT EXISTS \"journal\" (\n\"Journal_ID\" int,\n\"Date\" text,\n\"Theme\" text,\n\"Sales\" int,\nPRIMARY KEY (\"Journal_ID\")\n);", "CREATE TABLE IF NOT EXISTS \"editor\" (\n\"Editor_ID\" int,\n\"Name\" text,\n\"Age\" real,\nPRIMARY KEY (\"Editor_ID\")\n);", "CREATE TABLE IF NOT EXISTS \"journal_committee\" (\n\"Editor_ID\" int,\n\"Journal_ID\" int,\n\"Work_Type\" text,\nPRIMARY KEY (\"Editor_ID\",\"Journal_ID\"),\nFOREIGN KEY (\"Editor_ID\") REFERENCES `editor`(\"Editor_ID\"),\nFOREIGN KEY (\"Journal_ID\") REFERENCES `journal`(\"Journal_ID\")\n);" ]
For each journal_committee, find the editor name and the journal theme.
SELECT T2.Name , T3.Theme FROM journal_committee AS T1 JOIN editor AS T2 ON T1.Editor_ID = T2.Editor_ID JOIN journal AS T3 ON T1.Journal_ID = T3.Journal_ID
[ "SELECT", "T2.Name", ",", "T3.Theme", "FROM", "journal_committee", "AS", "T1", "JOIN", "editor", "AS", "T2", "ON", "T1.Editor_ID", "=", "T2.Editor_ID", "JOIN", "journal", "AS", "T3", "ON", "T1.Journal_ID", "=", "T3.Journal_ID" ]
[ "select", "t2", ".", "name", ",", "t3", ".", "theme", "from", "journal_committee", "as", "t1", "join", "editor", "as", "t2", "on", "t1", ".", "editor_id", "=", "t2", ".", "editor_id", "join", "journal", "as", "t3", "on", "t1", ".", "journal_id", "=", "t3", ".", "journal_id" ]
[ "For", "each", "journal_committee", ",", "find", "the", "editor", "name", "and", "the", "journal", "theme", "." ]
journal_committee
[ "CREATE TABLE IF NOT EXISTS \"journal\" (\n\"Journal_ID\" int,\n\"Date\" text,\n\"Theme\" text,\n\"Sales\" int,\nPRIMARY KEY (\"Journal_ID\")\n);", "CREATE TABLE IF NOT EXISTS \"editor\" (\n\"Editor_ID\" int,\n\"Name\" text,\n\"Age\" real,\nPRIMARY KEY (\"Editor_ID\")\n);", "CREATE TABLE IF NOT EXISTS \"journal_committee\" (\n\"Editor_ID\" int,\n\"Journal_ID\" int,\n\"Work_Type\" text,\nPRIMARY KEY (\"Editor_ID\",\"Journal_ID\"),\nFOREIGN KEY (\"Editor_ID\") REFERENCES `editor`(\"Editor_ID\"),\nFOREIGN KEY (\"Journal_ID\") REFERENCES `journal`(\"Journal_ID\")\n);" ]
Show the names and ages of editors and the theme of journals for which they serve on committees, in ascending alphabetical order of theme.
SELECT T2.Name , T2.age , T3.Theme FROM journal_committee AS T1 JOIN editor AS T2 ON T1.Editor_ID = T2.Editor_ID JOIN journal AS T3 ON T1.Journal_ID = T3.Journal_ID ORDER BY T3.Theme ASC
[ "SELECT", "T2.Name", ",", "T2.age", ",", "T3.Theme", "FROM", "journal_committee", "AS", "T1", "JOIN", "editor", "AS", "T2", "ON", "T1.Editor_ID", "=", "T2.Editor_ID", "JOIN", "journal", "AS", "T3", "ON", "T1.Journal_ID", "=", "T3.Journal_ID", "ORDER", "BY", "T3.Theme", "ASC" ]
[ "select", "t2", ".", "name", ",", "t2", ".", "age", ",", "t3", ".", "theme", "from", "journal_committee", "as", "t1", "join", "editor", "as", "t2", "on", "t1", ".", "editor_id", "=", "t2", ".", "editor_id", "join", "journal", "as", "t3", "on", "t1", ".", "journal_id", "=", "t3", ".", "journal_id", "order", "by", "t3", ".", "theme", "asc" ]
[ "Show", "the", "names", "and", "ages", "of", "editors", "and", "the", "theme", "of", "journals", "for", "which", "they", "serve", "on", "committees", ",", "in", "ascending", "alphabetical", "order", "of", "theme", "." ]
journal_committee
[ "CREATE TABLE IF NOT EXISTS \"journal\" (\n\"Journal_ID\" int,\n\"Date\" text,\n\"Theme\" text,\n\"Sales\" int,\nPRIMARY KEY (\"Journal_ID\")\n);", "CREATE TABLE IF NOT EXISTS \"editor\" (\n\"Editor_ID\" int,\n\"Name\" text,\n\"Age\" real,\nPRIMARY KEY (\"Editor_ID\")\n);", "CREATE TABLE IF NOT EXISTS \"journal_committee\" (\n\"Editor_ID\" int,\n\"Journal_ID\" int,\n\"Work_Type\" text,\nPRIMARY KEY (\"Editor_ID\",\"Journal_ID\"),\nFOREIGN KEY (\"Editor_ID\") REFERENCES `editor`(\"Editor_ID\"),\nFOREIGN KEY (\"Journal_ID\") REFERENCES `journal`(\"Journal_ID\")\n);" ]
Show the names of editors that are on the committee of journals with sales bigger than 3000.
SELECT T2.Name FROM journal_committee AS T1 JOIN editor AS T2 ON T1.Editor_ID = T2.Editor_ID JOIN journal AS T3 ON T1.Journal_ID = T3.Journal_ID WHERE T3.Sales > 3000
[ "SELECT", "T2.Name", "FROM", "journal_committee", "AS", "T1", "JOIN", "editor", "AS", "T2", "ON", "T1.Editor_ID", "=", "T2.Editor_ID", "JOIN", "journal", "AS", "T3", "ON", "T1.Journal_ID", "=", "T3.Journal_ID", "WHERE", "T3.Sales", ">", "3000" ]
[ "select", "t2", ".", "name", "from", "journal_committee", "as", "t1", "join", "editor", "as", "t2", "on", "t1", ".", "editor_id", "=", "t2", ".", "editor_id", "join", "journal", "as", "t3", "on", "t1", ".", "journal_id", "=", "t3", ".", "journal_id", "where", "t3", ".", "sales", ">", "value" ]
[ "Show", "the", "names", "of", "editors", "that", "are", "on", "the", "committee", "of", "journals", "with", "sales", "bigger", "than", "3000", "." ]
journal_committee
[ "CREATE TABLE IF NOT EXISTS \"journal\" (\n\"Journal_ID\" int,\n\"Date\" text,\n\"Theme\" text,\n\"Sales\" int,\nPRIMARY KEY (\"Journal_ID\")\n);", "CREATE TABLE IF NOT EXISTS \"editor\" (\n\"Editor_ID\" int,\n\"Name\" text,\n\"Age\" real,\nPRIMARY KEY (\"Editor_ID\")\n);", "CREATE TABLE IF NOT EXISTS \"journal_committee\" (\n\"Editor_ID\" int,\n\"Journal_ID\" int,\n\"Work_Type\" text,\nPRIMARY KEY (\"Editor_ID\",\"Journal_ID\"),\nFOREIGN KEY (\"Editor_ID\") REFERENCES `editor`(\"Editor_ID\"),\nFOREIGN KEY (\"Journal_ID\") REFERENCES `journal`(\"Journal_ID\")\n);" ]
Show the id, name of each editor and the number of journal committees they are on.
SELECT T1.editor_id , T1.Name , COUNT(*) FROM editor AS T1 JOIN journal_committee AS T2 ON T1.Editor_ID = T2.Editor_ID GROUP BY T1.editor_id
[ "SELECT", "T1.editor_id", ",", "T1.Name", ",", "COUNT", "(", "*", ")", "FROM", "editor", "AS", "T1", "JOIN", "journal_committee", "AS", "T2", "ON", "T1.Editor_ID", "=", "T2.Editor_ID", "GROUP", "BY", "T1.editor_id" ]
[ "select", "t1", ".", "editor_id", ",", "t1", ".", "name", ",", "count", "(", "*", ")", "from", "editor", "as", "t1", "join", "journal_committee", "as", "t2", "on", "t1", ".", "editor_id", "=", "t2", ".", "editor_id", "group", "by", "t1", ".", "editor_id" ]
[ "Show", "the", "id", ",", "name", "of", "each", "editor", "and", "the", "number", "of", "journal", "committees", "they", "are", "on", "." ]
journal_committee
[ "CREATE TABLE IF NOT EXISTS \"journal\" (\n\"Journal_ID\" int,\n\"Date\" text,\n\"Theme\" text,\n\"Sales\" int,\nPRIMARY KEY (\"Journal_ID\")\n);", "CREATE TABLE IF NOT EXISTS \"editor\" (\n\"Editor_ID\" int,\n\"Name\" text,\n\"Age\" real,\nPRIMARY KEY (\"Editor_ID\")\n);", "CREATE TABLE IF NOT EXISTS \"journal_committee\" (\n\"Editor_ID\" int,\n\"Journal_ID\" int,\n\"Work_Type\" text,\nPRIMARY KEY (\"Editor_ID\",\"Journal_ID\"),\nFOREIGN KEY (\"Editor_ID\") REFERENCES `editor`(\"Editor_ID\"),\nFOREIGN KEY (\"Journal_ID\") REFERENCES `journal`(\"Journal_ID\")\n);" ]
Show the names of editors that are on at least two journal committees.
SELECT T1.Name FROM editor AS T1 JOIN journal_committee AS T2 ON T1.Editor_ID = T2.Editor_ID GROUP BY T1.Name HAVING COUNT(*) >= 2
[ "SELECT", "T1.Name", "FROM", "editor", "AS", "T1", "JOIN", "journal_committee", "AS", "T2", "ON", "T1.Editor_ID", "=", "T2.Editor_ID", "GROUP", "BY", "T1.Name", "HAVING", "COUNT", "(", "*", ")", ">", "=", "2" ]
[ "select", "t1", ".", "name", "from", "editor", "as", "t1", "join", "journal_committee", "as", "t2", "on", "t1", ".", "editor_id", "=", "t2", ".", "editor_id", "group", "by", "t1", ".", "name", "having", "count", "(", "*", ")", ">", "=", "value" ]
[ "Show", "the", "names", "of", "editors", "that", "are", "on", "at", "least", "two", "journal", "committees", "." ]
journal_committee
[ "CREATE TABLE IF NOT EXISTS \"journal\" (\n\"Journal_ID\" int,\n\"Date\" text,\n\"Theme\" text,\n\"Sales\" int,\nPRIMARY KEY (\"Journal_ID\")\n);", "CREATE TABLE IF NOT EXISTS \"editor\" (\n\"Editor_ID\" int,\n\"Name\" text,\n\"Age\" real,\nPRIMARY KEY (\"Editor_ID\")\n);", "CREATE TABLE IF NOT EXISTS \"journal_committee\" (\n\"Editor_ID\" int,\n\"Journal_ID\" int,\n\"Work_Type\" text,\nPRIMARY KEY (\"Editor_ID\",\"Journal_ID\"),\nFOREIGN KEY (\"Editor_ID\") REFERENCES `editor`(\"Editor_ID\"),\nFOREIGN KEY (\"Journal_ID\") REFERENCES `journal`(\"Journal_ID\")\n);" ]
List the names of editors that are not on any journal committee.
SELECT Name FROM editor WHERE editor_id NOT IN (SELECT editor_id FROM journal_committee)
[ "SELECT", "Name", "FROM", "editor", "WHERE", "editor_id", "NOT", "IN", "(", "SELECT", "editor_id", "FROM", "journal_committee", ")" ]
[ "select", "name", "from", "editor", "where", "editor_id", "not", "in", "(", "select", "editor_id", "from", "journal_committee", ")" ]
[ "List", "the", "names", "of", "editors", "that", "are", "not", "on", "any", "journal", "committee", "." ]
journal_committee
[ "CREATE TABLE IF NOT EXISTS \"journal\" (\n\"Journal_ID\" int,\n\"Date\" text,\n\"Theme\" text,\n\"Sales\" int,\nPRIMARY KEY (\"Journal_ID\")\n);", "CREATE TABLE IF NOT EXISTS \"editor\" (\n\"Editor_ID\" int,\n\"Name\" text,\n\"Age\" real,\nPRIMARY KEY (\"Editor_ID\")\n);", "CREATE TABLE IF NOT EXISTS \"journal_committee\" (\n\"Editor_ID\" int,\n\"Journal_ID\" int,\n\"Work_Type\" text,\nPRIMARY KEY (\"Editor_ID\",\"Journal_ID\"),\nFOREIGN KEY (\"Editor_ID\") REFERENCES `editor`(\"Editor_ID\"),\nFOREIGN KEY (\"Journal_ID\") REFERENCES `journal`(\"Journal_ID\")\n);" ]
List the date, theme and sales of the journal which did not have any of the listed editors serving on committee.
SELECT date , theme , sales FROM journal EXCEPT SELECT T1.date , T1.theme , T1.sales FROM journal AS T1 JOIN journal_committee AS T2 ON T1.journal_ID = T2.journal_ID
[ "SELECT", "date", ",", "theme", ",", "sales", "FROM", "journal", "EXCEPT", "SELECT", "T1.date", ",", "T1.theme", ",", "T1.sales", "FROM", "journal", "AS", "T1", "JOIN", "journal_committee", "AS", "T2", "ON", "T1.journal_ID", "=", "T2.journal_ID" ]
[ "select", "date", ",", "theme", ",", "sales", "from", "journal", "except", "select", "t1", ".", "date", ",", "t1", ".", "theme", ",", "t1", ".", "sales", "from", "journal", "as", "t1", "join", "journal_committee", "as", "t2", "on", "t1", ".", "journal_id", "=", "t2", ".", "journal_id" ]
[ "List", "the", "date", ",", "theme", "and", "sales", "of", "the", "journal", "which", "did", "not", "have", "any", "of", "the", "listed", "editors", "serving", "on", "committee", "." ]
journal_committee
[ "CREATE TABLE IF NOT EXISTS \"journal\" (\n\"Journal_ID\" int,\n\"Date\" text,\n\"Theme\" text,\n\"Sales\" int,\nPRIMARY KEY (\"Journal_ID\")\n);", "CREATE TABLE IF NOT EXISTS \"editor\" (\n\"Editor_ID\" int,\n\"Name\" text,\n\"Age\" real,\nPRIMARY KEY (\"Editor_ID\")\n);", "CREATE TABLE IF NOT EXISTS \"journal_committee\" (\n\"Editor_ID\" int,\n\"Journal_ID\" int,\n\"Work_Type\" text,\nPRIMARY KEY (\"Editor_ID\",\"Journal_ID\"),\nFOREIGN KEY (\"Editor_ID\") REFERENCES `editor`(\"Editor_ID\"),\nFOREIGN KEY (\"Journal_ID\") REFERENCES `journal`(\"Journal_ID\")\n);" ]
What is the average sales of the journals that have an editor whose work type is 'Photo'?
SELECT avg(T1.sales) FROM journal AS T1 JOIN journal_committee AS T2 ON T1.journal_ID = T2.journal_ID WHERE T2.work_type = 'Photo'
[ "SELECT", "avg", "(", "T1.sales", ")", "FROM", "journal", "AS", "T1", "JOIN", "journal_committee", "AS", "T2", "ON", "T1.journal_ID", "=", "T2.journal_ID", "WHERE", "T2.work_type", "=", "'Photo", "'" ]
[ "select", "avg", "(", "t1", ".", "sales", ")", "from", "journal", "as", "t1", "join", "journal_committee", "as", "t2", "on", "t1", ".", "journal_id", "=", "t2", ".", "journal_id", "where", "t2", ".", "work_type", "=", "value" ]
[ "What", "is", "the", "average", "sales", "of", "the", "journals", "that", "have", "an", "editor", "whose", "work", "type", "is", "'Photo", "'", "?" ]
customers_card_transactions
[ "CREATE TABLE `Accounts` (\n`account_id` INTEGER PRIMARY KEY,\n`customer_id` INTEGER NOT NULL,\n`account_name` VARCHAR(50),\n`other_account_details` VARCHAR(255)\n);", "CREATE TABLE `Customers` (\n`customer_id` INTEGER PRIMARY KEY,\n`customer_first_name` VARCHAR(20),\n`customer_last_name` VARCHAR(20),\n`customer_address` VARCHAR(255),\n`customer_phone` VARCHAR(255),\n`customer_email` VARCHAR(255),\n`other_customer_details` VARCHAR(255)\n);", "CREATE TABLE `Customers_Cards` (\n`card_id` INTEGER PRIMARY KEY,\n`customer_id` INTEGER NOT NULL,\n`card_type_code` VARCHAR(15) NOT NULL,\n`card_number` VARCHAR(80),\n`date_valid_from` DATETIME,\n`date_valid_to` DATETIME,\n`other_card_details` VARCHAR(255)\n);", "CREATE TABLE `Financial_Transactions` (\n`transaction_id` INTEGER NOT NULL ,\n`previous_transaction_id` INTEGER,\n`account_id` INTEGER NOT NULL,\n`card_id` INTEGER NOT NULL,\n`transaction_type` VARCHAR(15) NOT NULL,\n`transaction_date` DATETIME,\n`transaction_amount` DOUBLE NULL,\n`transaction_comment` VARCHAR(255),\n`other_transaction_details` VARCHAR(255),\nFOREIGN KEY (`card_id` ) REFERENCES `Customers_Cards`(`card_id` ),\nFOREIGN KEY (`account_id` ) REFERENCES `Accounts`(`account_id` )\n);" ]
How many accounts do we have?
SELECT count(*) FROM Accounts
[ "SELECT", "count", "(", "*", ")", "FROM", "Accounts" ]
[ "select", "count", "(", "*", ")", "from", "accounts" ]
[ "How", "many", "accounts", "do", "we", "have", "?" ]
customers_card_transactions
[ "CREATE TABLE `Accounts` (\n`account_id` INTEGER PRIMARY KEY,\n`customer_id` INTEGER NOT NULL,\n`account_name` VARCHAR(50),\n`other_account_details` VARCHAR(255)\n);", "CREATE TABLE `Customers` (\n`customer_id` INTEGER PRIMARY KEY,\n`customer_first_name` VARCHAR(20),\n`customer_last_name` VARCHAR(20),\n`customer_address` VARCHAR(255),\n`customer_phone` VARCHAR(255),\n`customer_email` VARCHAR(255),\n`other_customer_details` VARCHAR(255)\n);", "CREATE TABLE `Customers_Cards` (\n`card_id` INTEGER PRIMARY KEY,\n`customer_id` INTEGER NOT NULL,\n`card_type_code` VARCHAR(15) NOT NULL,\n`card_number` VARCHAR(80),\n`date_valid_from` DATETIME,\n`date_valid_to` DATETIME,\n`other_card_details` VARCHAR(255)\n);", "CREATE TABLE `Financial_Transactions` (\n`transaction_id` INTEGER NOT NULL ,\n`previous_transaction_id` INTEGER,\n`account_id` INTEGER NOT NULL,\n`card_id` INTEGER NOT NULL,\n`transaction_type` VARCHAR(15) NOT NULL,\n`transaction_date` DATETIME,\n`transaction_amount` DOUBLE NULL,\n`transaction_comment` VARCHAR(255),\n`other_transaction_details` VARCHAR(255),\nFOREIGN KEY (`card_id` ) REFERENCES `Customers_Cards`(`card_id` ),\nFOREIGN KEY (`account_id` ) REFERENCES `Accounts`(`account_id` )\n);" ]
Count the number of accounts.
SELECT count(*) FROM Accounts
[ "SELECT", "count", "(", "*", ")", "FROM", "Accounts" ]
[ "select", "count", "(", "*", ")", "from", "accounts" ]
[ "Count", "the", "number", "of", "accounts", "." ]
customers_card_transactions
[ "CREATE TABLE `Accounts` (\n`account_id` INTEGER PRIMARY KEY,\n`customer_id` INTEGER NOT NULL,\n`account_name` VARCHAR(50),\n`other_account_details` VARCHAR(255)\n);", "CREATE TABLE `Customers` (\n`customer_id` INTEGER PRIMARY KEY,\n`customer_first_name` VARCHAR(20),\n`customer_last_name` VARCHAR(20),\n`customer_address` VARCHAR(255),\n`customer_phone` VARCHAR(255),\n`customer_email` VARCHAR(255),\n`other_customer_details` VARCHAR(255)\n);", "CREATE TABLE `Customers_Cards` (\n`card_id` INTEGER PRIMARY KEY,\n`customer_id` INTEGER NOT NULL,\n`card_type_code` VARCHAR(15) NOT NULL,\n`card_number` VARCHAR(80),\n`date_valid_from` DATETIME,\n`date_valid_to` DATETIME,\n`other_card_details` VARCHAR(255)\n);", "CREATE TABLE `Financial_Transactions` (\n`transaction_id` INTEGER NOT NULL ,\n`previous_transaction_id` INTEGER,\n`account_id` INTEGER NOT NULL,\n`card_id` INTEGER NOT NULL,\n`transaction_type` VARCHAR(15) NOT NULL,\n`transaction_date` DATETIME,\n`transaction_amount` DOUBLE NULL,\n`transaction_comment` VARCHAR(255),\n`other_transaction_details` VARCHAR(255),\nFOREIGN KEY (`card_id` ) REFERENCES `Customers_Cards`(`card_id` ),\nFOREIGN KEY (`account_id` ) REFERENCES `Accounts`(`account_id` )\n);" ]
Show ids, customer ids, names for all accounts.
SELECT account_id , customer_id , account_name FROM Accounts
[ "SELECT", "account_id", ",", "customer_id", ",", "account_name", "FROM", "Accounts" ]
[ "select", "account_id", ",", "customer_id", ",", "account_name", "from", "accounts" ]
[ "Show", "ids", ",", "customer", "ids", ",", "names", "for", "all", "accounts", "." ]
customers_card_transactions
[ "CREATE TABLE `Accounts` (\n`account_id` INTEGER PRIMARY KEY,\n`customer_id` INTEGER NOT NULL,\n`account_name` VARCHAR(50),\n`other_account_details` VARCHAR(255)\n);", "CREATE TABLE `Customers` (\n`customer_id` INTEGER PRIMARY KEY,\n`customer_first_name` VARCHAR(20),\n`customer_last_name` VARCHAR(20),\n`customer_address` VARCHAR(255),\n`customer_phone` VARCHAR(255),\n`customer_email` VARCHAR(255),\n`other_customer_details` VARCHAR(255)\n);", "CREATE TABLE `Customers_Cards` (\n`card_id` INTEGER PRIMARY KEY,\n`customer_id` INTEGER NOT NULL,\n`card_type_code` VARCHAR(15) NOT NULL,\n`card_number` VARCHAR(80),\n`date_valid_from` DATETIME,\n`date_valid_to` DATETIME,\n`other_card_details` VARCHAR(255)\n);", "CREATE TABLE `Financial_Transactions` (\n`transaction_id` INTEGER NOT NULL ,\n`previous_transaction_id` INTEGER,\n`account_id` INTEGER NOT NULL,\n`card_id` INTEGER NOT NULL,\n`transaction_type` VARCHAR(15) NOT NULL,\n`transaction_date` DATETIME,\n`transaction_amount` DOUBLE NULL,\n`transaction_comment` VARCHAR(255),\n`other_transaction_details` VARCHAR(255),\nFOREIGN KEY (`card_id` ) REFERENCES `Customers_Cards`(`card_id` ),\nFOREIGN KEY (`account_id` ) REFERENCES `Accounts`(`account_id` )\n);" ]
What are the account ids, customer ids, and account names for all the accounts?
SELECT account_id , customer_id , account_name FROM Accounts
[ "SELECT", "account_id", ",", "customer_id", ",", "account_name", "FROM", "Accounts" ]
[ "select", "account_id", ",", "customer_id", ",", "account_name", "from", "accounts" ]
[ "What", "are", "the", "account", "ids", ",", "customer", "ids", ",", "and", "account", "names", "for", "all", "the", "accounts", "?" ]
customers_card_transactions
[ "CREATE TABLE `Accounts` (\n`account_id` INTEGER PRIMARY KEY,\n`customer_id` INTEGER NOT NULL,\n`account_name` VARCHAR(50),\n`other_account_details` VARCHAR(255)\n);", "CREATE TABLE `Customers` (\n`customer_id` INTEGER PRIMARY KEY,\n`customer_first_name` VARCHAR(20),\n`customer_last_name` VARCHAR(20),\n`customer_address` VARCHAR(255),\n`customer_phone` VARCHAR(255),\n`customer_email` VARCHAR(255),\n`other_customer_details` VARCHAR(255)\n);", "CREATE TABLE `Customers_Cards` (\n`card_id` INTEGER PRIMARY KEY,\n`customer_id` INTEGER NOT NULL,\n`card_type_code` VARCHAR(15) NOT NULL,\n`card_number` VARCHAR(80),\n`date_valid_from` DATETIME,\n`date_valid_to` DATETIME,\n`other_card_details` VARCHAR(255)\n);", "CREATE TABLE `Financial_Transactions` (\n`transaction_id` INTEGER NOT NULL ,\n`previous_transaction_id` INTEGER,\n`account_id` INTEGER NOT NULL,\n`card_id` INTEGER NOT NULL,\n`transaction_type` VARCHAR(15) NOT NULL,\n`transaction_date` DATETIME,\n`transaction_amount` DOUBLE NULL,\n`transaction_comment` VARCHAR(255),\n`other_transaction_details` VARCHAR(255),\nFOREIGN KEY (`card_id` ) REFERENCES `Customers_Cards`(`card_id` ),\nFOREIGN KEY (`account_id` ) REFERENCES `Accounts`(`account_id` )\n);" ]
Show other account details for account with name 338.
SELECT other_account_details FROM Accounts WHERE account_name = "338"
[ "SELECT", "other_account_details", "FROM", "Accounts", "WHERE", "account_name", "=", "``", "338", "''" ]
[ "select", "other_account_details", "from", "accounts", "where", "account_name", "=", "value" ]
[ "Show", "other", "account", "details", "for", "account", "with", "name", "338", "." ]
customers_card_transactions
[ "CREATE TABLE `Accounts` (\n`account_id` INTEGER PRIMARY KEY,\n`customer_id` INTEGER NOT NULL,\n`account_name` VARCHAR(50),\n`other_account_details` VARCHAR(255)\n);", "CREATE TABLE `Customers` (\n`customer_id` INTEGER PRIMARY KEY,\n`customer_first_name` VARCHAR(20),\n`customer_last_name` VARCHAR(20),\n`customer_address` VARCHAR(255),\n`customer_phone` VARCHAR(255),\n`customer_email` VARCHAR(255),\n`other_customer_details` VARCHAR(255)\n);", "CREATE TABLE `Customers_Cards` (\n`card_id` INTEGER PRIMARY KEY,\n`customer_id` INTEGER NOT NULL,\n`card_type_code` VARCHAR(15) NOT NULL,\n`card_number` VARCHAR(80),\n`date_valid_from` DATETIME,\n`date_valid_to` DATETIME,\n`other_card_details` VARCHAR(255)\n);", "CREATE TABLE `Financial_Transactions` (\n`transaction_id` INTEGER NOT NULL ,\n`previous_transaction_id` INTEGER,\n`account_id` INTEGER NOT NULL,\n`card_id` INTEGER NOT NULL,\n`transaction_type` VARCHAR(15) NOT NULL,\n`transaction_date` DATETIME,\n`transaction_amount` DOUBLE NULL,\n`transaction_comment` VARCHAR(255),\n`other_transaction_details` VARCHAR(255),\nFOREIGN KEY (`card_id` ) REFERENCES `Customers_Cards`(`card_id` ),\nFOREIGN KEY (`account_id` ) REFERENCES `Accounts`(`account_id` )\n);" ]
What are the other account details for the account with the name 338?
SELECT other_account_details FROM Accounts WHERE account_name = "338"
[ "SELECT", "other_account_details", "FROM", "Accounts", "WHERE", "account_name", "=", "``", "338", "''" ]
[ "select", "other_account_details", "from", "accounts", "where", "account_name", "=", "value" ]
[ "What", "are", "the", "other", "account", "details", "for", "the", "account", "with", "the", "name", "338", "?" ]
customers_card_transactions
[ "CREATE TABLE `Accounts` (\n`account_id` INTEGER PRIMARY KEY,\n`customer_id` INTEGER NOT NULL,\n`account_name` VARCHAR(50),\n`other_account_details` VARCHAR(255)\n);", "CREATE TABLE `Customers` (\n`customer_id` INTEGER PRIMARY KEY,\n`customer_first_name` VARCHAR(20),\n`customer_last_name` VARCHAR(20),\n`customer_address` VARCHAR(255),\n`customer_phone` VARCHAR(255),\n`customer_email` VARCHAR(255),\n`other_customer_details` VARCHAR(255)\n);", "CREATE TABLE `Customers_Cards` (\n`card_id` INTEGER PRIMARY KEY,\n`customer_id` INTEGER NOT NULL,\n`card_type_code` VARCHAR(15) NOT NULL,\n`card_number` VARCHAR(80),\n`date_valid_from` DATETIME,\n`date_valid_to` DATETIME,\n`other_card_details` VARCHAR(255)\n);", "CREATE TABLE `Financial_Transactions` (\n`transaction_id` INTEGER NOT NULL ,\n`previous_transaction_id` INTEGER,\n`account_id` INTEGER NOT NULL,\n`card_id` INTEGER NOT NULL,\n`transaction_type` VARCHAR(15) NOT NULL,\n`transaction_date` DATETIME,\n`transaction_amount` DOUBLE NULL,\n`transaction_comment` VARCHAR(255),\n`other_transaction_details` VARCHAR(255),\nFOREIGN KEY (`card_id` ) REFERENCES `Customers_Cards`(`card_id` ),\nFOREIGN KEY (`account_id` ) REFERENCES `Accounts`(`account_id` )\n);" ]
What is the first name, last name, and phone of the customer with account name 162?
SELECT T2.customer_first_name , T2.customer_last_name , T2.customer_phone FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T1.account_name = "162"
[ "SELECT", "T2.customer_first_name", ",", "T2.customer_last_name", ",", "T2.customer_phone", "FROM", "Accounts", "AS", "T1", "JOIN", "Customers", "AS", "T2", "ON", "T1.customer_id", "=", "T2.customer_id", "WHERE", "T1.account_name", "=", "``", "162", "''" ]
[ "select", "t2", ".", "customer_first_name", ",", "t2", ".", "customer_last_name", ",", "t2", ".", "customer_phone", "from", "accounts", "as", "t1", "join", "customers", "as", "t2", "on", "t1", ".", "customer_id", "=", "t2", ".", "customer_id", "where", "t1", ".", "account_name", "=", "value" ]
[ "What", "is", "the", "first", "name", ",", "last", "name", ",", "and", "phone", "of", "the", "customer", "with", "account", "name", "162", "?" ]
customers_card_transactions
[ "CREATE TABLE `Accounts` (\n`account_id` INTEGER PRIMARY KEY,\n`customer_id` INTEGER NOT NULL,\n`account_name` VARCHAR(50),\n`other_account_details` VARCHAR(255)\n);", "CREATE TABLE `Customers` (\n`customer_id` INTEGER PRIMARY KEY,\n`customer_first_name` VARCHAR(20),\n`customer_last_name` VARCHAR(20),\n`customer_address` VARCHAR(255),\n`customer_phone` VARCHAR(255),\n`customer_email` VARCHAR(255),\n`other_customer_details` VARCHAR(255)\n);", "CREATE TABLE `Customers_Cards` (\n`card_id` INTEGER PRIMARY KEY,\n`customer_id` INTEGER NOT NULL,\n`card_type_code` VARCHAR(15) NOT NULL,\n`card_number` VARCHAR(80),\n`date_valid_from` DATETIME,\n`date_valid_to` DATETIME,\n`other_card_details` VARCHAR(255)\n);", "CREATE TABLE `Financial_Transactions` (\n`transaction_id` INTEGER NOT NULL ,\n`previous_transaction_id` INTEGER,\n`account_id` INTEGER NOT NULL,\n`card_id` INTEGER NOT NULL,\n`transaction_type` VARCHAR(15) NOT NULL,\n`transaction_date` DATETIME,\n`transaction_amount` DOUBLE NULL,\n`transaction_comment` VARCHAR(255),\n`other_transaction_details` VARCHAR(255),\nFOREIGN KEY (`card_id` ) REFERENCES `Customers_Cards`(`card_id` ),\nFOREIGN KEY (`account_id` ) REFERENCES `Accounts`(`account_id` )\n);" ]
Give the full name and phone of the customer who has the account name 162.
SELECT T2.customer_first_name , T2.customer_last_name , T2.customer_phone FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T1.account_name = "162"
[ "SELECT", "T2.customer_first_name", ",", "T2.customer_last_name", ",", "T2.customer_phone", "FROM", "Accounts", "AS", "T1", "JOIN", "Customers", "AS", "T2", "ON", "T1.customer_id", "=", "T2.customer_id", "WHERE", "T1.account_name", "=", "``", "162", "''" ]
[ "select", "t2", ".", "customer_first_name", ",", "t2", ".", "customer_last_name", ",", "t2", ".", "customer_phone", "from", "accounts", "as", "t1", "join", "customers", "as", "t2", "on", "t1", ".", "customer_id", "=", "t2", ".", "customer_id", "where", "t1", ".", "account_name", "=", "value" ]
[ "Give", "the", "full", "name", "and", "phone", "of", "the", "customer", "who", "has", "the", "account", "name", "162", "." ]
customers_card_transactions
[ "CREATE TABLE `Accounts` (\n`account_id` INTEGER PRIMARY KEY,\n`customer_id` INTEGER NOT NULL,\n`account_name` VARCHAR(50),\n`other_account_details` VARCHAR(255)\n);", "CREATE TABLE `Customers` (\n`customer_id` INTEGER PRIMARY KEY,\n`customer_first_name` VARCHAR(20),\n`customer_last_name` VARCHAR(20),\n`customer_address` VARCHAR(255),\n`customer_phone` VARCHAR(255),\n`customer_email` VARCHAR(255),\n`other_customer_details` VARCHAR(255)\n);", "CREATE TABLE `Customers_Cards` (\n`card_id` INTEGER PRIMARY KEY,\n`customer_id` INTEGER NOT NULL,\n`card_type_code` VARCHAR(15) NOT NULL,\n`card_number` VARCHAR(80),\n`date_valid_from` DATETIME,\n`date_valid_to` DATETIME,\n`other_card_details` VARCHAR(255)\n);", "CREATE TABLE `Financial_Transactions` (\n`transaction_id` INTEGER NOT NULL ,\n`previous_transaction_id` INTEGER,\n`account_id` INTEGER NOT NULL,\n`card_id` INTEGER NOT NULL,\n`transaction_type` VARCHAR(15) NOT NULL,\n`transaction_date` DATETIME,\n`transaction_amount` DOUBLE NULL,\n`transaction_comment` VARCHAR(255),\n`other_transaction_details` VARCHAR(255),\nFOREIGN KEY (`card_id` ) REFERENCES `Customers_Cards`(`card_id` ),\nFOREIGN KEY (`account_id` ) REFERENCES `Accounts`(`account_id` )\n);" ]
How many accounts does the customer with first name Art and last name Turcotte have?
SELECT count(*) FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T2.customer_first_name = "Art" AND T2.customer_last_name = "Turcotte"
[ "SELECT", "count", "(", "*", ")", "FROM", "Accounts", "AS", "T1", "JOIN", "Customers", "AS", "T2", "ON", "T1.customer_id", "=", "T2.customer_id", "WHERE", "T2.customer_first_name", "=", "``", "Art", "''", "AND", "T2.customer_last_name", "=", "``", "Turcotte", "''" ]
[ "select", "count", "(", "*", ")", "from", "accounts", "as", "t1", "join", "customers", "as", "t2", "on", "t1", ".", "customer_id", "=", "t2", ".", "customer_id", "where", "t2", ".", "customer_first_name", "=", "value", "and", "t2", ".", "customer_last_name", "=", "value" ]
[ "How", "many", "accounts", "does", "the", "customer", "with", "first", "name", "Art", "and", "last", "name", "Turcotte", "have", "?" ]
customers_card_transactions
[ "CREATE TABLE `Accounts` (\n`account_id` INTEGER PRIMARY KEY,\n`customer_id` INTEGER NOT NULL,\n`account_name` VARCHAR(50),\n`other_account_details` VARCHAR(255)\n);", "CREATE TABLE `Customers` (\n`customer_id` INTEGER PRIMARY KEY,\n`customer_first_name` VARCHAR(20),\n`customer_last_name` VARCHAR(20),\n`customer_address` VARCHAR(255),\n`customer_phone` VARCHAR(255),\n`customer_email` VARCHAR(255),\n`other_customer_details` VARCHAR(255)\n);", "CREATE TABLE `Customers_Cards` (\n`card_id` INTEGER PRIMARY KEY,\n`customer_id` INTEGER NOT NULL,\n`card_type_code` VARCHAR(15) NOT NULL,\n`card_number` VARCHAR(80),\n`date_valid_from` DATETIME,\n`date_valid_to` DATETIME,\n`other_card_details` VARCHAR(255)\n);", "CREATE TABLE `Financial_Transactions` (\n`transaction_id` INTEGER NOT NULL ,\n`previous_transaction_id` INTEGER,\n`account_id` INTEGER NOT NULL,\n`card_id` INTEGER NOT NULL,\n`transaction_type` VARCHAR(15) NOT NULL,\n`transaction_date` DATETIME,\n`transaction_amount` DOUBLE NULL,\n`transaction_comment` VARCHAR(255),\n`other_transaction_details` VARCHAR(255),\nFOREIGN KEY (`card_id` ) REFERENCES `Customers_Cards`(`card_id` ),\nFOREIGN KEY (`account_id` ) REFERENCES `Accounts`(`account_id` )\n);" ]
Return the number of accounts that the customer with the first name Art and last name Turcotte has.
SELECT count(*) FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T2.customer_first_name = "Art" AND T2.customer_last_name = "Turcotte"
[ "SELECT", "count", "(", "*", ")", "FROM", "Accounts", "AS", "T1", "JOIN", "Customers", "AS", "T2", "ON", "T1.customer_id", "=", "T2.customer_id", "WHERE", "T2.customer_first_name", "=", "``", "Art", "''", "AND", "T2.customer_last_name", "=", "``", "Turcotte", "''" ]
[ "select", "count", "(", "*", ")", "from", "accounts", "as", "t1", "join", "customers", "as", "t2", "on", "t1", ".", "customer_id", "=", "t2", ".", "customer_id", "where", "t2", ".", "customer_first_name", "=", "value", "and", "t2", ".", "customer_last_name", "=", "value" ]
[ "Return", "the", "number", "of", "accounts", "that", "the", "customer", "with", "the", "first", "name", "Art", "and", "last", "name", "Turcotte", "has", "." ]
customers_card_transactions
[ "CREATE TABLE `Accounts` (\n`account_id` INTEGER PRIMARY KEY,\n`customer_id` INTEGER NOT NULL,\n`account_name` VARCHAR(50),\n`other_account_details` VARCHAR(255)\n);", "CREATE TABLE `Customers` (\n`customer_id` INTEGER PRIMARY KEY,\n`customer_first_name` VARCHAR(20),\n`customer_last_name` VARCHAR(20),\n`customer_address` VARCHAR(255),\n`customer_phone` VARCHAR(255),\n`customer_email` VARCHAR(255),\n`other_customer_details` VARCHAR(255)\n);", "CREATE TABLE `Customers_Cards` (\n`card_id` INTEGER PRIMARY KEY,\n`customer_id` INTEGER NOT NULL,\n`card_type_code` VARCHAR(15) NOT NULL,\n`card_number` VARCHAR(80),\n`date_valid_from` DATETIME,\n`date_valid_to` DATETIME,\n`other_card_details` VARCHAR(255)\n);", "CREATE TABLE `Financial_Transactions` (\n`transaction_id` INTEGER NOT NULL ,\n`previous_transaction_id` INTEGER,\n`account_id` INTEGER NOT NULL,\n`card_id` INTEGER NOT NULL,\n`transaction_type` VARCHAR(15) NOT NULL,\n`transaction_date` DATETIME,\n`transaction_amount` DOUBLE NULL,\n`transaction_comment` VARCHAR(255),\n`other_transaction_details` VARCHAR(255),\nFOREIGN KEY (`card_id` ) REFERENCES `Customers_Cards`(`card_id` ),\nFOREIGN KEY (`account_id` ) REFERENCES `Accounts`(`account_id` )\n);" ]
Show all customer ids and the number of accounts for each customer.
SELECT customer_id , count(*) FROM Accounts GROUP BY customer_id
[ "SELECT", "customer_id", ",", "count", "(", "*", ")", "FROM", "Accounts", "GROUP", "BY", "customer_id" ]
[ "select", "customer_id", ",", "count", "(", "*", ")", "from", "accounts", "group", "by", "customer_id" ]
[ "Show", "all", "customer", "ids", "and", "the", "number", "of", "accounts", "for", "each", "customer", "." ]
customers_card_transactions
[ "CREATE TABLE `Accounts` (\n`account_id` INTEGER PRIMARY KEY,\n`customer_id` INTEGER NOT NULL,\n`account_name` VARCHAR(50),\n`other_account_details` VARCHAR(255)\n);", "CREATE TABLE `Customers` (\n`customer_id` INTEGER PRIMARY KEY,\n`customer_first_name` VARCHAR(20),\n`customer_last_name` VARCHAR(20),\n`customer_address` VARCHAR(255),\n`customer_phone` VARCHAR(255),\n`customer_email` VARCHAR(255),\n`other_customer_details` VARCHAR(255)\n);", "CREATE TABLE `Customers_Cards` (\n`card_id` INTEGER PRIMARY KEY,\n`customer_id` INTEGER NOT NULL,\n`card_type_code` VARCHAR(15) NOT NULL,\n`card_number` VARCHAR(80),\n`date_valid_from` DATETIME,\n`date_valid_to` DATETIME,\n`other_card_details` VARCHAR(255)\n);", "CREATE TABLE `Financial_Transactions` (\n`transaction_id` INTEGER NOT NULL ,\n`previous_transaction_id` INTEGER,\n`account_id` INTEGER NOT NULL,\n`card_id` INTEGER NOT NULL,\n`transaction_type` VARCHAR(15) NOT NULL,\n`transaction_date` DATETIME,\n`transaction_amount` DOUBLE NULL,\n`transaction_comment` VARCHAR(255),\n`other_transaction_details` VARCHAR(255),\nFOREIGN KEY (`card_id` ) REFERENCES `Customers_Cards`(`card_id` ),\nFOREIGN KEY (`account_id` ) REFERENCES `Accounts`(`account_id` )\n);" ]
How many accounts are there for each customer id?
SELECT customer_id , count(*) FROM Accounts GROUP BY customer_id
[ "SELECT", "customer_id", ",", "count", "(", "*", ")", "FROM", "Accounts", "GROUP", "BY", "customer_id" ]
[ "select", "customer_id", ",", "count", "(", "*", ")", "from", "accounts", "group", "by", "customer_id" ]
[ "How", "many", "accounts", "are", "there", "for", "each", "customer", "id", "?" ]
customers_card_transactions
[ "CREATE TABLE `Accounts` (\n`account_id` INTEGER PRIMARY KEY,\n`customer_id` INTEGER NOT NULL,\n`account_name` VARCHAR(50),\n`other_account_details` VARCHAR(255)\n);", "CREATE TABLE `Customers` (\n`customer_id` INTEGER PRIMARY KEY,\n`customer_first_name` VARCHAR(20),\n`customer_last_name` VARCHAR(20),\n`customer_address` VARCHAR(255),\n`customer_phone` VARCHAR(255),\n`customer_email` VARCHAR(255),\n`other_customer_details` VARCHAR(255)\n);", "CREATE TABLE `Customers_Cards` (\n`card_id` INTEGER PRIMARY KEY,\n`customer_id` INTEGER NOT NULL,\n`card_type_code` VARCHAR(15) NOT NULL,\n`card_number` VARCHAR(80),\n`date_valid_from` DATETIME,\n`date_valid_to` DATETIME,\n`other_card_details` VARCHAR(255)\n);", "CREATE TABLE `Financial_Transactions` (\n`transaction_id` INTEGER NOT NULL ,\n`previous_transaction_id` INTEGER,\n`account_id` INTEGER NOT NULL,\n`card_id` INTEGER NOT NULL,\n`transaction_type` VARCHAR(15) NOT NULL,\n`transaction_date` DATETIME,\n`transaction_amount` DOUBLE NULL,\n`transaction_comment` VARCHAR(255),\n`other_transaction_details` VARCHAR(255),\nFOREIGN KEY (`card_id` ) REFERENCES `Customers_Cards`(`card_id` ),\nFOREIGN KEY (`account_id` ) REFERENCES `Accounts`(`account_id` )\n);" ]
Show the customer id and number of accounts with most accounts.
SELECT customer_id , count(*) FROM Accounts GROUP BY customer_id ORDER BY count(*) DESC LIMIT 1
[ "SELECT", "customer_id", ",", "count", "(", "*", ")", "FROM", "Accounts", "GROUP", "BY", "customer_id", "ORDER", "BY", "count", "(", "*", ")", "DESC", "LIMIT", "1" ]
[ "select", "customer_id", ",", "count", "(", "*", ")", "from", "accounts", "group", "by", "customer_id", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ]
[ "Show", "the", "customer", "id", "and", "number", "of", "accounts", "with", "most", "accounts", "." ]
customers_card_transactions
[ "CREATE TABLE `Accounts` (\n`account_id` INTEGER PRIMARY KEY,\n`customer_id` INTEGER NOT NULL,\n`account_name` VARCHAR(50),\n`other_account_details` VARCHAR(255)\n);", "CREATE TABLE `Customers` (\n`customer_id` INTEGER PRIMARY KEY,\n`customer_first_name` VARCHAR(20),\n`customer_last_name` VARCHAR(20),\n`customer_address` VARCHAR(255),\n`customer_phone` VARCHAR(255),\n`customer_email` VARCHAR(255),\n`other_customer_details` VARCHAR(255)\n);", "CREATE TABLE `Customers_Cards` (\n`card_id` INTEGER PRIMARY KEY,\n`customer_id` INTEGER NOT NULL,\n`card_type_code` VARCHAR(15) NOT NULL,\n`card_number` VARCHAR(80),\n`date_valid_from` DATETIME,\n`date_valid_to` DATETIME,\n`other_card_details` VARCHAR(255)\n);", "CREATE TABLE `Financial_Transactions` (\n`transaction_id` INTEGER NOT NULL ,\n`previous_transaction_id` INTEGER,\n`account_id` INTEGER NOT NULL,\n`card_id` INTEGER NOT NULL,\n`transaction_type` VARCHAR(15) NOT NULL,\n`transaction_date` DATETIME,\n`transaction_amount` DOUBLE NULL,\n`transaction_comment` VARCHAR(255),\n`other_transaction_details` VARCHAR(255),\nFOREIGN KEY (`card_id` ) REFERENCES `Customers_Cards`(`card_id` ),\nFOREIGN KEY (`account_id` ) REFERENCES `Accounts`(`account_id` )\n);" ]
What is the customer id of the customer with the most accounts, and how many accounts does this person have?
SELECT customer_id , count(*) FROM Accounts GROUP BY customer_id ORDER BY count(*) DESC LIMIT 1
[ "SELECT", "customer_id", ",", "count", "(", "*", ")", "FROM", "Accounts", "GROUP", "BY", "customer_id", "ORDER", "BY", "count", "(", "*", ")", "DESC", "LIMIT", "1" ]
[ "select", "customer_id", ",", "count", "(", "*", ")", "from", "accounts", "group", "by", "customer_id", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ]
[ "What", "is", "the", "customer", "id", "of", "the", "customer", "with", "the", "most", "accounts", ",", "and", "how", "many", "accounts", "does", "this", "person", "have", "?" ]
customers_card_transactions
[ "CREATE TABLE `Accounts` (\n`account_id` INTEGER PRIMARY KEY,\n`customer_id` INTEGER NOT NULL,\n`account_name` VARCHAR(50),\n`other_account_details` VARCHAR(255)\n);", "CREATE TABLE `Customers` (\n`customer_id` INTEGER PRIMARY KEY,\n`customer_first_name` VARCHAR(20),\n`customer_last_name` VARCHAR(20),\n`customer_address` VARCHAR(255),\n`customer_phone` VARCHAR(255),\n`customer_email` VARCHAR(255),\n`other_customer_details` VARCHAR(255)\n);", "CREATE TABLE `Customers_Cards` (\n`card_id` INTEGER PRIMARY KEY,\n`customer_id` INTEGER NOT NULL,\n`card_type_code` VARCHAR(15) NOT NULL,\n`card_number` VARCHAR(80),\n`date_valid_from` DATETIME,\n`date_valid_to` DATETIME,\n`other_card_details` VARCHAR(255)\n);", "CREATE TABLE `Financial_Transactions` (\n`transaction_id` INTEGER NOT NULL ,\n`previous_transaction_id` INTEGER,\n`account_id` INTEGER NOT NULL,\n`card_id` INTEGER NOT NULL,\n`transaction_type` VARCHAR(15) NOT NULL,\n`transaction_date` DATETIME,\n`transaction_amount` DOUBLE NULL,\n`transaction_comment` VARCHAR(255),\n`other_transaction_details` VARCHAR(255),\nFOREIGN KEY (`card_id` ) REFERENCES `Customers_Cards`(`card_id` ),\nFOREIGN KEY (`account_id` ) REFERENCES `Accounts`(`account_id` )\n);" ]
What is the customer first, last name and id with least number of accounts.
SELECT T2.customer_first_name , T2.customer_last_name , T1.customer_id FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id ORDER BY count(*) ASC LIMIT 1
[ "SELECT", "T2.customer_first_name", ",", "T2.customer_last_name", ",", "T1.customer_id", "FROM", "Accounts", "AS", "T1", "JOIN", "Customers", "AS", "T2", "ON", "T1.customer_id", "=", "T2.customer_id", "GROUP", "BY", "T1.customer_id", "ORDER", "BY", "count", "(", "*", ")", "ASC", "LIMIT", "1" ]
[ "select", "t2", ".", "customer_first_name", ",", "t2", ".", "customer_last_name", ",", "t1", ".", "customer_id", "from", "accounts", "as", "t1", "join", "customers", "as", "t2", "on", "t1", ".", "customer_id", "=", "t2", ".", "customer_id", "group", "by", "t1", ".", "customer_id", "order", "by", "count", "(", "*", ")", "asc", "limit", "value" ]
[ "What", "is", "the", "customer", "first", ",", "last", "name", "and", "id", "with", "least", "number", "of", "accounts", "." ]
customers_card_transactions
[ "CREATE TABLE `Accounts` (\n`account_id` INTEGER PRIMARY KEY,\n`customer_id` INTEGER NOT NULL,\n`account_name` VARCHAR(50),\n`other_account_details` VARCHAR(255)\n);", "CREATE TABLE `Customers` (\n`customer_id` INTEGER PRIMARY KEY,\n`customer_first_name` VARCHAR(20),\n`customer_last_name` VARCHAR(20),\n`customer_address` VARCHAR(255),\n`customer_phone` VARCHAR(255),\n`customer_email` VARCHAR(255),\n`other_customer_details` VARCHAR(255)\n);", "CREATE TABLE `Customers_Cards` (\n`card_id` INTEGER PRIMARY KEY,\n`customer_id` INTEGER NOT NULL,\n`card_type_code` VARCHAR(15) NOT NULL,\n`card_number` VARCHAR(80),\n`date_valid_from` DATETIME,\n`date_valid_to` DATETIME,\n`other_card_details` VARCHAR(255)\n);", "CREATE TABLE `Financial_Transactions` (\n`transaction_id` INTEGER NOT NULL ,\n`previous_transaction_id` INTEGER,\n`account_id` INTEGER NOT NULL,\n`card_id` INTEGER NOT NULL,\n`transaction_type` VARCHAR(15) NOT NULL,\n`transaction_date` DATETIME,\n`transaction_amount` DOUBLE NULL,\n`transaction_comment` VARCHAR(255),\n`other_transaction_details` VARCHAR(255),\nFOREIGN KEY (`card_id` ) REFERENCES `Customers_Cards`(`card_id` ),\nFOREIGN KEY (`account_id` ) REFERENCES `Accounts`(`account_id` )\n);" ]
Give the full name and customer id of the customer with the fewest accounts.
SELECT T2.customer_first_name , T2.customer_last_name , T1.customer_id FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id ORDER BY count(*) ASC LIMIT 1
[ "SELECT", "T2.customer_first_name", ",", "T2.customer_last_name", ",", "T1.customer_id", "FROM", "Accounts", "AS", "T1", "JOIN", "Customers", "AS", "T2", "ON", "T1.customer_id", "=", "T2.customer_id", "GROUP", "BY", "T1.customer_id", "ORDER", "BY", "count", "(", "*", ")", "ASC", "LIMIT", "1" ]
[ "select", "t2", ".", "customer_first_name", ",", "t2", ".", "customer_last_name", ",", "t1", ".", "customer_id", "from", "accounts", "as", "t1", "join", "customers", "as", "t2", "on", "t1", ".", "customer_id", "=", "t2", ".", "customer_id", "group", "by", "t1", ".", "customer_id", "order", "by", "count", "(", "*", ")", "asc", "limit", "value" ]
[ "Give", "the", "full", "name", "and", "customer", "id", "of", "the", "customer", "with", "the", "fewest", "accounts", "." ]
customers_card_transactions
[ "CREATE TABLE `Accounts` (\n`account_id` INTEGER PRIMARY KEY,\n`customer_id` INTEGER NOT NULL,\n`account_name` VARCHAR(50),\n`other_account_details` VARCHAR(255)\n);", "CREATE TABLE `Customers` (\n`customer_id` INTEGER PRIMARY KEY,\n`customer_first_name` VARCHAR(20),\n`customer_last_name` VARCHAR(20),\n`customer_address` VARCHAR(255),\n`customer_phone` VARCHAR(255),\n`customer_email` VARCHAR(255),\n`other_customer_details` VARCHAR(255)\n);", "CREATE TABLE `Customers_Cards` (\n`card_id` INTEGER PRIMARY KEY,\n`customer_id` INTEGER NOT NULL,\n`card_type_code` VARCHAR(15) NOT NULL,\n`card_number` VARCHAR(80),\n`date_valid_from` DATETIME,\n`date_valid_to` DATETIME,\n`other_card_details` VARCHAR(255)\n);", "CREATE TABLE `Financial_Transactions` (\n`transaction_id` INTEGER NOT NULL ,\n`previous_transaction_id` INTEGER,\n`account_id` INTEGER NOT NULL,\n`card_id` INTEGER NOT NULL,\n`transaction_type` VARCHAR(15) NOT NULL,\n`transaction_date` DATETIME,\n`transaction_amount` DOUBLE NULL,\n`transaction_comment` VARCHAR(255),\n`other_transaction_details` VARCHAR(255),\nFOREIGN KEY (`card_id` ) REFERENCES `Customers_Cards`(`card_id` ),\nFOREIGN KEY (`account_id` ) REFERENCES `Accounts`(`account_id` )\n);" ]
Show the number of all customers without an account.
SELECT count(*) FROM Customers WHERE customer_id NOT IN (SELECT customer_id FROM Accounts)
[ "SELECT", "count", "(", "*", ")", "FROM", "Customers", "WHERE", "customer_id", "NOT", "IN", "(", "SELECT", "customer_id", "FROM", "Accounts", ")" ]
[ "select", "count", "(", "*", ")", "from", "customers", "where", "customer_id", "not", "in", "(", "select", "customer_id", "from", "accounts", ")" ]
[ "Show", "the", "number", "of", "all", "customers", "without", "an", "account", "." ]
customers_card_transactions
[ "CREATE TABLE `Accounts` (\n`account_id` INTEGER PRIMARY KEY,\n`customer_id` INTEGER NOT NULL,\n`account_name` VARCHAR(50),\n`other_account_details` VARCHAR(255)\n);", "CREATE TABLE `Customers` (\n`customer_id` INTEGER PRIMARY KEY,\n`customer_first_name` VARCHAR(20),\n`customer_last_name` VARCHAR(20),\n`customer_address` VARCHAR(255),\n`customer_phone` VARCHAR(255),\n`customer_email` VARCHAR(255),\n`other_customer_details` VARCHAR(255)\n);", "CREATE TABLE `Customers_Cards` (\n`card_id` INTEGER PRIMARY KEY,\n`customer_id` INTEGER NOT NULL,\n`card_type_code` VARCHAR(15) NOT NULL,\n`card_number` VARCHAR(80),\n`date_valid_from` DATETIME,\n`date_valid_to` DATETIME,\n`other_card_details` VARCHAR(255)\n);", "CREATE TABLE `Financial_Transactions` (\n`transaction_id` INTEGER NOT NULL ,\n`previous_transaction_id` INTEGER,\n`account_id` INTEGER NOT NULL,\n`card_id` INTEGER NOT NULL,\n`transaction_type` VARCHAR(15) NOT NULL,\n`transaction_date` DATETIME,\n`transaction_amount` DOUBLE NULL,\n`transaction_comment` VARCHAR(255),\n`other_transaction_details` VARCHAR(255),\nFOREIGN KEY (`card_id` ) REFERENCES `Customers_Cards`(`card_id` ),\nFOREIGN KEY (`account_id` ) REFERENCES `Accounts`(`account_id` )\n);" ]
How many customers do not have an account?
SELECT count(*) FROM Customers WHERE customer_id NOT IN (SELECT customer_id FROM Accounts)
[ "SELECT", "count", "(", "*", ")", "FROM", "Customers", "WHERE", "customer_id", "NOT", "IN", "(", "SELECT", "customer_id", "FROM", "Accounts", ")" ]
[ "select", "count", "(", "*", ")", "from", "customers", "where", "customer_id", "not", "in", "(", "select", "customer_id", "from", "accounts", ")" ]
[ "How", "many", "customers", "do", "not", "have", "an", "account", "?" ]
customers_card_transactions
[ "CREATE TABLE `Accounts` (\n`account_id` INTEGER PRIMARY KEY,\n`customer_id` INTEGER NOT NULL,\n`account_name` VARCHAR(50),\n`other_account_details` VARCHAR(255)\n);", "CREATE TABLE `Customers` (\n`customer_id` INTEGER PRIMARY KEY,\n`customer_first_name` VARCHAR(20),\n`customer_last_name` VARCHAR(20),\n`customer_address` VARCHAR(255),\n`customer_phone` VARCHAR(255),\n`customer_email` VARCHAR(255),\n`other_customer_details` VARCHAR(255)\n);", "CREATE TABLE `Customers_Cards` (\n`card_id` INTEGER PRIMARY KEY,\n`customer_id` INTEGER NOT NULL,\n`card_type_code` VARCHAR(15) NOT NULL,\n`card_number` VARCHAR(80),\n`date_valid_from` DATETIME,\n`date_valid_to` DATETIME,\n`other_card_details` VARCHAR(255)\n);", "CREATE TABLE `Financial_Transactions` (\n`transaction_id` INTEGER NOT NULL ,\n`previous_transaction_id` INTEGER,\n`account_id` INTEGER NOT NULL,\n`card_id` INTEGER NOT NULL,\n`transaction_type` VARCHAR(15) NOT NULL,\n`transaction_date` DATETIME,\n`transaction_amount` DOUBLE NULL,\n`transaction_comment` VARCHAR(255),\n`other_transaction_details` VARCHAR(255),\nFOREIGN KEY (`card_id` ) REFERENCES `Customers_Cards`(`card_id` ),\nFOREIGN KEY (`account_id` ) REFERENCES `Accounts`(`account_id` )\n);" ]
Show the first names and last names of customers without any account.
SELECT customer_first_name , customer_last_name FROM Customers EXCEPT SELECT T1.customer_first_name , T1.customer_last_name FROM Customers AS T1 JOIN Accounts AS T2 ON T1.customer_id = T2.customer_id
[ "SELECT", "customer_first_name", ",", "customer_last_name", "FROM", "Customers", "EXCEPT", "SELECT", "T1.customer_first_name", ",", "T1.customer_last_name", "FROM", "Customers", "AS", "T1", "JOIN", "Accounts", "AS", "T2", "ON", "T1.customer_id", "=", "T2.customer_id" ]
[ "select", "customer_first_name", ",", "customer_last_name", "from", "customers", "except", "select", "t1", ".", "customer_first_name", ",", "t1", ".", "customer_last_name", "from", "customers", "as", "t1", "join", "accounts", "as", "t2", "on", "t1", ".", "customer_id", "=", "t2", ".", "customer_id" ]
[ "Show", "the", "first", "names", "and", "last", "names", "of", "customers", "without", "any", "account", "." ]
customers_card_transactions
[ "CREATE TABLE `Accounts` (\n`account_id` INTEGER PRIMARY KEY,\n`customer_id` INTEGER NOT NULL,\n`account_name` VARCHAR(50),\n`other_account_details` VARCHAR(255)\n);", "CREATE TABLE `Customers` (\n`customer_id` INTEGER PRIMARY KEY,\n`customer_first_name` VARCHAR(20),\n`customer_last_name` VARCHAR(20),\n`customer_address` VARCHAR(255),\n`customer_phone` VARCHAR(255),\n`customer_email` VARCHAR(255),\n`other_customer_details` VARCHAR(255)\n);", "CREATE TABLE `Customers_Cards` (\n`card_id` INTEGER PRIMARY KEY,\n`customer_id` INTEGER NOT NULL,\n`card_type_code` VARCHAR(15) NOT NULL,\n`card_number` VARCHAR(80),\n`date_valid_from` DATETIME,\n`date_valid_to` DATETIME,\n`other_card_details` VARCHAR(255)\n);", "CREATE TABLE `Financial_Transactions` (\n`transaction_id` INTEGER NOT NULL ,\n`previous_transaction_id` INTEGER,\n`account_id` INTEGER NOT NULL,\n`card_id` INTEGER NOT NULL,\n`transaction_type` VARCHAR(15) NOT NULL,\n`transaction_date` DATETIME,\n`transaction_amount` DOUBLE NULL,\n`transaction_comment` VARCHAR(255),\n`other_transaction_details` VARCHAR(255),\nFOREIGN KEY (`card_id` ) REFERENCES `Customers_Cards`(`card_id` ),\nFOREIGN KEY (`account_id` ) REFERENCES `Accounts`(`account_id` )\n);" ]
What are the full names of customers who do not have any accounts?
SELECT customer_first_name , customer_last_name FROM Customers EXCEPT SELECT T1.customer_first_name , T1.customer_last_name FROM Customers AS T1 JOIN Accounts AS T2 ON T1.customer_id = T2.customer_id
[ "SELECT", "customer_first_name", ",", "customer_last_name", "FROM", "Customers", "EXCEPT", "SELECT", "T1.customer_first_name", ",", "T1.customer_last_name", "FROM", "Customers", "AS", "T1", "JOIN", "Accounts", "AS", "T2", "ON", "T1.customer_id", "=", "T2.customer_id" ]
[ "select", "customer_first_name", ",", "customer_last_name", "from", "customers", "except", "select", "t1", ".", "customer_first_name", ",", "t1", ".", "customer_last_name", "from", "customers", "as", "t1", "join", "accounts", "as", "t2", "on", "t1", ".", "customer_id", "=", "t2", ".", "customer_id" ]
[ "What", "are", "the", "full", "names", "of", "customers", "who", "do", "not", "have", "any", "accounts", "?" ]
customers_card_transactions
[ "CREATE TABLE `Accounts` (\n`account_id` INTEGER PRIMARY KEY,\n`customer_id` INTEGER NOT NULL,\n`account_name` VARCHAR(50),\n`other_account_details` VARCHAR(255)\n);", "CREATE TABLE `Customers` (\n`customer_id` INTEGER PRIMARY KEY,\n`customer_first_name` VARCHAR(20),\n`customer_last_name` VARCHAR(20),\n`customer_address` VARCHAR(255),\n`customer_phone` VARCHAR(255),\n`customer_email` VARCHAR(255),\n`other_customer_details` VARCHAR(255)\n);", "CREATE TABLE `Customers_Cards` (\n`card_id` INTEGER PRIMARY KEY,\n`customer_id` INTEGER NOT NULL,\n`card_type_code` VARCHAR(15) NOT NULL,\n`card_number` VARCHAR(80),\n`date_valid_from` DATETIME,\n`date_valid_to` DATETIME,\n`other_card_details` VARCHAR(255)\n);", "CREATE TABLE `Financial_Transactions` (\n`transaction_id` INTEGER NOT NULL ,\n`previous_transaction_id` INTEGER,\n`account_id` INTEGER NOT NULL,\n`card_id` INTEGER NOT NULL,\n`transaction_type` VARCHAR(15) NOT NULL,\n`transaction_date` DATETIME,\n`transaction_amount` DOUBLE NULL,\n`transaction_comment` VARCHAR(255),\n`other_transaction_details` VARCHAR(255),\nFOREIGN KEY (`card_id` ) REFERENCES `Customers_Cards`(`card_id` ),\nFOREIGN KEY (`account_id` ) REFERENCES `Accounts`(`account_id` )\n);" ]
Show distinct first and last names for all customers with an account.
SELECT DISTINCT T1.customer_first_name , T1.customer_last_name FROM Customers AS T1 JOIN Accounts AS T2 ON T1.customer_id = T2.customer_id
[ "SELECT", "DISTINCT", "T1.customer_first_name", ",", "T1.customer_last_name", "FROM", "Customers", "AS", "T1", "JOIN", "Accounts", "AS", "T2", "ON", "T1.customer_id", "=", "T2.customer_id" ]
[ "select", "distinct", "t1", ".", "customer_first_name", ",", "t1", ".", "customer_last_name", "from", "customers", "as", "t1", "join", "accounts", "as", "t2", "on", "t1", ".", "customer_id", "=", "t2", ".", "customer_id" ]
[ "Show", "distinct", "first", "and", "last", "names", "for", "all", "customers", "with", "an", "account", "." ]
customers_card_transactions
[ "CREATE TABLE `Accounts` (\n`account_id` INTEGER PRIMARY KEY,\n`customer_id` INTEGER NOT NULL,\n`account_name` VARCHAR(50),\n`other_account_details` VARCHAR(255)\n);", "CREATE TABLE `Customers` (\n`customer_id` INTEGER PRIMARY KEY,\n`customer_first_name` VARCHAR(20),\n`customer_last_name` VARCHAR(20),\n`customer_address` VARCHAR(255),\n`customer_phone` VARCHAR(255),\n`customer_email` VARCHAR(255),\n`other_customer_details` VARCHAR(255)\n);", "CREATE TABLE `Customers_Cards` (\n`card_id` INTEGER PRIMARY KEY,\n`customer_id` INTEGER NOT NULL,\n`card_type_code` VARCHAR(15) NOT NULL,\n`card_number` VARCHAR(80),\n`date_valid_from` DATETIME,\n`date_valid_to` DATETIME,\n`other_card_details` VARCHAR(255)\n);", "CREATE TABLE `Financial_Transactions` (\n`transaction_id` INTEGER NOT NULL ,\n`previous_transaction_id` INTEGER,\n`account_id` INTEGER NOT NULL,\n`card_id` INTEGER NOT NULL,\n`transaction_type` VARCHAR(15) NOT NULL,\n`transaction_date` DATETIME,\n`transaction_amount` DOUBLE NULL,\n`transaction_comment` VARCHAR(255),\n`other_transaction_details` VARCHAR(255),\nFOREIGN KEY (`card_id` ) REFERENCES `Customers_Cards`(`card_id` ),\nFOREIGN KEY (`account_id` ) REFERENCES `Accounts`(`account_id` )\n);" ]
What are the full names of customers who have accounts?
SELECT DISTINCT T1.customer_first_name , T1.customer_last_name FROM Customers AS T1 JOIN Accounts AS T2 ON T1.customer_id = T2.customer_id
[ "SELECT", "DISTINCT", "T1.customer_first_name", ",", "T1.customer_last_name", "FROM", "Customers", "AS", "T1", "JOIN", "Accounts", "AS", "T2", "ON", "T1.customer_id", "=", "T2.customer_id" ]
[ "select", "distinct", "t1", ".", "customer_first_name", ",", "t1", ".", "customer_last_name", "from", "customers", "as", "t1", "join", "accounts", "as", "t2", "on", "t1", ".", "customer_id", "=", "t2", ".", "customer_id" ]
[ "What", "are", "the", "full", "names", "of", "customers", "who", "have", "accounts", "?" ]
customers_card_transactions
[ "CREATE TABLE `Accounts` (\n`account_id` INTEGER PRIMARY KEY,\n`customer_id` INTEGER NOT NULL,\n`account_name` VARCHAR(50),\n`other_account_details` VARCHAR(255)\n);", "CREATE TABLE `Customers` (\n`customer_id` INTEGER PRIMARY KEY,\n`customer_first_name` VARCHAR(20),\n`customer_last_name` VARCHAR(20),\n`customer_address` VARCHAR(255),\n`customer_phone` VARCHAR(255),\n`customer_email` VARCHAR(255),\n`other_customer_details` VARCHAR(255)\n);", "CREATE TABLE `Customers_Cards` (\n`card_id` INTEGER PRIMARY KEY,\n`customer_id` INTEGER NOT NULL,\n`card_type_code` VARCHAR(15) NOT NULL,\n`card_number` VARCHAR(80),\n`date_valid_from` DATETIME,\n`date_valid_to` DATETIME,\n`other_card_details` VARCHAR(255)\n);", "CREATE TABLE `Financial_Transactions` (\n`transaction_id` INTEGER NOT NULL ,\n`previous_transaction_id` INTEGER,\n`account_id` INTEGER NOT NULL,\n`card_id` INTEGER NOT NULL,\n`transaction_type` VARCHAR(15) NOT NULL,\n`transaction_date` DATETIME,\n`transaction_amount` DOUBLE NULL,\n`transaction_comment` VARCHAR(255),\n`other_transaction_details` VARCHAR(255),\nFOREIGN KEY (`card_id` ) REFERENCES `Customers_Cards`(`card_id` ),\nFOREIGN KEY (`account_id` ) REFERENCES `Accounts`(`account_id` )\n);" ]
How many customers have an account?
SELECT count(DISTINCT customer_id) FROM Accounts
[ "SELECT", "count", "(", "DISTINCT", "customer_id", ")", "FROM", "Accounts" ]
[ "select", "count", "(", "distinct", "customer_id", ")", "from", "accounts" ]
[ "How", "many", "customers", "have", "an", "account", "?" ]
customers_card_transactions
[ "CREATE TABLE `Accounts` (\n`account_id` INTEGER PRIMARY KEY,\n`customer_id` INTEGER NOT NULL,\n`account_name` VARCHAR(50),\n`other_account_details` VARCHAR(255)\n);", "CREATE TABLE `Customers` (\n`customer_id` INTEGER PRIMARY KEY,\n`customer_first_name` VARCHAR(20),\n`customer_last_name` VARCHAR(20),\n`customer_address` VARCHAR(255),\n`customer_phone` VARCHAR(255),\n`customer_email` VARCHAR(255),\n`other_customer_details` VARCHAR(255)\n);", "CREATE TABLE `Customers_Cards` (\n`card_id` INTEGER PRIMARY KEY,\n`customer_id` INTEGER NOT NULL,\n`card_type_code` VARCHAR(15) NOT NULL,\n`card_number` VARCHAR(80),\n`date_valid_from` DATETIME,\n`date_valid_to` DATETIME,\n`other_card_details` VARCHAR(255)\n);", "CREATE TABLE `Financial_Transactions` (\n`transaction_id` INTEGER NOT NULL ,\n`previous_transaction_id` INTEGER,\n`account_id` INTEGER NOT NULL,\n`card_id` INTEGER NOT NULL,\n`transaction_type` VARCHAR(15) NOT NULL,\n`transaction_date` DATETIME,\n`transaction_amount` DOUBLE NULL,\n`transaction_comment` VARCHAR(255),\n`other_transaction_details` VARCHAR(255),\nFOREIGN KEY (`card_id` ) REFERENCES `Customers_Cards`(`card_id` ),\nFOREIGN KEY (`account_id` ) REFERENCES `Accounts`(`account_id` )\n);" ]
Count the number of customers who hold an account.
SELECT count(DISTINCT customer_id) FROM Accounts
[ "SELECT", "count", "(", "DISTINCT", "customer_id", ")", "FROM", "Accounts" ]
[ "select", "count", "(", "distinct", "customer_id", ")", "from", "accounts" ]
[ "Count", "the", "number", "of", "customers", "who", "hold", "an", "account", "." ]
customers_card_transactions
[ "CREATE TABLE `Accounts` (\n`account_id` INTEGER PRIMARY KEY,\n`customer_id` INTEGER NOT NULL,\n`account_name` VARCHAR(50),\n`other_account_details` VARCHAR(255)\n);", "CREATE TABLE `Customers` (\n`customer_id` INTEGER PRIMARY KEY,\n`customer_first_name` VARCHAR(20),\n`customer_last_name` VARCHAR(20),\n`customer_address` VARCHAR(255),\n`customer_phone` VARCHAR(255),\n`customer_email` VARCHAR(255),\n`other_customer_details` VARCHAR(255)\n);", "CREATE TABLE `Customers_Cards` (\n`card_id` INTEGER PRIMARY KEY,\n`customer_id` INTEGER NOT NULL,\n`card_type_code` VARCHAR(15) NOT NULL,\n`card_number` VARCHAR(80),\n`date_valid_from` DATETIME,\n`date_valid_to` DATETIME,\n`other_card_details` VARCHAR(255)\n);", "CREATE TABLE `Financial_Transactions` (\n`transaction_id` INTEGER NOT NULL ,\n`previous_transaction_id` INTEGER,\n`account_id` INTEGER NOT NULL,\n`card_id` INTEGER NOT NULL,\n`transaction_type` VARCHAR(15) NOT NULL,\n`transaction_date` DATETIME,\n`transaction_amount` DOUBLE NULL,\n`transaction_comment` VARCHAR(255),\n`other_transaction_details` VARCHAR(255),\nFOREIGN KEY (`card_id` ) REFERENCES `Customers_Cards`(`card_id` ),\nFOREIGN KEY (`account_id` ) REFERENCES `Accounts`(`account_id` )\n);" ]
How many customers do we have?
SELECT count(*) FROM Customers
[ "SELECT", "count", "(", "*", ")", "FROM", "Customers" ]
[ "select", "count", "(", "*", ")", "from", "customers" ]
[ "How", "many", "customers", "do", "we", "have", "?" ]
customers_card_transactions
[ "CREATE TABLE `Accounts` (\n`account_id` INTEGER PRIMARY KEY,\n`customer_id` INTEGER NOT NULL,\n`account_name` VARCHAR(50),\n`other_account_details` VARCHAR(255)\n);", "CREATE TABLE `Customers` (\n`customer_id` INTEGER PRIMARY KEY,\n`customer_first_name` VARCHAR(20),\n`customer_last_name` VARCHAR(20),\n`customer_address` VARCHAR(255),\n`customer_phone` VARCHAR(255),\n`customer_email` VARCHAR(255),\n`other_customer_details` VARCHAR(255)\n);", "CREATE TABLE `Customers_Cards` (\n`card_id` INTEGER PRIMARY KEY,\n`customer_id` INTEGER NOT NULL,\n`card_type_code` VARCHAR(15) NOT NULL,\n`card_number` VARCHAR(80),\n`date_valid_from` DATETIME,\n`date_valid_to` DATETIME,\n`other_card_details` VARCHAR(255)\n);", "CREATE TABLE `Financial_Transactions` (\n`transaction_id` INTEGER NOT NULL ,\n`previous_transaction_id` INTEGER,\n`account_id` INTEGER NOT NULL,\n`card_id` INTEGER NOT NULL,\n`transaction_type` VARCHAR(15) NOT NULL,\n`transaction_date` DATETIME,\n`transaction_amount` DOUBLE NULL,\n`transaction_comment` VARCHAR(255),\n`other_transaction_details` VARCHAR(255),\nFOREIGN KEY (`card_id` ) REFERENCES `Customers_Cards`(`card_id` ),\nFOREIGN KEY (`account_id` ) REFERENCES `Accounts`(`account_id` )\n);" ]
Count the number of customers.
SELECT count(*) FROM Customers
[ "SELECT", "count", "(", "*", ")", "FROM", "Customers" ]
[ "select", "count", "(", "*", ")", "from", "customers" ]
[ "Count", "the", "number", "of", "customers", "." ]
customers_card_transactions
[ "CREATE TABLE `Accounts` (\n`account_id` INTEGER PRIMARY KEY,\n`customer_id` INTEGER NOT NULL,\n`account_name` VARCHAR(50),\n`other_account_details` VARCHAR(255)\n);", "CREATE TABLE `Customers` (\n`customer_id` INTEGER PRIMARY KEY,\n`customer_first_name` VARCHAR(20),\n`customer_last_name` VARCHAR(20),\n`customer_address` VARCHAR(255),\n`customer_phone` VARCHAR(255),\n`customer_email` VARCHAR(255),\n`other_customer_details` VARCHAR(255)\n);", "CREATE TABLE `Customers_Cards` (\n`card_id` INTEGER PRIMARY KEY,\n`customer_id` INTEGER NOT NULL,\n`card_type_code` VARCHAR(15) NOT NULL,\n`card_number` VARCHAR(80),\n`date_valid_from` DATETIME,\n`date_valid_to` DATETIME,\n`other_card_details` VARCHAR(255)\n);", "CREATE TABLE `Financial_Transactions` (\n`transaction_id` INTEGER NOT NULL ,\n`previous_transaction_id` INTEGER,\n`account_id` INTEGER NOT NULL,\n`card_id` INTEGER NOT NULL,\n`transaction_type` VARCHAR(15) NOT NULL,\n`transaction_date` DATETIME,\n`transaction_amount` DOUBLE NULL,\n`transaction_comment` VARCHAR(255),\n`other_transaction_details` VARCHAR(255),\nFOREIGN KEY (`card_id` ) REFERENCES `Customers_Cards`(`card_id` ),\nFOREIGN KEY (`account_id` ) REFERENCES `Accounts`(`account_id` )\n);" ]
Show ids, first names, last names, and phones for all customers.
SELECT customer_id , customer_first_name , customer_last_name , customer_phone FROM Customers
[ "SELECT", "customer_id", ",", "customer_first_name", ",", "customer_last_name", ",", "customer_phone", "FROM", "Customers" ]
[ "select", "customer_id", ",", "customer_first_name", ",", "customer_last_name", ",", "customer_phone", "from", "customers" ]
[ "Show", "ids", ",", "first", "names", ",", "last", "names", ",", "and", "phones", "for", "all", "customers", "." ]
customers_card_transactions
[ "CREATE TABLE `Accounts` (\n`account_id` INTEGER PRIMARY KEY,\n`customer_id` INTEGER NOT NULL,\n`account_name` VARCHAR(50),\n`other_account_details` VARCHAR(255)\n);", "CREATE TABLE `Customers` (\n`customer_id` INTEGER PRIMARY KEY,\n`customer_first_name` VARCHAR(20),\n`customer_last_name` VARCHAR(20),\n`customer_address` VARCHAR(255),\n`customer_phone` VARCHAR(255),\n`customer_email` VARCHAR(255),\n`other_customer_details` VARCHAR(255)\n);", "CREATE TABLE `Customers_Cards` (\n`card_id` INTEGER PRIMARY KEY,\n`customer_id` INTEGER NOT NULL,\n`card_type_code` VARCHAR(15) NOT NULL,\n`card_number` VARCHAR(80),\n`date_valid_from` DATETIME,\n`date_valid_to` DATETIME,\n`other_card_details` VARCHAR(255)\n);", "CREATE TABLE `Financial_Transactions` (\n`transaction_id` INTEGER NOT NULL ,\n`previous_transaction_id` INTEGER,\n`account_id` INTEGER NOT NULL,\n`card_id` INTEGER NOT NULL,\n`transaction_type` VARCHAR(15) NOT NULL,\n`transaction_date` DATETIME,\n`transaction_amount` DOUBLE NULL,\n`transaction_comment` VARCHAR(255),\n`other_transaction_details` VARCHAR(255),\nFOREIGN KEY (`card_id` ) REFERENCES `Customers_Cards`(`card_id` ),\nFOREIGN KEY (`account_id` ) REFERENCES `Accounts`(`account_id` )\n);" ]
What are the ids, full names, and phones of each customer?
SELECT customer_id , customer_first_name , customer_last_name , customer_phone FROM Customers
[ "SELECT", "customer_id", ",", "customer_first_name", ",", "customer_last_name", ",", "customer_phone", "FROM", "Customers" ]
[ "select", "customer_id", ",", "customer_first_name", ",", "customer_last_name", ",", "customer_phone", "from", "customers" ]
[ "What", "are", "the", "ids", ",", "full", "names", ",", "and", "phones", "of", "each", "customer", "?" ]
customers_card_transactions
[ "CREATE TABLE `Accounts` (\n`account_id` INTEGER PRIMARY KEY,\n`customer_id` INTEGER NOT NULL,\n`account_name` VARCHAR(50),\n`other_account_details` VARCHAR(255)\n);", "CREATE TABLE `Customers` (\n`customer_id` INTEGER PRIMARY KEY,\n`customer_first_name` VARCHAR(20),\n`customer_last_name` VARCHAR(20),\n`customer_address` VARCHAR(255),\n`customer_phone` VARCHAR(255),\n`customer_email` VARCHAR(255),\n`other_customer_details` VARCHAR(255)\n);", "CREATE TABLE `Customers_Cards` (\n`card_id` INTEGER PRIMARY KEY,\n`customer_id` INTEGER NOT NULL,\n`card_type_code` VARCHAR(15) NOT NULL,\n`card_number` VARCHAR(80),\n`date_valid_from` DATETIME,\n`date_valid_to` DATETIME,\n`other_card_details` VARCHAR(255)\n);", "CREATE TABLE `Financial_Transactions` (\n`transaction_id` INTEGER NOT NULL ,\n`previous_transaction_id` INTEGER,\n`account_id` INTEGER NOT NULL,\n`card_id` INTEGER NOT NULL,\n`transaction_type` VARCHAR(15) NOT NULL,\n`transaction_date` DATETIME,\n`transaction_amount` DOUBLE NULL,\n`transaction_comment` VARCHAR(255),\n`other_transaction_details` VARCHAR(255),\nFOREIGN KEY (`card_id` ) REFERENCES `Customers_Cards`(`card_id` ),\nFOREIGN KEY (`account_id` ) REFERENCES `Accounts`(`account_id` )\n);" ]
What is the phone and email for customer with first name Aniyah and last name Feest?
SELECT customer_phone , customer_email FROM Customers WHERE customer_first_name = "Aniyah" AND customer_last_name = "Feest"
[ "SELECT", "customer_phone", ",", "customer_email", "FROM", "Customers", "WHERE", "customer_first_name", "=", "``", "Aniyah", "''", "AND", "customer_last_name", "=", "``", "Feest", "''" ]
[ "select", "customer_phone", ",", "customer_email", "from", "customers", "where", "customer_first_name", "=", "value", "and", "customer_last_name", "=", "value" ]
[ "What", "is", "the", "phone", "and", "email", "for", "customer", "with", "first", "name", "Aniyah", "and", "last", "name", "Feest", "?" ]
customers_card_transactions
[ "CREATE TABLE `Accounts` (\n`account_id` INTEGER PRIMARY KEY,\n`customer_id` INTEGER NOT NULL,\n`account_name` VARCHAR(50),\n`other_account_details` VARCHAR(255)\n);", "CREATE TABLE `Customers` (\n`customer_id` INTEGER PRIMARY KEY,\n`customer_first_name` VARCHAR(20),\n`customer_last_name` VARCHAR(20),\n`customer_address` VARCHAR(255),\n`customer_phone` VARCHAR(255),\n`customer_email` VARCHAR(255),\n`other_customer_details` VARCHAR(255)\n);", "CREATE TABLE `Customers_Cards` (\n`card_id` INTEGER PRIMARY KEY,\n`customer_id` INTEGER NOT NULL,\n`card_type_code` VARCHAR(15) NOT NULL,\n`card_number` VARCHAR(80),\n`date_valid_from` DATETIME,\n`date_valid_to` DATETIME,\n`other_card_details` VARCHAR(255)\n);", "CREATE TABLE `Financial_Transactions` (\n`transaction_id` INTEGER NOT NULL ,\n`previous_transaction_id` INTEGER,\n`account_id` INTEGER NOT NULL,\n`card_id` INTEGER NOT NULL,\n`transaction_type` VARCHAR(15) NOT NULL,\n`transaction_date` DATETIME,\n`transaction_amount` DOUBLE NULL,\n`transaction_comment` VARCHAR(255),\n`other_transaction_details` VARCHAR(255),\nFOREIGN KEY (`card_id` ) REFERENCES `Customers_Cards`(`card_id` ),\nFOREIGN KEY (`account_id` ) REFERENCES `Accounts`(`account_id` )\n);" ]
Return the phone and email of the customer with the first name Aniyah and last name Feest.
SELECT customer_phone , customer_email FROM Customers WHERE customer_first_name = "Aniyah" AND customer_last_name = "Feest"
[ "SELECT", "customer_phone", ",", "customer_email", "FROM", "Customers", "WHERE", "customer_first_name", "=", "``", "Aniyah", "''", "AND", "customer_last_name", "=", "``", "Feest", "''" ]
[ "select", "customer_phone", ",", "customer_email", "from", "customers", "where", "customer_first_name", "=", "value", "and", "customer_last_name", "=", "value" ]
[ "Return", "the", "phone", "and", "email", "of", "the", "customer", "with", "the", "first", "name", "Aniyah", "and", "last", "name", "Feest", "." ]
customers_card_transactions
[ "CREATE TABLE `Accounts` (\n`account_id` INTEGER PRIMARY KEY,\n`customer_id` INTEGER NOT NULL,\n`account_name` VARCHAR(50),\n`other_account_details` VARCHAR(255)\n);", "CREATE TABLE `Customers` (\n`customer_id` INTEGER PRIMARY KEY,\n`customer_first_name` VARCHAR(20),\n`customer_last_name` VARCHAR(20),\n`customer_address` VARCHAR(255),\n`customer_phone` VARCHAR(255),\n`customer_email` VARCHAR(255),\n`other_customer_details` VARCHAR(255)\n);", "CREATE TABLE `Customers_Cards` (\n`card_id` INTEGER PRIMARY KEY,\n`customer_id` INTEGER NOT NULL,\n`card_type_code` VARCHAR(15) NOT NULL,\n`card_number` VARCHAR(80),\n`date_valid_from` DATETIME,\n`date_valid_to` DATETIME,\n`other_card_details` VARCHAR(255)\n);", "CREATE TABLE `Financial_Transactions` (\n`transaction_id` INTEGER NOT NULL ,\n`previous_transaction_id` INTEGER,\n`account_id` INTEGER NOT NULL,\n`card_id` INTEGER NOT NULL,\n`transaction_type` VARCHAR(15) NOT NULL,\n`transaction_date` DATETIME,\n`transaction_amount` DOUBLE NULL,\n`transaction_comment` VARCHAR(255),\n`other_transaction_details` VARCHAR(255),\nFOREIGN KEY (`card_id` ) REFERENCES `Customers_Cards`(`card_id` ),\nFOREIGN KEY (`account_id` ) REFERENCES `Accounts`(`account_id` )\n);" ]
Show the number of customer cards.
SELECT count(*) FROM Customers_cards
[ "SELECT", "count", "(", "*", ")", "FROM", "Customers_cards" ]
[ "select", "count", "(", "*", ")", "from", "customers_cards" ]
[ "Show", "the", "number", "of", "customer", "cards", "." ]
customers_card_transactions
[ "CREATE TABLE `Accounts` (\n`account_id` INTEGER PRIMARY KEY,\n`customer_id` INTEGER NOT NULL,\n`account_name` VARCHAR(50),\n`other_account_details` VARCHAR(255)\n);", "CREATE TABLE `Customers` (\n`customer_id` INTEGER PRIMARY KEY,\n`customer_first_name` VARCHAR(20),\n`customer_last_name` VARCHAR(20),\n`customer_address` VARCHAR(255),\n`customer_phone` VARCHAR(255),\n`customer_email` VARCHAR(255),\n`other_customer_details` VARCHAR(255)\n);", "CREATE TABLE `Customers_Cards` (\n`card_id` INTEGER PRIMARY KEY,\n`customer_id` INTEGER NOT NULL,\n`card_type_code` VARCHAR(15) NOT NULL,\n`card_number` VARCHAR(80),\n`date_valid_from` DATETIME,\n`date_valid_to` DATETIME,\n`other_card_details` VARCHAR(255)\n);", "CREATE TABLE `Financial_Transactions` (\n`transaction_id` INTEGER NOT NULL ,\n`previous_transaction_id` INTEGER,\n`account_id` INTEGER NOT NULL,\n`card_id` INTEGER NOT NULL,\n`transaction_type` VARCHAR(15) NOT NULL,\n`transaction_date` DATETIME,\n`transaction_amount` DOUBLE NULL,\n`transaction_comment` VARCHAR(255),\n`other_transaction_details` VARCHAR(255),\nFOREIGN KEY (`card_id` ) REFERENCES `Customers_Cards`(`card_id` ),\nFOREIGN KEY (`account_id` ) REFERENCES `Accounts`(`account_id` )\n);" ]
How many customer cards are there?
SELECT count(*) FROM Customers_cards
[ "SELECT", "count", "(", "*", ")", "FROM", "Customers_cards" ]
[ "select", "count", "(", "*", ")", "from", "customers_cards" ]
[ "How", "many", "customer", "cards", "are", "there", "?" ]
customers_card_transactions
[ "CREATE TABLE `Accounts` (\n`account_id` INTEGER PRIMARY KEY,\n`customer_id` INTEGER NOT NULL,\n`account_name` VARCHAR(50),\n`other_account_details` VARCHAR(255)\n);", "CREATE TABLE `Customers` (\n`customer_id` INTEGER PRIMARY KEY,\n`customer_first_name` VARCHAR(20),\n`customer_last_name` VARCHAR(20),\n`customer_address` VARCHAR(255),\n`customer_phone` VARCHAR(255),\n`customer_email` VARCHAR(255),\n`other_customer_details` VARCHAR(255)\n);", "CREATE TABLE `Customers_Cards` (\n`card_id` INTEGER PRIMARY KEY,\n`customer_id` INTEGER NOT NULL,\n`card_type_code` VARCHAR(15) NOT NULL,\n`card_number` VARCHAR(80),\n`date_valid_from` DATETIME,\n`date_valid_to` DATETIME,\n`other_card_details` VARCHAR(255)\n);", "CREATE TABLE `Financial_Transactions` (\n`transaction_id` INTEGER NOT NULL ,\n`previous_transaction_id` INTEGER,\n`account_id` INTEGER NOT NULL,\n`card_id` INTEGER NOT NULL,\n`transaction_type` VARCHAR(15) NOT NULL,\n`transaction_date` DATETIME,\n`transaction_amount` DOUBLE NULL,\n`transaction_comment` VARCHAR(255),\n`other_transaction_details` VARCHAR(255),\nFOREIGN KEY (`card_id` ) REFERENCES `Customers_Cards`(`card_id` ),\nFOREIGN KEY (`account_id` ) REFERENCES `Accounts`(`account_id` )\n);" ]
Show ids, customer ids, card type codes, card numbers for all cards.
SELECT card_id , customer_id , card_type_code , card_number FROM Customers_cards
[ "SELECT", "card_id", ",", "customer_id", ",", "card_type_code", ",", "card_number", "FROM", "Customers_cards" ]
[ "select", "card_id", ",", "customer_id", ",", "card_type_code", ",", "card_number", "from", "customers_cards" ]
[ "Show", "ids", ",", "customer", "ids", ",", "card", "type", "codes", ",", "card", "numbers", "for", "all", "cards", "." ]