input
stringlengths
191
7.13k
output
stringlengths
19
578
Tables: artists, sqlite_sequence, albums, employees, customers, genres, invoices, media_types, tracks, invoice_lines, playlists, playlist_tracks Columns: artists.id, artists.name, sqlite_sequence.name, sqlite_sequence.seq, albums.id, albums.title, albums.artist_id, employees.id, employees.last_name, employees.first_nam...
SELECT first_name , last_name FROM employees ORDER BY birth_date DESC LIMIT 1;
Tables: artists, sqlite_sequence, albums, employees, customers, genres, invoices, media_types, tracks, invoice_lines, playlists, playlist_tracks Columns: artists.id, artists.name, sqlite_sequence.name, sqlite_sequence.seq, albums.id, albums.title, albums.artist_id, employees.id, employees.last_name, employees.first_nam...
SELECT first_name , last_name FROM employees ORDER BY hire_date ASC LIMIT 10;
Tables: artists, sqlite_sequence, albums, employees, customers, genres, invoices, media_types, tracks, invoice_lines, playlists, playlist_tracks Columns: artists.id, artists.name, sqlite_sequence.name, sqlite_sequence.seq, albums.id, albums.title, albums.artist_id, employees.id, employees.last_name, employees.first_nam...
SELECT first_name , last_name FROM employees ORDER BY hire_date ASC LIMIT 10;
Tables: artists, sqlite_sequence, albums, employees, customers, genres, invoices, media_types, tracks, invoice_lines, playlists, playlist_tracks Columns: artists.id, artists.name, sqlite_sequence.name, sqlite_sequence.seq, albums.id, albums.title, albums.artist_id, employees.id, employees.last_name, employees.first_nam...
SELECT count(*) , city FROM employees WHERE title = 'IT Staff' GROUP BY city;
Tables: artists, sqlite_sequence, albums, employees, customers, genres, invoices, media_types, tracks, invoice_lines, playlists, playlist_tracks Columns: artists.id, artists.name, sqlite_sequence.name, sqlite_sequence.seq, albums.id, albums.title, albums.artist_id, employees.id, employees.last_name, employees.first_nam...
SELECT count(*) , city FROM employees WHERE title = 'IT Staff' GROUP BY city;
Tables: artists, sqlite_sequence, albums, employees, customers, genres, invoices, media_types, tracks, invoice_lines, playlists, playlist_tracks Columns: artists.id, artists.name, sqlite_sequence.name, sqlite_sequence.seq, albums.id, albums.title, albums.artist_id, employees.id, employees.last_name, employees.first_nam...
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;
Tables: artists, sqlite_sequence, albums, employees, customers, genres, invoices, media_types, tracks, invoice_lines, playlists, playlist_tracks Columns: artists.id, artists.name, sqlite_sequence.name, sqlite_sequence.seq, albums.id, albums.title, albums.artist_id, employees.id, employees.last_name, employees.first_nam...
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;
Tables: artists, sqlite_sequence, albums, employees, customers, genres, invoices, media_types, tracks, invoice_lines, playlists, playlist_tracks Columns: artists.id, artists.name, sqlite_sequence.name, sqlite_sequence.seq, albums.id, albums.title, albums.artist_id, employees.id, employees.last_name, employees.first_nam...
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";
Tables: artists, sqlite_sequence, albums, employees, customers, genres, invoices, media_types, tracks, invoice_lines, playlists, playlist_tracks Columns: artists.id, artists.name, sqlite_sequence.name, sqlite_sequence.seq, albums.id, albums.title, albums.artist_id, employees.id, employees.last_name, employees.first_nam...
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";
Tables: artists, sqlite_sequence, albums, employees, customers, genres, invoices, media_types, tracks, invoice_lines, playlists, playlist_tracks Columns: artists.id, artists.name, sqlite_sequence.name, sqlite_sequence.seq, albums.id, albums.title, albums.artist_id, employees.id, employees.last_name, employees.first_nam...
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";
Tables: artists, sqlite_sequence, albums, employees, customers, genres, invoices, media_types, tracks, invoice_lines, playlists, playlist_tracks Columns: artists.id, artists.name, sqlite_sequence.name, sqlite_sequence.seq, albums.id, albums.title, albums.artist_id, employees.id, employees.last_name, employees.first_nam...
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";
Tables: artists, sqlite_sequence, albums, employees, customers, genres, invoices, media_types, tracks, invoice_lines, playlists, playlist_tracks Columns: artists.id, artists.name, sqlite_sequence.name, sqlite_sequence.seq, albums.id, albums.title, albums.artist_id, employees.id, employees.last_name, employees.first_nam...
SELECT name FROM media_types;
Tables: artists, sqlite_sequence, albums, employees, customers, genres, invoices, media_types, tracks, invoice_lines, playlists, playlist_tracks Columns: artists.id, artists.name, sqlite_sequence.name, sqlite_sequence.seq, albums.id, albums.title, albums.artist_id, employees.id, employees.last_name, employees.first_nam...
SELECT name FROM media_types;
Tables: artists, sqlite_sequence, albums, employees, customers, genres, invoices, media_types, tracks, invoice_lines, playlists, playlist_tracks Columns: artists.id, artists.name, sqlite_sequence.name, sqlite_sequence.seq, albums.id, albums.title, albums.artist_id, employees.id, employees.last_name, employees.first_nam...
SELECT DISTINCT name FROM genres;
Tables: artists, sqlite_sequence, albums, employees, customers, genres, invoices, media_types, tracks, invoice_lines, playlists, playlist_tracks Columns: artists.id, artists.name, sqlite_sequence.name, sqlite_sequence.seq, albums.id, albums.title, albums.artist_id, employees.id, employees.last_name, employees.first_nam...
SELECT DISTINCT name FROM genres;
Tables: artists, sqlite_sequence, albums, employees, customers, genres, invoices, media_types, tracks, invoice_lines, playlists, playlist_tracks Columns: artists.id, artists.name, sqlite_sequence.name, sqlite_sequence.seq, albums.id, albums.title, albums.artist_id, employees.id, employees.last_name, employees.first_nam...
SELECT name FROM playlists;
Tables: artists, sqlite_sequence, albums, employees, customers, genres, invoices, media_types, tracks, invoice_lines, playlists, playlist_tracks Columns: artists.id, artists.name, sqlite_sequence.name, sqlite_sequence.seq, albums.id, albums.title, albums.artist_id, employees.id, employees.last_name, employees.first_nam...
SELECT name FROM playlists;
Tables: artists, sqlite_sequence, albums, employees, customers, genres, invoices, media_types, tracks, invoice_lines, playlists, playlist_tracks Columns: artists.id, artists.name, sqlite_sequence.name, sqlite_sequence.seq, albums.id, albums.title, albums.artist_id, employees.id, employees.last_name, employees.first_nam...
SELECT composer FROM tracks WHERE name = "Fast As a Shark";
Tables: artists, sqlite_sequence, albums, employees, customers, genres, invoices, media_types, tracks, invoice_lines, playlists, playlist_tracks Columns: artists.id, artists.name, sqlite_sequence.name, sqlite_sequence.seq, albums.id, albums.title, albums.artist_id, employees.id, employees.last_name, employees.first_nam...
SELECT composer FROM tracks WHERE name = "Fast As a Shark";
Tables: artists, sqlite_sequence, albums, employees, customers, genres, invoices, media_types, tracks, invoice_lines, playlists, playlist_tracks Columns: artists.id, artists.name, sqlite_sequence.name, sqlite_sequence.seq, albums.id, albums.title, albums.artist_id, employees.id, employees.last_name, employees.first_nam...
SELECT milliseconds FROM tracks WHERE name = "Fast As a Shark";
Tables: artists, sqlite_sequence, albums, employees, customers, genres, invoices, media_types, tracks, invoice_lines, playlists, playlist_tracks Columns: artists.id, artists.name, sqlite_sequence.name, sqlite_sequence.seq, albums.id, albums.title, albums.artist_id, employees.id, employees.last_name, employees.first_nam...
SELECT milliseconds FROM tracks WHERE name = "Fast As a Shark";
Tables: artists, sqlite_sequence, albums, employees, customers, genres, invoices, media_types, tracks, invoice_lines, playlists, playlist_tracks Columns: artists.id, artists.name, sqlite_sequence.name, sqlite_sequence.seq, albums.id, albums.title, albums.artist_id, employees.id, employees.last_name, employees.first_nam...
SELECT T2.name FROM genres AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id WHERE T1.name = "Rock";
Tables: artists, sqlite_sequence, albums, employees, customers, genres, invoices, media_types, tracks, invoice_lines, playlists, playlist_tracks Columns: artists.id, artists.name, sqlite_sequence.name, sqlite_sequence.seq, albums.id, albums.title, albums.artist_id, employees.id, employees.last_name, employees.first_nam...
SELECT T2.name FROM genres AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id WHERE T1.name = "Rock";
Tables: artists, sqlite_sequence, albums, employees, customers, genres, invoices, media_types, tracks, invoice_lines, playlists, playlist_tracks Columns: artists.id, artists.name, sqlite_sequence.name, sqlite_sequence.seq, albums.id, albums.title, albums.artist_id, employees.id, employees.last_name, employees.first_nam...
SELECT T1.title FROM albums AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id WHERE T2.name = "Balls to the Wall";
Tables: artists, sqlite_sequence, albums, employees, customers, genres, invoices, media_types, tracks, invoice_lines, playlists, playlist_tracks Columns: artists.id, artists.name, sqlite_sequence.name, sqlite_sequence.seq, albums.id, albums.title, albums.artist_id, employees.id, employees.last_name, employees.first_nam...
SELECT T1.title FROM albums AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id WHERE T2.name = "Balls to the Wall";
Tables: artists, sqlite_sequence, albums, employees, customers, genres, invoices, media_types, tracks, invoice_lines, playlists, playlist_tracks Columns: artists.id, artists.name, sqlite_sequence.name, sqlite_sequence.seq, albums.id, albums.title, albums.artist_id, employees.id, employees.last_name, employees.first_nam...
SELECT T2.name FROM albums AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id WHERE T1.title = "Balls to the Wall";
Tables: artists, sqlite_sequence, albums, employees, customers, genres, invoices, media_types, tracks, invoice_lines, playlists, playlist_tracks Columns: artists.id, artists.name, sqlite_sequence.name, sqlite_sequence.seq, albums.id, albums.title, albums.artist_id, employees.id, employees.last_name, employees.first_nam...
SELECT T2.name FROM albums AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id WHERE T1.title = "Balls to the Wall";
Tables: artists, sqlite_sequence, albums, employees, customers, genres, invoices, media_types, tracks, invoice_lines, playlists, playlist_tracks Columns: artists.id, artists.name, sqlite_sequence.name, sqlite_sequence.seq, albums.id, albums.title, albums.artist_id, employees.id, employees.last_name, employees.first_nam...
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;
Tables: artists, sqlite_sequence, albums, employees, customers, genres, invoices, media_types, tracks, invoice_lines, playlists, playlist_tracks Columns: artists.id, artists.name, sqlite_sequence.name, sqlite_sequence.seq, albums.id, albums.title, albums.artist_id, employees.id, employees.last_name, employees.first_nam...
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;
Tables: artists, sqlite_sequence, albums, employees, customers, genres, invoices, media_types, tracks, invoice_lines, playlists, playlist_tracks Columns: artists.id, artists.name, sqlite_sequence.name, sqlite_sequence.seq, albums.id, albums.title, albums.artist_id, employees.id, employees.last_name, employees.first_nam...
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";
Tables: artists, sqlite_sequence, albums, employees, customers, genres, invoices, media_types, tracks, invoice_lines, playlists, playlist_tracks Columns: artists.id, artists.name, sqlite_sequence.name, sqlite_sequence.seq, albums.id, albums.title, albums.artist_id, employees.id, employees.last_name, employees.first_nam...
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";
Tables: artists, sqlite_sequence, albums, employees, customers, genres, invoices, media_types, tracks, invoice_lines, playlists, playlist_tracks Columns: artists.id, artists.name, sqlite_sequence.name, sqlite_sequence.seq, albums.id, albums.title, albums.artist_id, employees.id, employees.last_name, employees.first_nam...
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";
Tables: artists, sqlite_sequence, albums, employees, customers, genres, invoices, media_types, tracks, invoice_lines, playlists, playlist_tracks Columns: artists.id, artists.name, sqlite_sequence.name, sqlite_sequence.seq, albums.id, albums.title, albums.artist_id, employees.id, employees.last_name, employees.first_nam...
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";
Tables: artists, sqlite_sequence, albums, employees, customers, genres, invoices, media_types, tracks, invoice_lines, playlists, playlist_tracks Columns: artists.id, artists.name, sqlite_sequence.name, sqlite_sequence.seq, albums.id, albums.title, albums.artist_id, employees.id, employees.last_name, employees.first_nam...
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";
Tables: artists, sqlite_sequence, albums, employees, customers, genres, invoices, media_types, tracks, invoice_lines, playlists, playlist_tracks Columns: artists.id, artists.name, sqlite_sequence.name, sqlite_sequence.seq, albums.id, albums.title, albums.artist_id, employees.id, employees.last_name, employees.first_nam...
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";
Tables: artists, sqlite_sequence, albums, employees, customers, genres, invoices, media_types, tracks, invoice_lines, playlists, playlist_tracks Columns: artists.id, artists.name, sqlite_sequence.name, sqlite_sequence.seq, albums.id, albums.title, albums.artist_id, employees.id, employees.last_name, employees.first_nam...
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";
Tables: artists, sqlite_sequence, albums, employees, customers, genres, invoices, media_types, tracks, invoice_lines, playlists, playlist_tracks Columns: artists.id, artists.name, sqlite_sequence.name, sqlite_sequence.seq, albums.id, albums.title, albums.artist_id, employees.id, employees.last_name, employees.first_nam...
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";
Tables: artists, sqlite_sequence, albums, employees, customers, genres, invoices, media_types, tracks, invoice_lines, playlists, playlist_tracks Columns: artists.id, artists.name, sqlite_sequence.name, sqlite_sequence.seq, albums.id, albums.title, albums.artist_id, employees.id, employees.last_name, employees.first_nam...
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;
Tables: artists, sqlite_sequence, albums, employees, customers, genres, invoices, media_types, tracks, invoice_lines, playlists, playlist_tracks Columns: artists.id, artists.name, sqlite_sequence.name, sqlite_sequence.seq, albums.id, albums.title, albums.artist_id, employees.id, employees.last_name, employees.first_nam...
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;
Tables: artists, sqlite_sequence, albums, employees, customers, genres, invoices, media_types, tracks, invoice_lines, playlists, playlist_tracks Columns: artists.id, artists.name, sqlite_sequence.name, sqlite_sequence.seq, albums.id, albums.title, albums.artist_id, employees.id, employees.last_name, employees.first_nam...
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";
Tables: artists, sqlite_sequence, albums, employees, customers, genres, invoices, media_types, tracks, invoice_lines, playlists, playlist_tracks Columns: artists.id, artists.name, sqlite_sequence.name, sqlite_sequence.seq, albums.id, albums.title, albums.artist_id, employees.id, employees.last_name, employees.first_nam...
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";
Tables: artists, sqlite_sequence, albums, employees, customers, genres, invoices, media_types, tracks, invoice_lines, playlists, playlist_tracks Columns: artists.id, artists.name, sqlite_sequence.name, sqlite_sequence.seq, albums.id, albums.title, albums.artist_id, employees.id, employees.last_name, employees.first_nam...
SELECT unit_price FROM tracks WHERE name = "Fast As a Shark";
Tables: artists, sqlite_sequence, albums, employees, customers, genres, invoices, media_types, tracks, invoice_lines, playlists, playlist_tracks Columns: artists.id, artists.name, sqlite_sequence.name, sqlite_sequence.seq, albums.id, albums.title, albums.artist_id, employees.id, employees.last_name, employees.first_nam...
SELECT unit_price FROM tracks WHERE name = "Fast As a Shark";
Tables: artists, sqlite_sequence, albums, employees, customers, genres, invoices, media_types, tracks, invoice_lines, playlists, playlist_tracks Columns: artists.id, artists.name, sqlite_sequence.name, sqlite_sequence.seq, albums.id, albums.title, albums.artist_id, employees.id, employees.last_name, employees.first_nam...
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 = ...
Tables: artists, sqlite_sequence, albums, employees, customers, genres, invoices, media_types, tracks, invoice_lines, playlists, playlist_tracks Columns: artists.id, artists.name, sqlite_sequence.name, sqlite_sequence.seq, albums.id, albums.title, albums.artist_id, employees.id, employees.last_name, employees.first_nam...
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 = ...
Tables: artists, sqlite_sequence, albums, employees, customers, genres, invoices, media_types, tracks, invoice_lines, playlists, playlist_tracks Columns: artists.id, artists.name, sqlite_sequence.name, sqlite_sequence.seq, albums.id, albums.title, albums.artist_id, employees.id, employees.last_name, employees.first_nam...
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 ...
Tables: artists, sqlite_sequence, albums, employees, customers, genres, invoices, media_types, tracks, invoice_lines, playlists, playlist_tracks Columns: artists.id, artists.name, sqlite_sequence.name, sqlite_sequence.seq, albums.id, albums.title, albums.artist_id, employees.id, employees.last_name, employees.first_nam...
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 ...
Tables: artists, sqlite_sequence, albums, employees, customers, genres, invoices, media_types, tracks, invoice_lines, playlists, playlist_tracks Columns: artists.id, artists.name, sqlite_sequence.name, sqlite_sequence.seq, albums.id, albums.title, albums.artist_id, employees.id, employees.last_name, employees.first_nam...
SELECT count(*) , T1.name FROM genres AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id GROUP BY T1.name;
Tables: artists, sqlite_sequence, albums, employees, customers, genres, invoices, media_types, tracks, invoice_lines, playlists, playlist_tracks Columns: artists.id, artists.name, sqlite_sequence.name, sqlite_sequence.seq, albums.id, albums.title, albums.artist_id, employees.id, employees.last_name, employees.first_nam...
SELECT count(*) , T1.name FROM genres AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id GROUP BY T1.name;
Tables: journal, editor, journal_committee Columns: journal.Journal_ID, journal.Date, journal.Theme, journal.Sales, editor.Editor_ID, editor.Name, editor.Age, journal_committee.Editor_ID, journal_committee.Journal_ID, journal_committee.Work_Type Question: How many editors are there? [/INST]
SELECT count(*) FROM editor;
Tables: journal, editor, journal_committee Columns: journal.Journal_ID, journal.Date, journal.Theme, journal.Sales, editor.Editor_ID, editor.Name, editor.Age, journal_committee.Editor_ID, journal_committee.Journal_ID, journal_committee.Work_Type Question: List the names of editors in ascending order of age. [/INST]
SELECT Name FROM editor ORDER BY Age ASC;
Tables: journal, editor, journal_committee Columns: journal.Journal_ID, journal.Date, journal.Theme, journal.Sales, editor.Editor_ID, editor.Name, editor.Age, journal_committee.Editor_ID, journal_committee.Journal_ID, journal_committee.Work_Type Question: What are the names and ages of editors? [/INST]
SELECT Name , Age FROM editor;
Tables: journal, editor, journal_committee Columns: journal.Journal_ID, journal.Date, journal.Theme, journal.Sales, editor.Editor_ID, editor.Name, editor.Age, journal_committee.Editor_ID, journal_committee.Journal_ID, journal_committee.Work_Type Question: List the names of editors who are older than 25. [/INST]
SELECT Name FROM editor WHERE Age > 25;
Tables: journal, editor, journal_committee Columns: journal.Journal_ID, journal.Date, journal.Theme, journal.Sales, editor.Editor_ID, editor.Name, editor.Age, journal_committee.Editor_ID, journal_committee.Journal_ID, journal_committee.Work_Type Question: Show the names of editors of age either 24 or 25. [/INST]
SELECT Name FROM editor WHERE Age = 24 OR Age = 25;
Tables: journal, editor, journal_committee Columns: journal.Journal_ID, journal.Date, journal.Theme, journal.Sales, editor.Editor_ID, editor.Name, editor.Age, journal_committee.Editor_ID, journal_committee.Journal_ID, journal_committee.Work_Type Question: What is the name of the youngest editor? [/INST]
SELECT Name FROM editor ORDER BY Age ASC LIMIT 1;
Tables: journal, editor, journal_committee Columns: journal.Journal_ID, journal.Date, journal.Theme, journal.Sales, editor.Editor_ID, editor.Name, editor.Age, journal_committee.Editor_ID, journal_committee.Journal_ID, journal_committee.Work_Type Question: What are the different ages of editors? Show each age along with...
SELECT Age , COUNT(*) FROM editor GROUP BY Age;
Tables: journal, editor, journal_committee Columns: journal.Journal_ID, journal.Date, journal.Theme, journal.Sales, editor.Editor_ID, editor.Name, editor.Age, journal_committee.Editor_ID, journal_committee.Journal_ID, journal_committee.Work_Type Question: Please show the most common age of editors. [/INST]
SELECT Age FROM editor GROUP BY Age ORDER BY COUNT(*) DESC LIMIT 1;
Tables: journal, editor, journal_committee Columns: journal.Journal_ID, journal.Date, journal.Theme, journal.Sales, editor.Editor_ID, editor.Name, editor.Age, journal_committee.Editor_ID, journal_committee.Journal_ID, journal_committee.Work_Type Question: Show the distinct themes of journals. [/INST]
SELECT DISTINCT Theme FROM journal;
Tables: journal, editor, journal_committee Columns: journal.Journal_ID, journal.Date, journal.Theme, journal.Sales, editor.Editor_ID, editor.Name, editor.Age, journal_committee.Editor_ID, journal_committee.Journal_ID, journal_committee.Work_Type Question: Show the names of editors and the theme of journals for which th...
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;
Tables: journal, editor, journal_committee Columns: journal.Journal_ID, journal.Date, journal.Theme, journal.Sales, editor.Editor_ID, editor.Name, editor.Age, journal_committee.Editor_ID, journal_committee.Journal_ID, journal_committee.Work_Type Question: For each journal_committee, find the editor name and the journal...
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;
Tables: journal, editor, journal_committee Columns: journal.Journal_ID, journal.Date, journal.Theme, journal.Sales, editor.Editor_ID, editor.Name, editor.Age, journal_committee.Editor_ID, journal_committee.Journal_ID, journal_committee.Work_Type Question: Show the names and ages of editors and the theme of journals for...
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;
Tables: journal, editor, journal_committee Columns: journal.Journal_ID, journal.Date, journal.Theme, journal.Sales, editor.Editor_ID, editor.Name, editor.Age, journal_committee.Editor_ID, journal_committee.Journal_ID, journal_committee.Work_Type Question: Show the names of editors that are on the committee of journals ...
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;
Tables: journal, editor, journal_committee Columns: journal.Journal_ID, journal.Date, journal.Theme, journal.Sales, editor.Editor_ID, editor.Name, editor.Age, journal_committee.Editor_ID, journal_committee.Journal_ID, journal_committee.Work_Type Question: Show the id, name of each editor and the number of journal commi...
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;
Tables: journal, editor, journal_committee Columns: journal.Journal_ID, journal.Date, journal.Theme, journal.Sales, editor.Editor_ID, editor.Name, editor.Age, journal_committee.Editor_ID, journal_committee.Journal_ID, journal_committee.Work_Type Question: Show the names of editors that are on at least two journal commi...
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;
Tables: journal, editor, journal_committee Columns: journal.Journal_ID, journal.Date, journal.Theme, journal.Sales, editor.Editor_ID, editor.Name, editor.Age, journal_committee.Editor_ID, journal_committee.Journal_ID, journal_committee.Work_Type Question: 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);
Tables: journal, editor, journal_committee Columns: journal.Journal_ID, journal.Date, journal.Theme, journal.Sales, editor.Editor_ID, editor.Name, editor.Age, journal_committee.Editor_ID, journal_committee.Journal_ID, journal_committee.Work_Type Question: List the date, theme and sales of the journal which did not have...
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;
Tables: journal, editor, journal_committee Columns: journal.Journal_ID, journal.Date, journal.Theme, journal.Sales, editor.Editor_ID, editor.Name, editor.Age, journal_committee.Editor_ID, journal_committee.Journal_ID, journal_committee.Work_Type Question: What is the average sales of the journals that have an editor wh...
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';
Tables: Accounts, Customers, Customers_Cards, Financial_Transactions Columns: Accounts.account_id, Accounts.customer_id, Accounts.account_name, Accounts.other_account_details, Customers.customer_id, Customers.customer_first_name, Customers.customer_last_name, Customers.customer_address, Customers.customer_phone, Custom...
SELECT count(*) FROM Accounts;
Tables: Accounts, Customers, Customers_Cards, Financial_Transactions Columns: Accounts.account_id, Accounts.customer_id, Accounts.account_name, Accounts.other_account_details, Customers.customer_id, Customers.customer_first_name, Customers.customer_last_name, Customers.customer_address, Customers.customer_phone, Custom...
SELECT count(*) FROM Accounts;
Tables: Accounts, Customers, Customers_Cards, Financial_Transactions Columns: Accounts.account_id, Accounts.customer_id, Accounts.account_name, Accounts.other_account_details, Customers.customer_id, Customers.customer_first_name, Customers.customer_last_name, Customers.customer_address, Customers.customer_phone, Custom...
SELECT account_id , customer_id , account_name FROM Accounts;
Tables: Accounts, Customers, Customers_Cards, Financial_Transactions Columns: Accounts.account_id, Accounts.customer_id, Accounts.account_name, Accounts.other_account_details, Customers.customer_id, Customers.customer_first_name, Customers.customer_last_name, Customers.customer_address, Customers.customer_phone, Custom...
SELECT account_id , customer_id , account_name FROM Accounts;
Tables: Accounts, Customers, Customers_Cards, Financial_Transactions Columns: Accounts.account_id, Accounts.customer_id, Accounts.account_name, Accounts.other_account_details, Customers.customer_id, Customers.customer_first_name, Customers.customer_last_name, Customers.customer_address, Customers.customer_phone, Custom...
SELECT other_account_details FROM Accounts WHERE account_name = "338";
Tables: Accounts, Customers, Customers_Cards, Financial_Transactions Columns: Accounts.account_id, Accounts.customer_id, Accounts.account_name, Accounts.other_account_details, Customers.customer_id, Customers.customer_first_name, Customers.customer_last_name, Customers.customer_address, Customers.customer_phone, Custom...
SELECT other_account_details FROM Accounts WHERE account_name = "338";
Tables: Accounts, Customers, Customers_Cards, Financial_Transactions Columns: Accounts.account_id, Accounts.customer_id, Accounts.account_name, Accounts.other_account_details, Customers.customer_id, Customers.customer_first_name, Customers.customer_last_name, Customers.customer_address, Customers.customer_phone, Custom...
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";
Tables: Accounts, Customers, Customers_Cards, Financial_Transactions Columns: Accounts.account_id, Accounts.customer_id, Accounts.account_name, Accounts.other_account_details, Customers.customer_id, Customers.customer_first_name, Customers.customer_last_name, Customers.customer_address, Customers.customer_phone, Custom...
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";
Tables: Accounts, Customers, Customers_Cards, Financial_Transactions Columns: Accounts.account_id, Accounts.customer_id, Accounts.account_name, Accounts.other_account_details, Customers.customer_id, Customers.customer_first_name, Customers.customer_last_name, Customers.customer_address, Customers.customer_phone, Custom...
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";
Tables: Accounts, Customers, Customers_Cards, Financial_Transactions Columns: Accounts.account_id, Accounts.customer_id, Accounts.account_name, Accounts.other_account_details, Customers.customer_id, Customers.customer_first_name, Customers.customer_last_name, Customers.customer_address, Customers.customer_phone, Custom...
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";
Tables: Accounts, Customers, Customers_Cards, Financial_Transactions Columns: Accounts.account_id, Accounts.customer_id, Accounts.account_name, Accounts.other_account_details, Customers.customer_id, Customers.customer_first_name, Customers.customer_last_name, Customers.customer_address, Customers.customer_phone, Custom...
SELECT customer_id , count(*) FROM Accounts GROUP BY customer_id;
Tables: Accounts, Customers, Customers_Cards, Financial_Transactions Columns: Accounts.account_id, Accounts.customer_id, Accounts.account_name, Accounts.other_account_details, Customers.customer_id, Customers.customer_first_name, Customers.customer_last_name, Customers.customer_address, Customers.customer_phone, Custom...
SELECT customer_id , count(*) FROM Accounts GROUP BY customer_id;
Tables: Accounts, Customers, Customers_Cards, Financial_Transactions Columns: Accounts.account_id, Accounts.customer_id, Accounts.account_name, Accounts.other_account_details, Customers.customer_id, Customers.customer_first_name, Customers.customer_last_name, Customers.customer_address, Customers.customer_phone, Custom...
SELECT customer_id , count(*) FROM Accounts GROUP BY customer_id ORDER BY count(*) DESC LIMIT 1;
Tables: Accounts, Customers, Customers_Cards, Financial_Transactions Columns: Accounts.account_id, Accounts.customer_id, Accounts.account_name, Accounts.other_account_details, Customers.customer_id, Customers.customer_first_name, Customers.customer_last_name, Customers.customer_address, Customers.customer_phone, Custom...
SELECT customer_id , count(*) FROM Accounts GROUP BY customer_id ORDER BY count(*) DESC LIMIT 1;
Tables: Accounts, Customers, Customers_Cards, Financial_Transactions Columns: Accounts.account_id, Accounts.customer_id, Accounts.account_name, Accounts.other_account_details, Customers.customer_id, Customers.customer_first_name, Customers.customer_last_name, Customers.customer_address, Customers.customer_phone, Custom...
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;
Tables: Accounts, Customers, Customers_Cards, Financial_Transactions Columns: Accounts.account_id, Accounts.customer_id, Accounts.account_name, Accounts.other_account_details, Customers.customer_id, Customers.customer_first_name, Customers.customer_last_name, Customers.customer_address, Customers.customer_phone, Custom...
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;
Tables: Accounts, Customers, Customers_Cards, Financial_Transactions Columns: Accounts.account_id, Accounts.customer_id, Accounts.account_name, Accounts.other_account_details, Customers.customer_id, Customers.customer_first_name, Customers.customer_last_name, Customers.customer_address, Customers.customer_phone, Custom...
SELECT count(*) FROM Customers WHERE customer_id NOT IN (SELECT customer_id FROM Accounts);
Tables: Accounts, Customers, Customers_Cards, Financial_Transactions Columns: Accounts.account_id, Accounts.customer_id, Accounts.account_name, Accounts.other_account_details, Customers.customer_id, Customers.customer_first_name, Customers.customer_last_name, Customers.customer_address, Customers.customer_phone, Custom...
SELECT count(*) FROM Customers WHERE customer_id NOT IN (SELECT customer_id FROM Accounts);
Tables: Accounts, Customers, Customers_Cards, Financial_Transactions Columns: Accounts.account_id, Accounts.customer_id, Accounts.account_name, Accounts.other_account_details, Customers.customer_id, Customers.customer_first_name, Customers.customer_last_name, Customers.customer_address, Customers.customer_phone, Custom...
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;
Tables: Accounts, Customers, Customers_Cards, Financial_Transactions Columns: Accounts.account_id, Accounts.customer_id, Accounts.account_name, Accounts.other_account_details, Customers.customer_id, Customers.customer_first_name, Customers.customer_last_name, Customers.customer_address, Customers.customer_phone, Custom...
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;
Tables: Accounts, Customers, Customers_Cards, Financial_Transactions Columns: Accounts.account_id, Accounts.customer_id, Accounts.account_name, Accounts.other_account_details, Customers.customer_id, Customers.customer_first_name, Customers.customer_last_name, Customers.customer_address, Customers.customer_phone, Custom...
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;
Tables: Accounts, Customers, Customers_Cards, Financial_Transactions Columns: Accounts.account_id, Accounts.customer_id, Accounts.account_name, Accounts.other_account_details, Customers.customer_id, Customers.customer_first_name, Customers.customer_last_name, Customers.customer_address, Customers.customer_phone, Custom...
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;
Tables: Accounts, Customers, Customers_Cards, Financial_Transactions Columns: Accounts.account_id, Accounts.customer_id, Accounts.account_name, Accounts.other_account_details, Customers.customer_id, Customers.customer_first_name, Customers.customer_last_name, Customers.customer_address, Customers.customer_phone, Custom...
SELECT count(DISTINCT customer_id) FROM Accounts;
Tables: Accounts, Customers, Customers_Cards, Financial_Transactions Columns: Accounts.account_id, Accounts.customer_id, Accounts.account_name, Accounts.other_account_details, Customers.customer_id, Customers.customer_first_name, Customers.customer_last_name, Customers.customer_address, Customers.customer_phone, Custom...
SELECT count(DISTINCT customer_id) FROM Accounts;
Tables: Accounts, Customers, Customers_Cards, Financial_Transactions Columns: Accounts.account_id, Accounts.customer_id, Accounts.account_name, Accounts.other_account_details, Customers.customer_id, Customers.customer_first_name, Customers.customer_last_name, Customers.customer_address, Customers.customer_phone, Custom...
SELECT count(*) FROM Customers;
Tables: Accounts, Customers, Customers_Cards, Financial_Transactions Columns: Accounts.account_id, Accounts.customer_id, Accounts.account_name, Accounts.other_account_details, Customers.customer_id, Customers.customer_first_name, Customers.customer_last_name, Customers.customer_address, Customers.customer_phone, Custom...
SELECT count(*) FROM Customers;
Tables: Accounts, Customers, Customers_Cards, Financial_Transactions Columns: Accounts.account_id, Accounts.customer_id, Accounts.account_name, Accounts.other_account_details, Customers.customer_id, Customers.customer_first_name, Customers.customer_last_name, Customers.customer_address, Customers.customer_phone, Custom...
SELECT customer_id , customer_first_name , customer_last_name , customer_phone FROM Customers;
Tables: Accounts, Customers, Customers_Cards, Financial_Transactions Columns: Accounts.account_id, Accounts.customer_id, Accounts.account_name, Accounts.other_account_details, Customers.customer_id, Customers.customer_first_name, Customers.customer_last_name, Customers.customer_address, Customers.customer_phone, Custom...
SELECT customer_id , customer_first_name , customer_last_name , customer_phone FROM Customers;
Tables: Accounts, Customers, Customers_Cards, Financial_Transactions Columns: Accounts.account_id, Accounts.customer_id, Accounts.account_name, Accounts.other_account_details, Customers.customer_id, Customers.customer_first_name, Customers.customer_last_name, Customers.customer_address, Customers.customer_phone, Custom...
SELECT customer_phone , customer_email FROM Customers WHERE customer_first_name = "Aniyah" AND customer_last_name = "Feest";
Tables: Accounts, Customers, Customers_Cards, Financial_Transactions Columns: Accounts.account_id, Accounts.customer_id, Accounts.account_name, Accounts.other_account_details, Customers.customer_id, Customers.customer_first_name, Customers.customer_last_name, Customers.customer_address, Customers.customer_phone, Custom...
SELECT customer_phone , customer_email FROM Customers WHERE customer_first_name = "Aniyah" AND customer_last_name = "Feest";
Tables: Accounts, Customers, Customers_Cards, Financial_Transactions Columns: Accounts.account_id, Accounts.customer_id, Accounts.account_name, Accounts.other_account_details, Customers.customer_id, Customers.customer_first_name, Customers.customer_last_name, Customers.customer_address, Customers.customer_phone, Custom...
SELECT count(*) FROM Customers_cards;
Tables: Accounts, Customers, Customers_Cards, Financial_Transactions Columns: Accounts.account_id, Accounts.customer_id, Accounts.account_name, Accounts.other_account_details, Customers.customer_id, Customers.customer_first_name, Customers.customer_last_name, Customers.customer_address, Customers.customer_phone, Custom...
SELECT count(*) FROM Customers_cards;
Tables: Accounts, Customers, Customers_Cards, Financial_Transactions Columns: Accounts.account_id, Accounts.customer_id, Accounts.account_name, Accounts.other_account_details, Customers.customer_id, Customers.customer_first_name, Customers.customer_last_name, Customers.customer_address, Customers.customer_phone, Custom...
SELECT card_id , customer_id , card_type_code , card_number FROM Customers_cards;