messages
listlengths
3
3
system
stringclasses
1 value
user
stringlengths
326
8.38k
assistant
stringlengths
18
577
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE artists\n(\n id INTEGER PRIMARY KEY AUTOINCRE...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE artists ( id INTEGER PRIMARY KEY AUTOINCREMENT, name VARCHAR(120) ) CREATE TABLE sqlite_sequence(name,seq) CREATE TABLE albums ( id INTEGER PRIMARY KEY AUTOINCREMENT, title VARCHAR(160) NOT NULL, artist_id INTEGER NOT NULL, FOREIGN KEY (artist_id) REFERENCES ...
SELECT first_name , last_name FROM employees ORDER BY birth_date DESC LIMIT 1;
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE artists\n(\n id INTEGER PRIMARY KEY AUTOINCRE...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE artists ( id INTEGER PRIMARY KEY AUTOINCREMENT, name VARCHAR(120) ) CREATE TABLE sqlite_sequence(name,seq) CREATE TABLE albums ( id INTEGER PRIMARY KEY AUTOINCREMENT, title VARCHAR(160) NOT NULL, artist_id INTEGER NOT NULL, FOREIGN KEY (artist_id) REFERENCES ...
SELECT first_name , last_name FROM employees ORDER BY hire_date ASC LIMIT 10;
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE artists\n(\n id INTEGER PRIMARY KEY AUTOINCRE...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE artists ( id INTEGER PRIMARY KEY AUTOINCREMENT, name VARCHAR(120) ) CREATE TABLE sqlite_sequence(name,seq) CREATE TABLE albums ( id INTEGER PRIMARY KEY AUTOINCREMENT, title VARCHAR(160) NOT NULL, artist_id INTEGER NOT NULL, FOREIGN KEY (artist_id) REFERENCES ...
SELECT first_name , last_name FROM employees ORDER BY hire_date ASC LIMIT 10;
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE artists\n(\n id INTEGER PRIMARY KEY AUTOINCRE...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE artists ( id INTEGER PRIMARY KEY AUTOINCREMENT, name VARCHAR(120) ) CREATE TABLE sqlite_sequence(name,seq) CREATE TABLE albums ( id INTEGER PRIMARY KEY AUTOINCREMENT, title VARCHAR(160) NOT NULL, artist_id INTEGER NOT NULL, FOREIGN KEY (artist_id) REFERENCES ...
SELECT count(*) , city FROM employees WHERE title = 'IT Staff' GROUP BY city
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE artists\n(\n id INTEGER PRIMARY KEY AUTOINCRE...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE artists ( id INTEGER PRIMARY KEY AUTOINCREMENT, name VARCHAR(120) ) CREATE TABLE sqlite_sequence(name,seq) CREATE TABLE albums ( id INTEGER PRIMARY KEY AUTOINCREMENT, title VARCHAR(160) NOT NULL, artist_id INTEGER NOT NULL, FOREIGN KEY (artist_id) REFERENCES ...
SELECT count(*) , city FROM employees WHERE title = 'IT Staff' GROUP BY city
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE artists\n(\n id INTEGER PRIMARY KEY AUTOINCRE...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE artists ( id INTEGER PRIMARY KEY AUTOINCREMENT, name VARCHAR(120) ) CREATE TABLE sqlite_sequence(name,seq) CREATE TABLE albums ( id INTEGER PRIMARY KEY AUTOINCREMENT, title VARCHAR(160) NOT NULL, artist_id INTEGER NOT NULL, FOREIGN KEY (artist_id) REFERENCES ...
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;
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE artists\n(\n id INTEGER PRIMARY KEY AUTOINCRE...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE artists ( id INTEGER PRIMARY KEY AUTOINCREMENT, name VARCHAR(120) ) CREATE TABLE sqlite_sequence(name,seq) CREATE TABLE albums ( id INTEGER PRIMARY KEY AUTOINCREMENT, title VARCHAR(160) NOT NULL, artist_id INTEGER NOT NULL, FOREIGN KEY (artist_id) REFERENCES ...
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;
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE artists\n(\n id INTEGER PRIMARY KEY AUTOINCRE...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE artists ( id INTEGER PRIMARY KEY AUTOINCREMENT, name VARCHAR(120) ) CREATE TABLE sqlite_sequence(name,seq) CREATE TABLE albums ( id INTEGER PRIMARY KEY AUTOINCREMENT, title VARCHAR(160) NOT NULL, artist_id INTEGER NOT NULL, FOREIGN KEY (artist_id) REFERENCES ...
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";
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE artists\n(\n id INTEGER PRIMARY KEY AUTOINCRE...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE artists ( id INTEGER PRIMARY KEY AUTOINCREMENT, name VARCHAR(120) ) CREATE TABLE sqlite_sequence(name,seq) CREATE TABLE albums ( id INTEGER PRIMARY KEY AUTOINCREMENT, title VARCHAR(160) NOT NULL, artist_id INTEGER NOT NULL, FOREIGN KEY (artist_id) REFERENCES ...
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";
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE artists\n(\n id INTEGER PRIMARY KEY AUTOINCRE...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE artists ( id INTEGER PRIMARY KEY AUTOINCREMENT, name VARCHAR(120) ) CREATE TABLE sqlite_sequence(name,seq) CREATE TABLE albums ( id INTEGER PRIMARY KEY AUTOINCREMENT, title VARCHAR(160) NOT NULL, artist_id INTEGER NOT NULL, FOREIGN KEY (artist_id) REFERENCES ...
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";
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE artists\n(\n id INTEGER PRIMARY KEY AUTOINCRE...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE artists ( id INTEGER PRIMARY KEY AUTOINCREMENT, name VARCHAR(120) ) CREATE TABLE sqlite_sequence(name,seq) CREATE TABLE albums ( id INTEGER PRIMARY KEY AUTOINCREMENT, title VARCHAR(160) NOT NULL, artist_id INTEGER NOT NULL, FOREIGN KEY (artist_id) REFERENCES ...
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";
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE artists\n(\n id INTEGER PRIMARY KEY AUTOINCRE...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE artists ( id INTEGER PRIMARY KEY AUTOINCREMENT, name VARCHAR(120) ) CREATE TABLE sqlite_sequence(name,seq) CREATE TABLE albums ( id INTEGER PRIMARY KEY AUTOINCREMENT, title VARCHAR(160) NOT NULL, artist_id INTEGER NOT NULL, FOREIGN KEY (artist_id) REFERENCES ...
SELECT name FROM media_types;
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE artists\n(\n id INTEGER PRIMARY KEY AUTOINCRE...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE artists ( id INTEGER PRIMARY KEY AUTOINCREMENT, name VARCHAR(120) ) CREATE TABLE sqlite_sequence(name,seq) CREATE TABLE albums ( id INTEGER PRIMARY KEY AUTOINCREMENT, title VARCHAR(160) NOT NULL, artist_id INTEGER NOT NULL, FOREIGN KEY (artist_id) REFERENCES ...
SELECT name FROM media_types;
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE artists\n(\n id INTEGER PRIMARY KEY AUTOINCRE...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE artists ( id INTEGER PRIMARY KEY AUTOINCREMENT, name VARCHAR(120) ) CREATE TABLE sqlite_sequence(name,seq) CREATE TABLE albums ( id INTEGER PRIMARY KEY AUTOINCREMENT, title VARCHAR(160) NOT NULL, artist_id INTEGER NOT NULL, FOREIGN KEY (artist_id) REFERENCES ...
SELECT DISTINCT name FROM genres;
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE artists\n(\n id INTEGER PRIMARY KEY AUTOINCRE...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE artists ( id INTEGER PRIMARY KEY AUTOINCREMENT, name VARCHAR(120) ) CREATE TABLE sqlite_sequence(name,seq) CREATE TABLE albums ( id INTEGER PRIMARY KEY AUTOINCREMENT, title VARCHAR(160) NOT NULL, artist_id INTEGER NOT NULL, FOREIGN KEY (artist_id) REFERENCES ...
SELECT DISTINCT name FROM genres;
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE artists\n(\n id INTEGER PRIMARY KEY AUTOINCRE...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE artists ( id INTEGER PRIMARY KEY AUTOINCREMENT, name VARCHAR(120) ) CREATE TABLE sqlite_sequence(name,seq) CREATE TABLE albums ( id INTEGER PRIMARY KEY AUTOINCREMENT, title VARCHAR(160) NOT NULL, artist_id INTEGER NOT NULL, FOREIGN KEY (artist_id) REFERENCES ...
SELECT name FROM playlists;
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE artists\n(\n id INTEGER PRIMARY KEY AUTOINCRE...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE artists ( id INTEGER PRIMARY KEY AUTOINCREMENT, name VARCHAR(120) ) CREATE TABLE sqlite_sequence(name,seq) CREATE TABLE albums ( id INTEGER PRIMARY KEY AUTOINCREMENT, title VARCHAR(160) NOT NULL, artist_id INTEGER NOT NULL, FOREIGN KEY (artist_id) REFERENCES ...
SELECT name FROM playlists;
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE artists\n(\n id INTEGER PRIMARY KEY AUTOINCRE...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE artists ( id INTEGER PRIMARY KEY AUTOINCREMENT, name VARCHAR(120) ) CREATE TABLE sqlite_sequence(name,seq) CREATE TABLE albums ( id INTEGER PRIMARY KEY AUTOINCREMENT, title VARCHAR(160) NOT NULL, artist_id INTEGER NOT NULL, FOREIGN KEY (artist_id) REFERENCES ...
SELECT composer FROM tracks WHERE name = "Fast As a Shark";
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE artists\n(\n id INTEGER PRIMARY KEY AUTOINCRE...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE artists ( id INTEGER PRIMARY KEY AUTOINCREMENT, name VARCHAR(120) ) CREATE TABLE sqlite_sequence(name,seq) CREATE TABLE albums ( id INTEGER PRIMARY KEY AUTOINCREMENT, title VARCHAR(160) NOT NULL, artist_id INTEGER NOT NULL, FOREIGN KEY (artist_id) REFERENCES ...
SELECT composer FROM tracks WHERE name = "Fast As a Shark";
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE artists\n(\n id INTEGER PRIMARY KEY AUTOINCRE...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE artists ( id INTEGER PRIMARY KEY AUTOINCREMENT, name VARCHAR(120) ) CREATE TABLE sqlite_sequence(name,seq) CREATE TABLE albums ( id INTEGER PRIMARY KEY AUTOINCREMENT, title VARCHAR(160) NOT NULL, artist_id INTEGER NOT NULL, FOREIGN KEY (artist_id) REFERENCES ...
SELECT milliseconds FROM tracks WHERE name = "Fast As a Shark";
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE artists\n(\n id INTEGER PRIMARY KEY AUTOINCRE...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE artists ( id INTEGER PRIMARY KEY AUTOINCREMENT, name VARCHAR(120) ) CREATE TABLE sqlite_sequence(name,seq) CREATE TABLE albums ( id INTEGER PRIMARY KEY AUTOINCREMENT, title VARCHAR(160) NOT NULL, artist_id INTEGER NOT NULL, FOREIGN KEY (artist_id) REFERENCES ...
SELECT milliseconds FROM tracks WHERE name = "Fast As a Shark";
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE artists\n(\n id INTEGER PRIMARY KEY AUTOINCRE...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE artists ( id INTEGER PRIMARY KEY AUTOINCREMENT, name VARCHAR(120) ) CREATE TABLE sqlite_sequence(name,seq) CREATE TABLE albums ( id INTEGER PRIMARY KEY AUTOINCREMENT, title VARCHAR(160) NOT NULL, artist_id INTEGER NOT NULL, FOREIGN KEY (artist_id) REFERENCES ...
SELECT T2.name FROM genres AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id WHERE T1.name = "Rock";
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE artists\n(\n id INTEGER PRIMARY KEY AUTOINCRE...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE artists ( id INTEGER PRIMARY KEY AUTOINCREMENT, name VARCHAR(120) ) CREATE TABLE sqlite_sequence(name,seq) CREATE TABLE albums ( id INTEGER PRIMARY KEY AUTOINCREMENT, title VARCHAR(160) NOT NULL, artist_id INTEGER NOT NULL, FOREIGN KEY (artist_id) REFERENCES ...
SELECT T2.name FROM genres AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id WHERE T1.name = "Rock";
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE artists\n(\n id INTEGER PRIMARY KEY AUTOINCRE...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE artists ( id INTEGER PRIMARY KEY AUTOINCREMENT, name VARCHAR(120) ) CREATE TABLE sqlite_sequence(name,seq) CREATE TABLE albums ( id INTEGER PRIMARY KEY AUTOINCREMENT, title VARCHAR(160) NOT NULL, artist_id INTEGER NOT NULL, FOREIGN KEY (artist_id) REFERENCES ...
SELECT T1.title FROM albums AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id WHERE T2.name = "Balls to the Wall";
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE artists\n(\n id INTEGER PRIMARY KEY AUTOINCRE...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE artists ( id INTEGER PRIMARY KEY AUTOINCREMENT, name VARCHAR(120) ) CREATE TABLE sqlite_sequence(name,seq) CREATE TABLE albums ( id INTEGER PRIMARY KEY AUTOINCREMENT, title VARCHAR(160) NOT NULL, artist_id INTEGER NOT NULL, FOREIGN KEY (artist_id) REFERENCES ...
SELECT T1.title FROM albums AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id WHERE T2.name = "Balls to the Wall";
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE artists\n(\n id INTEGER PRIMARY KEY AUTOINCRE...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE artists ( id INTEGER PRIMARY KEY AUTOINCREMENT, name VARCHAR(120) ) CREATE TABLE sqlite_sequence(name,seq) CREATE TABLE albums ( id INTEGER PRIMARY KEY AUTOINCREMENT, title VARCHAR(160) NOT NULL, artist_id INTEGER NOT NULL, FOREIGN KEY (artist_id) REFERENCES ...
SELECT T2.name FROM albums AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id WHERE T1.title = "Balls to the Wall";
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE artists\n(\n id INTEGER PRIMARY KEY AUTOINCRE...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE artists ( id INTEGER PRIMARY KEY AUTOINCREMENT, name VARCHAR(120) ) CREATE TABLE sqlite_sequence(name,seq) CREATE TABLE albums ( id INTEGER PRIMARY KEY AUTOINCREMENT, title VARCHAR(160) NOT NULL, artist_id INTEGER NOT NULL, FOREIGN KEY (artist_id) REFERENCES ...
SELECT T2.name FROM albums AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id WHERE T1.title = "Balls to the Wall";
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE artists\n(\n id INTEGER PRIMARY KEY AUTOINCRE...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE artists ( id INTEGER PRIMARY KEY AUTOINCREMENT, name VARCHAR(120) ) CREATE TABLE sqlite_sequence(name,seq) CREATE TABLE albums ( id INTEGER PRIMARY KEY AUTOINCREMENT, title VARCHAR(160) NOT NULL, artist_id INTEGER NOT NULL, FOREIGN KEY (artist_id) REFERENCES ...
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;
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE artists\n(\n id INTEGER PRIMARY KEY AUTOINCRE...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE artists ( id INTEGER PRIMARY KEY AUTOINCREMENT, name VARCHAR(120) ) CREATE TABLE sqlite_sequence(name,seq) CREATE TABLE albums ( id INTEGER PRIMARY KEY AUTOINCREMENT, title VARCHAR(160) NOT NULL, artist_id INTEGER NOT NULL, FOREIGN KEY (artist_id) REFERENCES ...
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;
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE artists\n(\n id INTEGER PRIMARY KEY AUTOINCRE...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE artists ( id INTEGER PRIMARY KEY AUTOINCREMENT, name VARCHAR(120) ) CREATE TABLE sqlite_sequence(name,seq) CREATE TABLE albums ( id INTEGER PRIMARY KEY AUTOINCREMENT, title VARCHAR(160) NOT NULL, artist_id INTEGER NOT NULL, FOREIGN KEY (artist_id) REFERENCES ...
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";
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE artists\n(\n id INTEGER PRIMARY KEY AUTOINCRE...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE artists ( id INTEGER PRIMARY KEY AUTOINCREMENT, name VARCHAR(120) ) CREATE TABLE sqlite_sequence(name,seq) CREATE TABLE albums ( id INTEGER PRIMARY KEY AUTOINCREMENT, title VARCHAR(160) NOT NULL, artist_id INTEGER NOT NULL, FOREIGN KEY (artist_id) REFERENCES ...
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";
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE artists\n(\n id INTEGER PRIMARY KEY AUTOINCRE...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE artists ( id INTEGER PRIMARY KEY AUTOINCREMENT, name VARCHAR(120) ) CREATE TABLE sqlite_sequence(name,seq) CREATE TABLE albums ( id INTEGER PRIMARY KEY AUTOINCREMENT, title VARCHAR(160) NOT NULL, artist_id INTEGER NOT NULL, FOREIGN KEY (artist_id) REFERENCES ...
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";
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE artists\n(\n id INTEGER PRIMARY KEY AUTOINCRE...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE artists ( id INTEGER PRIMARY KEY AUTOINCREMENT, name VARCHAR(120) ) CREATE TABLE sqlite_sequence(name,seq) CREATE TABLE albums ( id INTEGER PRIMARY KEY AUTOINCREMENT, title VARCHAR(160) NOT NULL, artist_id INTEGER NOT NULL, FOREIGN KEY (artist_id) REFERENCES ...
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";
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE artists\n(\n id INTEGER PRIMARY KEY AUTOINCRE...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE artists ( id INTEGER PRIMARY KEY AUTOINCREMENT, name VARCHAR(120) ) CREATE TABLE sqlite_sequence(name,seq) CREATE TABLE albums ( id INTEGER PRIMARY KEY AUTOINCREMENT, title VARCHAR(160) NOT NULL, artist_id INTEGER NOT NULL, FOREIGN KEY (artist_id) REFERENCES ...
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"
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE artists\n(\n id INTEGER PRIMARY KEY AUTOINCRE...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE artists ( id INTEGER PRIMARY KEY AUTOINCREMENT, name VARCHAR(120) ) CREATE TABLE sqlite_sequence(name,seq) CREATE TABLE albums ( id INTEGER PRIMARY KEY AUTOINCREMENT, title VARCHAR(160) NOT NULL, artist_id INTEGER NOT NULL, FOREIGN KEY (artist_id) REFERENCES ...
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"
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE artists\n(\n id INTEGER PRIMARY KEY AUTOINCRE...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE artists ( id INTEGER PRIMARY KEY AUTOINCREMENT, name VARCHAR(120) ) CREATE TABLE sqlite_sequence(name,seq) CREATE TABLE albums ( id INTEGER PRIMARY KEY AUTOINCREMENT, title VARCHAR(160) NOT NULL, artist_id INTEGER NOT NULL, FOREIGN KEY (artist_id) REFERENCES ...
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";
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE artists\n(\n id INTEGER PRIMARY KEY AUTOINCRE...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE artists ( id INTEGER PRIMARY KEY AUTOINCREMENT, name VARCHAR(120) ) CREATE TABLE sqlite_sequence(name,seq) CREATE TABLE albums ( id INTEGER PRIMARY KEY AUTOINCREMENT, title VARCHAR(160) NOT NULL, artist_id INTEGER NOT NULL, FOREIGN KEY (artist_id) REFERENCES ...
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";
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE artists\n(\n id INTEGER PRIMARY KEY AUTOINCRE...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE artists ( id INTEGER PRIMARY KEY AUTOINCREMENT, name VARCHAR(120) ) CREATE TABLE sqlite_sequence(name,seq) CREATE TABLE albums ( id INTEGER PRIMARY KEY AUTOINCREMENT, title VARCHAR(160) NOT NULL, artist_id INTEGER NOT NULL, FOREIGN KEY (artist_id) REFERENCES ...
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;
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE artists\n(\n id INTEGER PRIMARY KEY AUTOINCRE...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE artists ( id INTEGER PRIMARY KEY AUTOINCREMENT, name VARCHAR(120) ) CREATE TABLE sqlite_sequence(name,seq) CREATE TABLE albums ( id INTEGER PRIMARY KEY AUTOINCREMENT, title VARCHAR(160) NOT NULL, artist_id INTEGER NOT NULL, FOREIGN KEY (artist_id) REFERENCES ...
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;
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE artists\n(\n id INTEGER PRIMARY KEY AUTOINCRE...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE artists ( id INTEGER PRIMARY KEY AUTOINCREMENT, name VARCHAR(120) ) CREATE TABLE sqlite_sequence(name,seq) CREATE TABLE albums ( id INTEGER PRIMARY KEY AUTOINCREMENT, title VARCHAR(160) NOT NULL, artist_id INTEGER NOT NULL, FOREIGN KEY (artist_id) REFERENCES ...
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";
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE artists\n(\n id INTEGER PRIMARY KEY AUTOINCRE...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE artists ( id INTEGER PRIMARY KEY AUTOINCREMENT, name VARCHAR(120) ) CREATE TABLE sqlite_sequence(name,seq) CREATE TABLE albums ( id INTEGER PRIMARY KEY AUTOINCREMENT, title VARCHAR(160) NOT NULL, artist_id INTEGER NOT NULL, FOREIGN KEY (artist_id) REFERENCES ...
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";
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE artists\n(\n id INTEGER PRIMARY KEY AUTOINCRE...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE artists ( id INTEGER PRIMARY KEY AUTOINCREMENT, name VARCHAR(120) ) CREATE TABLE sqlite_sequence(name,seq) CREATE TABLE albums ( id INTEGER PRIMARY KEY AUTOINCREMENT, title VARCHAR(160) NOT NULL, artist_id INTEGER NOT NULL, FOREIGN KEY (artist_id) REFERENCES ...
SELECT unit_price FROM tracks WHERE name = "Fast As a Shark";
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE artists\n(\n id INTEGER PRIMARY KEY AUTOINCRE...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE artists ( id INTEGER PRIMARY KEY AUTOINCREMENT, name VARCHAR(120) ) CREATE TABLE sqlite_sequence(name,seq) CREATE TABLE albums ( id INTEGER PRIMARY KEY AUTOINCREMENT, title VARCHAR(160) NOT NULL, artist_id INTEGER NOT NULL, FOREIGN KEY (artist_id) REFERENCES ...
SELECT unit_price FROM tracks WHERE name = "Fast As a Shark";
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE artists\n(\n id INTEGER PRIMARY KEY AUTOINCRE...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE artists ( id INTEGER PRIMARY KEY AUTOINCREMENT, name VARCHAR(120) ) CREATE TABLE sqlite_sequence(name,seq) CREATE TABLE albums ( id INTEGER PRIMARY KEY AUTOINCREMENT, title VARCHAR(160) NOT NULL, artist_id INTEGER NOT NULL, FOREIGN KEY (artist_id) REFERENCES ...
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 = ...
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE artists\n(\n id INTEGER PRIMARY KEY AUTOINCRE...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE artists ( id INTEGER PRIMARY KEY AUTOINCREMENT, name VARCHAR(120) ) CREATE TABLE sqlite_sequence(name,seq) CREATE TABLE albums ( id INTEGER PRIMARY KEY AUTOINCREMENT, title VARCHAR(160) NOT NULL, artist_id INTEGER NOT NULL, FOREIGN KEY (artist_id) REFERENCES ...
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 = ...
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE artists\n(\n id INTEGER PRIMARY KEY AUTOINCRE...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE artists ( id INTEGER PRIMARY KEY AUTOINCREMENT, name VARCHAR(120) ) CREATE TABLE sqlite_sequence(name,seq) CREATE TABLE albums ( id INTEGER PRIMARY KEY AUTOINCREMENT, title VARCHAR(160) NOT NULL, artist_id INTEGER NOT NULL, FOREIGN KEY (artist_id) REFERENCES ...
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 ...
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE artists\n(\n id INTEGER PRIMARY KEY AUTOINCRE...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE artists ( id INTEGER PRIMARY KEY AUTOINCREMENT, name VARCHAR(120) ) CREATE TABLE sqlite_sequence(name,seq) CREATE TABLE albums ( id INTEGER PRIMARY KEY AUTOINCREMENT, title VARCHAR(160) NOT NULL, artist_id INTEGER NOT NULL, FOREIGN KEY (artist_id) REFERENCES ...
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 ...
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE artists\n(\n id INTEGER PRIMARY KEY AUTOINCRE...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE artists ( id INTEGER PRIMARY KEY AUTOINCREMENT, name VARCHAR(120) ) CREATE TABLE sqlite_sequence(name,seq) CREATE TABLE albums ( id INTEGER PRIMARY KEY AUTOINCREMENT, title VARCHAR(160) NOT NULL, artist_id INTEGER NOT NULL, FOREIGN KEY (artist_id) REFERENCES ...
SELECT count(*) , T1.name FROM genres AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id GROUP BY T1.name;
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE artists\n(\n id INTEGER PRIMARY KEY AUTOINCRE...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE artists ( id INTEGER PRIMARY KEY AUTOINCREMENT, name VARCHAR(120) ) CREATE TABLE sqlite_sequence(name,seq) CREATE TABLE albums ( id INTEGER PRIMARY KEY AUTOINCREMENT, title VARCHAR(160) NOT NULL, artist_id INTEGER NOT NULL, FOREIGN KEY (artist_id) REFERENCES ...
SELECT count(*) , T1.name FROM genres AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id GROUP BY T1.name;
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"journal\" (\n\"Journal_ID\" int,\n\"Date\" tex...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "journal" ( "Journal_ID" int, "Date" text, "Theme" text, "Sales" int, PRIMARY KEY ("Journal_ID") ) CREATE TABLE "editor" ( "Editor_ID" int, "Name" text, "Age" real, PRIMARY KEY ("Editor_ID") ) CREATE TABLE "journal_committee" ( "Editor_ID" int, "Journal_ID" int, "Work_Type" text, PRIM...
SELECT count(*) FROM editor
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"journal\" (\n\"Journal_ID\" int,\n\"Date\" tex...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "journal" ( "Journal_ID" int, "Date" text, "Theme" text, "Sales" int, PRIMARY KEY ("Journal_ID") ) CREATE TABLE "editor" ( "Editor_ID" int, "Name" text, "Age" real, PRIMARY KEY ("Editor_ID") ) CREATE TABLE "journal_committee" ( "Editor_ID" int, "Journal_ID" int, "Work_Type" text, PRIM...
SELECT Name FROM editor ORDER BY Age ASC
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"journal\" (\n\"Journal_ID\" int,\n\"Date\" tex...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "journal" ( "Journal_ID" int, "Date" text, "Theme" text, "Sales" int, PRIMARY KEY ("Journal_ID") ) CREATE TABLE "editor" ( "Editor_ID" int, "Name" text, "Age" real, PRIMARY KEY ("Editor_ID") ) CREATE TABLE "journal_committee" ( "Editor_ID" int, "Journal_ID" int, "Work_Type" text, PRIM...
SELECT Name , Age FROM editor
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"journal\" (\n\"Journal_ID\" int,\n\"Date\" tex...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "journal" ( "Journal_ID" int, "Date" text, "Theme" text, "Sales" int, PRIMARY KEY ("Journal_ID") ) CREATE TABLE "editor" ( "Editor_ID" int, "Name" text, "Age" real, PRIMARY KEY ("Editor_ID") ) CREATE TABLE "journal_committee" ( "Editor_ID" int, "Journal_ID" int, "Work_Type" text, PRIM...
SELECT Name FROM editor WHERE Age > 25
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"journal\" (\n\"Journal_ID\" int,\n\"Date\" tex...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "journal" ( "Journal_ID" int, "Date" text, "Theme" text, "Sales" int, PRIMARY KEY ("Journal_ID") ) CREATE TABLE "editor" ( "Editor_ID" int, "Name" text, "Age" real, PRIMARY KEY ("Editor_ID") ) CREATE TABLE "journal_committee" ( "Editor_ID" int, "Journal_ID" int, "Work_Type" text, PRIM...
SELECT Name FROM editor WHERE Age = 24 OR Age = 25
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"journal\" (\n\"Journal_ID\" int,\n\"Date\" tex...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "journal" ( "Journal_ID" int, "Date" text, "Theme" text, "Sales" int, PRIMARY KEY ("Journal_ID") ) CREATE TABLE "editor" ( "Editor_ID" int, "Name" text, "Age" real, PRIMARY KEY ("Editor_ID") ) CREATE TABLE "journal_committee" ( "Editor_ID" int, "Journal_ID" int, "Work_Type" text, PRIM...
SELECT Name FROM editor ORDER BY Age ASC LIMIT 1
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"journal\" (\n\"Journal_ID\" int,\n\"Date\" tex...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "journal" ( "Journal_ID" int, "Date" text, "Theme" text, "Sales" int, PRIMARY KEY ("Journal_ID") ) CREATE TABLE "editor" ( "Editor_ID" int, "Name" text, "Age" real, PRIMARY KEY ("Editor_ID") ) CREATE TABLE "journal_committee" ( "Editor_ID" int, "Journal_ID" int, "Work_Type" text, PRIM...
SELECT Age , COUNT(*) FROM editor GROUP BY Age
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"journal\" (\n\"Journal_ID\" int,\n\"Date\" tex...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "journal" ( "Journal_ID" int, "Date" text, "Theme" text, "Sales" int, PRIMARY KEY ("Journal_ID") ) CREATE TABLE "editor" ( "Editor_ID" int, "Name" text, "Age" real, PRIMARY KEY ("Editor_ID") ) CREATE TABLE "journal_committee" ( "Editor_ID" int, "Journal_ID" int, "Work_Type" text, PRIM...
SELECT Age FROM editor GROUP BY Age ORDER BY COUNT(*) DESC LIMIT 1
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"journal\" (\n\"Journal_ID\" int,\n\"Date\" tex...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "journal" ( "Journal_ID" int, "Date" text, "Theme" text, "Sales" int, PRIMARY KEY ("Journal_ID") ) CREATE TABLE "editor" ( "Editor_ID" int, "Name" text, "Age" real, PRIMARY KEY ("Editor_ID") ) CREATE TABLE "journal_committee" ( "Editor_ID" int, "Journal_ID" int, "Work_Type" text, PRIM...
SELECT DISTINCT Theme FROM journal
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"journal\" (\n\"Journal_ID\" int,\n\"Date\" tex...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "journal" ( "Journal_ID" int, "Date" text, "Theme" text, "Sales" int, PRIMARY KEY ("Journal_ID") ) CREATE TABLE "editor" ( "Editor_ID" int, "Name" text, "Age" real, PRIMARY KEY ("Editor_ID") ) CREATE TABLE "journal_committee" ( "Editor_ID" int, "Journal_ID" int, "Work_Type" text, PRIM...
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
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"journal\" (\n\"Journal_ID\" int,\n\"Date\" tex...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "journal" ( "Journal_ID" int, "Date" text, "Theme" text, "Sales" int, PRIMARY KEY ("Journal_ID") ) CREATE TABLE "editor" ( "Editor_ID" int, "Name" text, "Age" real, PRIMARY KEY ("Editor_ID") ) CREATE TABLE "journal_committee" ( "Editor_ID" int, "Journal_ID" int, "Work_Type" text, PRIM...
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
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"journal\" (\n\"Journal_ID\" int,\n\"Date\" tex...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "journal" ( "Journal_ID" int, "Date" text, "Theme" text, "Sales" int, PRIMARY KEY ("Journal_ID") ) CREATE TABLE "editor" ( "Editor_ID" int, "Name" text, "Age" real, PRIMARY KEY ("Editor_ID") ) CREATE TABLE "journal_committee" ( "Editor_ID" int, "Journal_ID" int, "Work_Type" text, PRIM...
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
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"journal\" (\n\"Journal_ID\" int,\n\"Date\" tex...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "journal" ( "Journal_ID" int, "Date" text, "Theme" text, "Sales" int, PRIMARY KEY ("Journal_ID") ) CREATE TABLE "editor" ( "Editor_ID" int, "Name" text, "Age" real, PRIMARY KEY ("Editor_ID") ) CREATE TABLE "journal_committee" ( "Editor_ID" int, "Journal_ID" int, "Work_Type" text, PRIM...
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
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"journal\" (\n\"Journal_ID\" int,\n\"Date\" tex...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "journal" ( "Journal_ID" int, "Date" text, "Theme" text, "Sales" int, PRIMARY KEY ("Journal_ID") ) CREATE TABLE "editor" ( "Editor_ID" int, "Name" text, "Age" real, PRIMARY KEY ("Editor_ID") ) CREATE TABLE "journal_committee" ( "Editor_ID" int, "Journal_ID" int, "Work_Type" text, PRIM...
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
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"journal\" (\n\"Journal_ID\" int,\n\"Date\" tex...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "journal" ( "Journal_ID" int, "Date" text, "Theme" text, "Sales" int, PRIMARY KEY ("Journal_ID") ) CREATE TABLE "editor" ( "Editor_ID" int, "Name" text, "Age" real, PRIMARY KEY ("Editor_ID") ) CREATE TABLE "journal_committee" ( "Editor_ID" int, "Journal_ID" int, "Work_Type" text, PRIM...
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
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"journal\" (\n\"Journal_ID\" int,\n\"Date\" tex...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "journal" ( "Journal_ID" int, "Date" text, "Theme" text, "Sales" int, PRIMARY KEY ("Journal_ID") ) CREATE TABLE "editor" ( "Editor_ID" int, "Name" text, "Age" real, PRIMARY KEY ("Editor_ID") ) CREATE TABLE "journal_committee" ( "Editor_ID" int, "Journal_ID" int, "Work_Type" text, PRIM...
SELECT Name FROM editor WHERE editor_id NOT IN (SELECT editor_id FROM journal_committee)
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"journal\" (\n\"Journal_ID\" int,\n\"Date\" tex...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "journal" ( "Journal_ID" int, "Date" text, "Theme" text, "Sales" int, PRIMARY KEY ("Journal_ID") ) CREATE TABLE "editor" ( "Editor_ID" int, "Name" text, "Age" real, PRIMARY KEY ("Editor_ID") ) CREATE TABLE "journal_committee" ( "Editor_ID" int, "Journal_ID" int, "Work_Type" text, PRIM...
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
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"journal\" (\n\"Journal_ID\" int,\n\"Date\" tex...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "journal" ( "Journal_ID" int, "Date" text, "Theme" text, "Sales" int, PRIMARY KEY ("Journal_ID") ) CREATE TABLE "editor" ( "Editor_ID" int, "Name" text, "Age" real, PRIMARY KEY ("Editor_ID") ) CREATE TABLE "journal_committee" ( "Editor_ID" int, "Journal_ID" int, "Work_Type" text, PRIM...
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'
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Accounts` (\n`account_id` INTEGER PRIMARY KEY,\...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Accounts` ( `account_id` INTEGER PRIMARY KEY, `customer_id` INTEGER NOT NULL, `account_name` VARCHAR(50), `other_account_details` VARCHAR(255) ) CREATE TABLE `Customers` ( `customer_id` INTEGER PRIMARY KEY, `customer_first_name` VARCHAR(20), `customer_last_name` VARCHAR(20), `customer...
SELECT count(*) FROM Accounts
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Accounts` (\n`account_id` INTEGER PRIMARY KEY,\...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Accounts` ( `account_id` INTEGER PRIMARY KEY, `customer_id` INTEGER NOT NULL, `account_name` VARCHAR(50), `other_account_details` VARCHAR(255) ) CREATE TABLE `Customers` ( `customer_id` INTEGER PRIMARY KEY, `customer_first_name` VARCHAR(20), `customer_last_name` VARCHAR(20), `customer...
SELECT count(*) FROM Accounts
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Accounts` (\n`account_id` INTEGER PRIMARY KEY,\...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Accounts` ( `account_id` INTEGER PRIMARY KEY, `customer_id` INTEGER NOT NULL, `account_name` VARCHAR(50), `other_account_details` VARCHAR(255) ) CREATE TABLE `Customers` ( `customer_id` INTEGER PRIMARY KEY, `customer_first_name` VARCHAR(20), `customer_last_name` VARCHAR(20), `customer...
SELECT account_id , customer_id , account_name FROM Accounts
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Accounts` (\n`account_id` INTEGER PRIMARY KEY,\...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Accounts` ( `account_id` INTEGER PRIMARY KEY, `customer_id` INTEGER NOT NULL, `account_name` VARCHAR(50), `other_account_details` VARCHAR(255) ) CREATE TABLE `Customers` ( `customer_id` INTEGER PRIMARY KEY, `customer_first_name` VARCHAR(20), `customer_last_name` VARCHAR(20), `customer...
SELECT account_id , customer_id , account_name FROM Accounts
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Accounts` (\n`account_id` INTEGER PRIMARY KEY,\...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Accounts` ( `account_id` INTEGER PRIMARY KEY, `customer_id` INTEGER NOT NULL, `account_name` VARCHAR(50), `other_account_details` VARCHAR(255) ) CREATE TABLE `Customers` ( `customer_id` INTEGER PRIMARY KEY, `customer_first_name` VARCHAR(20), `customer_last_name` VARCHAR(20), `customer...
SELECT other_account_details FROM Accounts WHERE account_name = "338"
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Accounts` (\n`account_id` INTEGER PRIMARY KEY,\...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Accounts` ( `account_id` INTEGER PRIMARY KEY, `customer_id` INTEGER NOT NULL, `account_name` VARCHAR(50), `other_account_details` VARCHAR(255) ) CREATE TABLE `Customers` ( `customer_id` INTEGER PRIMARY KEY, `customer_first_name` VARCHAR(20), `customer_last_name` VARCHAR(20), `customer...
SELECT other_account_details FROM Accounts WHERE account_name = "338"
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Accounts` (\n`account_id` INTEGER PRIMARY KEY,\...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Accounts` ( `account_id` INTEGER PRIMARY KEY, `customer_id` INTEGER NOT NULL, `account_name` VARCHAR(50), `other_account_details` VARCHAR(255) ) CREATE TABLE `Customers` ( `customer_id` INTEGER PRIMARY KEY, `customer_first_name` VARCHAR(20), `customer_last_name` VARCHAR(20), `customer...
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"
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Accounts` (\n`account_id` INTEGER PRIMARY KEY,\...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Accounts` ( `account_id` INTEGER PRIMARY KEY, `customer_id` INTEGER NOT NULL, `account_name` VARCHAR(50), `other_account_details` VARCHAR(255) ) CREATE TABLE `Customers` ( `customer_id` INTEGER PRIMARY KEY, `customer_first_name` VARCHAR(20), `customer_last_name` VARCHAR(20), `customer...
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"
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Accounts` (\n`account_id` INTEGER PRIMARY KEY,\...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Accounts` ( `account_id` INTEGER PRIMARY KEY, `customer_id` INTEGER NOT NULL, `account_name` VARCHAR(50), `other_account_details` VARCHAR(255) ) CREATE TABLE `Customers` ( `customer_id` INTEGER PRIMARY KEY, `customer_first_name` VARCHAR(20), `customer_last_name` VARCHAR(20), `customer...
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"
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Accounts` (\n`account_id` INTEGER PRIMARY KEY,\...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Accounts` ( `account_id` INTEGER PRIMARY KEY, `customer_id` INTEGER NOT NULL, `account_name` VARCHAR(50), `other_account_details` VARCHAR(255) ) CREATE TABLE `Customers` ( `customer_id` INTEGER PRIMARY KEY, `customer_first_name` VARCHAR(20), `customer_last_name` VARCHAR(20), `customer...
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"
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Accounts` (\n`account_id` INTEGER PRIMARY KEY,\...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Accounts` ( `account_id` INTEGER PRIMARY KEY, `customer_id` INTEGER NOT NULL, `account_name` VARCHAR(50), `other_account_details` VARCHAR(255) ) CREATE TABLE `Customers` ( `customer_id` INTEGER PRIMARY KEY, `customer_first_name` VARCHAR(20), `customer_last_name` VARCHAR(20), `customer...
SELECT customer_id , count(*) FROM Accounts GROUP BY customer_id
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Accounts` (\n`account_id` INTEGER PRIMARY KEY,\...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Accounts` ( `account_id` INTEGER PRIMARY KEY, `customer_id` INTEGER NOT NULL, `account_name` VARCHAR(50), `other_account_details` VARCHAR(255) ) CREATE TABLE `Customers` ( `customer_id` INTEGER PRIMARY KEY, `customer_first_name` VARCHAR(20), `customer_last_name` VARCHAR(20), `customer...
SELECT customer_id , count(*) FROM Accounts GROUP BY customer_id
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Accounts` (\n`account_id` INTEGER PRIMARY KEY,\...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Accounts` ( `account_id` INTEGER PRIMARY KEY, `customer_id` INTEGER NOT NULL, `account_name` VARCHAR(50), `other_account_details` VARCHAR(255) ) CREATE TABLE `Customers` ( `customer_id` INTEGER PRIMARY KEY, `customer_first_name` VARCHAR(20), `customer_last_name` VARCHAR(20), `customer...
SELECT customer_id , count(*) FROM Accounts GROUP BY customer_id ORDER BY count(*) DESC LIMIT 1
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Accounts` (\n`account_id` INTEGER PRIMARY KEY,\...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Accounts` ( `account_id` INTEGER PRIMARY KEY, `customer_id` INTEGER NOT NULL, `account_name` VARCHAR(50), `other_account_details` VARCHAR(255) ) CREATE TABLE `Customers` ( `customer_id` INTEGER PRIMARY KEY, `customer_first_name` VARCHAR(20), `customer_last_name` VARCHAR(20), `customer...
SELECT customer_id , count(*) FROM Accounts GROUP BY customer_id ORDER BY count(*) DESC LIMIT 1
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Accounts` (\n`account_id` INTEGER PRIMARY KEY,\...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Accounts` ( `account_id` INTEGER PRIMARY KEY, `customer_id` INTEGER NOT NULL, `account_name` VARCHAR(50), `other_account_details` VARCHAR(255) ) CREATE TABLE `Customers` ( `customer_id` INTEGER PRIMARY KEY, `customer_first_name` VARCHAR(20), `customer_last_name` VARCHAR(20), `customer...
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
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Accounts` (\n`account_id` INTEGER PRIMARY KEY,\...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Accounts` ( `account_id` INTEGER PRIMARY KEY, `customer_id` INTEGER NOT NULL, `account_name` VARCHAR(50), `other_account_details` VARCHAR(255) ) CREATE TABLE `Customers` ( `customer_id` INTEGER PRIMARY KEY, `customer_first_name` VARCHAR(20), `customer_last_name` VARCHAR(20), `customer...
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
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Accounts` (\n`account_id` INTEGER PRIMARY KEY,\...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Accounts` ( `account_id` INTEGER PRIMARY KEY, `customer_id` INTEGER NOT NULL, `account_name` VARCHAR(50), `other_account_details` VARCHAR(255) ) CREATE TABLE `Customers` ( `customer_id` INTEGER PRIMARY KEY, `customer_first_name` VARCHAR(20), `customer_last_name` VARCHAR(20), `customer...
SELECT count(*) FROM Customers WHERE customer_id NOT IN (SELECT customer_id FROM Accounts)
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Accounts` (\n`account_id` INTEGER PRIMARY KEY,\...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Accounts` ( `account_id` INTEGER PRIMARY KEY, `customer_id` INTEGER NOT NULL, `account_name` VARCHAR(50), `other_account_details` VARCHAR(255) ) CREATE TABLE `Customers` ( `customer_id` INTEGER PRIMARY KEY, `customer_first_name` VARCHAR(20), `customer_last_name` VARCHAR(20), `customer...
SELECT count(*) FROM Customers WHERE customer_id NOT IN (SELECT customer_id FROM Accounts)
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Accounts` (\n`account_id` INTEGER PRIMARY KEY,\...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Accounts` ( `account_id` INTEGER PRIMARY KEY, `customer_id` INTEGER NOT NULL, `account_name` VARCHAR(50), `other_account_details` VARCHAR(255) ) CREATE TABLE `Customers` ( `customer_id` INTEGER PRIMARY KEY, `customer_first_name` VARCHAR(20), `customer_last_name` VARCHAR(20), `customer...
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
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Accounts` (\n`account_id` INTEGER PRIMARY KEY,\...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Accounts` ( `account_id` INTEGER PRIMARY KEY, `customer_id` INTEGER NOT NULL, `account_name` VARCHAR(50), `other_account_details` VARCHAR(255) ) CREATE TABLE `Customers` ( `customer_id` INTEGER PRIMARY KEY, `customer_first_name` VARCHAR(20), `customer_last_name` VARCHAR(20), `customer...
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
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Accounts` (\n`account_id` INTEGER PRIMARY KEY,\...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Accounts` ( `account_id` INTEGER PRIMARY KEY, `customer_id` INTEGER NOT NULL, `account_name` VARCHAR(50), `other_account_details` VARCHAR(255) ) CREATE TABLE `Customers` ( `customer_id` INTEGER PRIMARY KEY, `customer_first_name` VARCHAR(20), `customer_last_name` VARCHAR(20), `customer...
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
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Accounts` (\n`account_id` INTEGER PRIMARY KEY,\...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Accounts` ( `account_id` INTEGER PRIMARY KEY, `customer_id` INTEGER NOT NULL, `account_name` VARCHAR(50), `other_account_details` VARCHAR(255) ) CREATE TABLE `Customers` ( `customer_id` INTEGER PRIMARY KEY, `customer_first_name` VARCHAR(20), `customer_last_name` VARCHAR(20), `customer...
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
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Accounts` (\n`account_id` INTEGER PRIMARY KEY,\...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Accounts` ( `account_id` INTEGER PRIMARY KEY, `customer_id` INTEGER NOT NULL, `account_name` VARCHAR(50), `other_account_details` VARCHAR(255) ) CREATE TABLE `Customers` ( `customer_id` INTEGER PRIMARY KEY, `customer_first_name` VARCHAR(20), `customer_last_name` VARCHAR(20), `customer...
SELECT count(DISTINCT customer_id) FROM Accounts
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Accounts` (\n`account_id` INTEGER PRIMARY KEY,\...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Accounts` ( `account_id` INTEGER PRIMARY KEY, `customer_id` INTEGER NOT NULL, `account_name` VARCHAR(50), `other_account_details` VARCHAR(255) ) CREATE TABLE `Customers` ( `customer_id` INTEGER PRIMARY KEY, `customer_first_name` VARCHAR(20), `customer_last_name` VARCHAR(20), `customer...
SELECT count(DISTINCT customer_id) FROM Accounts
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Accounts` (\n`account_id` INTEGER PRIMARY KEY,\...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Accounts` ( `account_id` INTEGER PRIMARY KEY, `customer_id` INTEGER NOT NULL, `account_name` VARCHAR(50), `other_account_details` VARCHAR(255) ) CREATE TABLE `Customers` ( `customer_id` INTEGER PRIMARY KEY, `customer_first_name` VARCHAR(20), `customer_last_name` VARCHAR(20), `customer...
SELECT count(*) FROM Customers
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Accounts` (\n`account_id` INTEGER PRIMARY KEY,\...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Accounts` ( `account_id` INTEGER PRIMARY KEY, `customer_id` INTEGER NOT NULL, `account_name` VARCHAR(50), `other_account_details` VARCHAR(255) ) CREATE TABLE `Customers` ( `customer_id` INTEGER PRIMARY KEY, `customer_first_name` VARCHAR(20), `customer_last_name` VARCHAR(20), `customer...
SELECT count(*) FROM Customers
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Accounts` (\n`account_id` INTEGER PRIMARY KEY,\...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Accounts` ( `account_id` INTEGER PRIMARY KEY, `customer_id` INTEGER NOT NULL, `account_name` VARCHAR(50), `other_account_details` VARCHAR(255) ) CREATE TABLE `Customers` ( `customer_id` INTEGER PRIMARY KEY, `customer_first_name` VARCHAR(20), `customer_last_name` VARCHAR(20), `customer...
SELECT customer_id , customer_first_name , customer_last_name , customer_phone FROM Customers
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Accounts` (\n`account_id` INTEGER PRIMARY KEY,\...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Accounts` ( `account_id` INTEGER PRIMARY KEY, `customer_id` INTEGER NOT NULL, `account_name` VARCHAR(50), `other_account_details` VARCHAR(255) ) CREATE TABLE `Customers` ( `customer_id` INTEGER PRIMARY KEY, `customer_first_name` VARCHAR(20), `customer_last_name` VARCHAR(20), `customer...
SELECT customer_id , customer_first_name , customer_last_name , customer_phone FROM Customers
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Accounts` (\n`account_id` INTEGER PRIMARY KEY,\...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Accounts` ( `account_id` INTEGER PRIMARY KEY, `customer_id` INTEGER NOT NULL, `account_name` VARCHAR(50), `other_account_details` VARCHAR(255) ) CREATE TABLE `Customers` ( `customer_id` INTEGER PRIMARY KEY, `customer_first_name` VARCHAR(20), `customer_last_name` VARCHAR(20), `customer...
SELECT customer_phone , customer_email FROM Customers WHERE customer_first_name = "Aniyah" AND customer_last_name = "Feest"
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Accounts` (\n`account_id` INTEGER PRIMARY KEY,\...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Accounts` ( `account_id` INTEGER PRIMARY KEY, `customer_id` INTEGER NOT NULL, `account_name` VARCHAR(50), `other_account_details` VARCHAR(255) ) CREATE TABLE `Customers` ( `customer_id` INTEGER PRIMARY KEY, `customer_first_name` VARCHAR(20), `customer_last_name` VARCHAR(20), `customer...
SELECT customer_phone , customer_email FROM Customers WHERE customer_first_name = "Aniyah" AND customer_last_name = "Feest"
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Accounts` (\n`account_id` INTEGER PRIMARY KEY,\...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Accounts` ( `account_id` INTEGER PRIMARY KEY, `customer_id` INTEGER NOT NULL, `account_name` VARCHAR(50), `other_account_details` VARCHAR(255) ) CREATE TABLE `Customers` ( `customer_id` INTEGER PRIMARY KEY, `customer_first_name` VARCHAR(20), `customer_last_name` VARCHAR(20), `customer...
SELECT count(*) FROM Customers_cards
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Accounts` (\n`account_id` INTEGER PRIMARY KEY,\...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Accounts` ( `account_id` INTEGER PRIMARY KEY, `customer_id` INTEGER NOT NULL, `account_name` VARCHAR(50), `other_account_details` VARCHAR(255) ) CREATE TABLE `Customers` ( `customer_id` INTEGER PRIMARY KEY, `customer_first_name` VARCHAR(20), `customer_last_name` VARCHAR(20), `customer...
SELECT count(*) FROM Customers_cards
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Accounts` (\n`account_id` INTEGER PRIMARY KEY,\...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Accounts` ( `account_id` INTEGER PRIMARY KEY, `customer_id` INTEGER NOT NULL, `account_name` VARCHAR(50), `other_account_details` VARCHAR(255) ) CREATE TABLE `Customers` ( `customer_id` INTEGER PRIMARY KEY, `customer_first_name` VARCHAR(20), `customer_last_name` VARCHAR(20), `customer...
SELECT card_id , customer_id , card_type_code , card_number FROM Customers_cards