prompt stringlengths 155 8.09k | answer stringlengths 18 577 |
|---|---|
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:What si the youngest employee's first and last name?, schema:Create Tables********************************************************************************/CREATE TABLE artists( id INTEGER PRIMARY KE... | SELECT first_name , last_name FROM employees ORDER BY birth_date DESC LIMIT 1; |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:List top 10 employee work longest in the company. List employee's first and last name., schema:Create Tables********************************************************************************/CREATE TABLE... | SELECT first_name , last_name FROM employees ORDER BY hire_date ASC LIMIT 10; |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:What are the first and last names of the top 10 longest-serving employees?, schema:Create Tables********************************************************************************/CREATE TABLE artists( ... | SELECT first_name , last_name FROM employees ORDER BY hire_date ASC LIMIT 10; |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:Find the number of employees whose title is IT Staff from each city?, schema:Create Tables********************************************************************************/CREATE TABLE artists( id IN... | SELECT count(*) , city FROM employees WHERE title = 'IT Staff' GROUP BY city |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:How many employees who are IT staff are from each city?, schema:Create Tables********************************************************************************/CREATE TABLE artists( id INTEGER PRIMARY... | SELECT count(*) , city FROM employees WHERE title = 'IT Staff' GROUP BY city |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:Which employee manage most number of peoples? List employee's first and last name, and number of people report to that employee., schema:Create Tables***************************************************... | 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; |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:What are the first and last names of all the employees and how many people report to them?, schema:Create Tables********************************************************************************/CREATE T... | 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; |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:How many orders does Lucas Mancini has?, schema:Create Tables********************************************************************************/CREATE TABLE artists( id INTEGER PRIMARY KEY AUTOINCREME... | 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"; |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:How many orders does Luca Mancini have in his invoices?, schema:Create Tables********************************************************************************/CREATE TABLE artists( id INTEGER PRIMARY... | 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"; |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:What is the total amount of money spent by Lucas Mancini?, schema:Create Tables********************************************************************************/CREATE TABLE artists( id INTEGER PRIMA... | 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"; |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:How much money did Lucas Mancini spend?, schema:Create Tables********************************************************************************/CREATE TABLE artists( id INTEGER PRIMARY KEY AUTOINCREME... | 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"; |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:List all media types., schema:Create Tables********************************************************************************/CREATE TABLE artists( id INTEGER PRIMARY KEY AUTOINCREMENT, name VARCHA... | SELECT name FROM media_types; |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:What are the names of all the media types?, schema:Create Tables********************************************************************************/CREATE TABLE artists( id INTEGER PRIMARY KEY AUTOINCR... | SELECT name FROM media_types; |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:List all different genre types., schema:Create Tables********************************************************************************/CREATE TABLE artists( id INTEGER PRIMARY KEY AUTOINCREMENT, n... | SELECT DISTINCT name FROM genres; |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:What are the different names of the genres?, schema:Create Tables********************************************************************************/CREATE TABLE artists( id INTEGER PRIMARY KEY AUTOINC... | SELECT DISTINCT name FROM genres; |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:List the name of all playlist., schema:Create Tables********************************************************************************/CREATE TABLE artists( id INTEGER PRIMARY KEY AUTOINCREMENT, na... | SELECT name FROM playlists; |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:What are the names of all the playlists?, schema:Create Tables********************************************************************************/CREATE TABLE artists( id INTEGER PRIMARY KEY AUTOINCREM... | SELECT name FROM playlists; |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:Who is the composer of track Fast As a Shark?, schema:Create Tables********************************************************************************/CREATE TABLE artists( id INTEGER PRIMARY KEY AUTOI... | SELECT composer FROM tracks WHERE name = "Fast As a Shark"; |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:What is the composer who created the track "Fast As a Shark"?, schema:Create Tables********************************************************************************/CREATE TABLE artists( id INTEGER P... | SELECT composer FROM tracks WHERE name = "Fast As a Shark"; |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:How long does track Fast As a Shark has?, schema:Create Tables********************************************************************************/CREATE TABLE artists( id INTEGER PRIMARY KEY AUTOINCREM... | SELECT milliseconds FROM tracks WHERE name = "Fast As a Shark"; |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:How many milliseconds long is Fast As a Shark?, schema:Create Tables********************************************************************************/CREATE TABLE artists( id INTEGER PRIMARY KEY AUTO... | SELECT milliseconds FROM tracks WHERE name = "Fast As a Shark"; |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:What is the name of tracks whose genre is Rock?, schema:Create Tables********************************************************************************/CREATE TABLE artists( id INTEGER PRIMARY KEY AUT... | SELECT T2.name FROM genres AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id WHERE T1.name = "Rock"; |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:What is the name of all tracks in the Rock genre?, schema:Create Tables********************************************************************************/CREATE TABLE artists( id INTEGER PRIMARY KEY A... | SELECT T2.name FROM genres AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id WHERE T1.name = "Rock"; |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:What is title of album which track Balls to the Wall belongs to?, schema:Create Tables********************************************************************************/CREATE TABLE artists( id INTEGE... | SELECT T1.title FROM albums AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id WHERE T2.name = "Balls to the Wall"; |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:What is the name of the album that has the track Ball to the Wall?, schema:Create Tables********************************************************************************/CREATE TABLE artists( id INTE... | SELECT T1.title FROM albums AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id WHERE T2.name = "Balls to the Wall"; |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:List name of all tracks in Balls to the Wall., schema:Create Tables********************************************************************************/CREATE TABLE artists( id INTEGER PRIMARY KEY AUTOI... | SELECT T2.name FROM albums AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id WHERE T1.title = "Balls to the Wall"; |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:What is the name of all tracks in the album named Balls to the Wall?, schema:Create Tables********************************************************************************/CREATE TABLE artists( id IN... | SELECT T2.name FROM albums AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id WHERE T1.title = "Balls to the Wall"; |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:List title of albums have the number of tracks greater than 10., schema:Create Tables********************************************************************************/CREATE TABLE artists( id INTEGER... | 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; |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:What are the names of the albums that have more than 10 tracks?, schema:Create Tables********************************************************************************/CREATE TABLE artists( id INTEGER... | 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; |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:List the name of tracks belongs to genre Rock and whose media type is MPEG audio file., schema:Create Tables********************************************************************************/CREATE TABLE... | 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"; |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:What are the names of all Rock tracks that are stored on MPEG audio files?, schema:Create Tables********************************************************************************/CREATE TABLE artists( ... | 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"; |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:List the name of tracks belongs to genre Rock or media type is MPEG audio file., schema:Create Tables********************************************************************************/CREATE TABLE artist... | 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"; |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:What are the names of all tracks that belong to the Rock genre and whose media type is MPEG?, schema:Create Tables********************************************************************************/CREATE... | 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"; |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:List the name of tracks belongs to genre Rock or genre Jazz., schema:Create Tables********************************************************************************/CREATE TABLE artists( id INTEGER PR... | 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" |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:What are the names of the tracks that are Rock or Jazz songs?, schema:Create Tables********************************************************************************/CREATE TABLE artists( id INTEGER P... | 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" |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:List the name of all tracks in the playlists of Movies., schema:Create Tables********************************************************************************/CREATE TABLE artists( id INTEGER PRIMARY... | 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"; |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:What are the names of all tracks that are on playlists titled Movies?, schema:Create Tables********************************************************************************/CREATE TABLE artists( id I... | 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"; |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:List the name of playlist which has number of tracks greater than 100., schema:Create Tables********************************************************************************/CREATE TABLE artists( id ... | 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; |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:What are the names of all playlists that have more than 100 tracks?, schema:Create Tables********************************************************************************/CREATE TABLE artists( id INT... | 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; |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:List all tracks bought by customer Daan Peeters., schema:Create Tables********************************************************************************/CREATE TABLE artists( id INTEGER PRIMARY KEY AU... | 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"; |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:What are the tracks that Dean Peeters bought?, schema:Create Tables********************************************************************************/CREATE TABLE artists( id INTEGER PRIMARY KEY AUTOI... | 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"; |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:How much is the track Fast As a Shark?, schema:Create Tables********************************************************************************/CREATE TABLE artists( id INTEGER PRIMARY KEY AUTOINCREMEN... | SELECT unit_price FROM tracks WHERE name = "Fast As a Shark"; |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:What is the unit price of the tune "Fast As a Shark"?, schema:Create Tables********************************************************************************/CREATE TABLE artists( id INTEGER PRIMARY K... | SELECT unit_price FROM tracks WHERE name = "Fast As a Shark"; |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:Find the name of tracks which are in Movies playlist but not in music playlist., schema:Create Tables********************************************************************************/CREATE TABLE artist... | 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 = ... |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:What are the names of all tracks that are on the Movies playlist but not in the music playlist?, schema:Create Tables********************************************************************************/CRE... | 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 = ... |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:Find the name of tracks which are in both Movies and music playlists., schema:Create Tables********************************************************************************/CREATE TABLE artists( id I... | 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 ... |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:What are the names of all the tracks that are in both the Movies and music playlists?, schema:Create Tables********************************************************************************/CREATE TABLE ... | 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 ... |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:Find number of tracks in each genre?, schema:Create Tables********************************************************************************/CREATE TABLE artists( id INTEGER PRIMARY KEY AUTOINCREMENT,... | SELECT count(*) , T1.name FROM genres AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id GROUP BY T1.name; |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:How many tracks are in each genre?, schema:Create Tables********************************************************************************/CREATE TABLE artists( id INTEGER PRIMARY KEY AUTOINCREMENT, ... | SELECT count(*) , T1.name FROM genres AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id GROUP BY T1.name; |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:How many editors are there?, schema:CREATE TABLE IF NOT EXISTS "journal" ("Journal_ID" int,"Date" text,"Theme" text,"Sales" int,PRIMARY KEY ("Journal_ID")); CREATE TABLE IF NOT EXISTS "editor" ("Editor... | SELECT count(*) FROM editor |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:List the names of editors in ascending order of age., schema:CREATE TABLE IF NOT EXISTS "journal" ("Journal_ID" int,"Date" text,"Theme" text,"Sales" int,PRIMARY KEY ("Journal_ID")); CREATE TABLE IF NOT... | SELECT Name FROM editor ORDER BY Age ASC |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:What are the names and ages of editors?, schema:CREATE TABLE IF NOT EXISTS "journal" ("Journal_ID" int,"Date" text,"Theme" text,"Sales" int,PRIMARY KEY ("Journal_ID")); CREATE TABLE IF NOT EXISTS "edit... | SELECT Name , Age FROM editor |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:List the names of editors who are older than 25., schema:CREATE TABLE IF NOT EXISTS "journal" ("Journal_ID" int,"Date" text,"Theme" text,"Sales" int,PRIMARY KEY ("Journal_ID")); CREATE TABLE IF NOT EXI... | SELECT Name FROM editor WHERE Age > 25 |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:Show the names of editors of age either 24 or 25., schema:CREATE TABLE IF NOT EXISTS "journal" ("Journal_ID" int,"Date" text,"Theme" text,"Sales" int,PRIMARY KEY ("Journal_ID")); CREATE TABLE IF NOT EX... | SELECT Name FROM editor WHERE Age = 24 OR Age = 25 |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:What is the name of the youngest editor?, schema:CREATE TABLE IF NOT EXISTS "journal" ("Journal_ID" int,"Date" text,"Theme" text,"Sales" int,PRIMARY KEY ("Journal_ID")); CREATE TABLE IF NOT EXISTS "edi... | SELECT Name FROM editor ORDER BY Age ASC LIMIT 1 |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:What are the different ages of editors? Show each age along with the number of editors of that age., schema:CREATE TABLE IF NOT EXISTS "journal" ("Journal_ID" int,"Date" text,"Theme" text,"Sales" int,P... | SELECT Age , COUNT(*) FROM editor GROUP BY Age |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:Please show the most common age of editors., schema:CREATE TABLE IF NOT EXISTS "journal" ("Journal_ID" int,"Date" text,"Theme" text,"Sales" int,PRIMARY KEY ("Journal_ID")); CREATE TABLE IF NOT EXISTS "... | SELECT Age FROM editor GROUP BY Age ORDER BY COUNT(*) DESC LIMIT 1 |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:Show the distinct themes of journals., schema:CREATE TABLE IF NOT EXISTS "journal" ("Journal_ID" int,"Date" text,"Theme" text,"Sales" int,PRIMARY KEY ("Journal_ID")); CREATE TABLE IF NOT EXISTS "editor... | SELECT DISTINCT Theme FROM journal |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:Show the names of editors and the theme of journals for which they serve on committees., schema:CREATE TABLE IF NOT EXISTS "journal" ("Journal_ID" int,"Date" text,"Theme" text,"Sales" int,PRIMARY KEY (... | 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 |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:For each journal_committee, find the editor name and the journal theme., schema:CREATE TABLE IF NOT EXISTS "journal" ("Journal_ID" int,"Date" text,"Theme" text,"Sales" int,PRIMARY KEY ("Journal_ID")); ... | SELECT T2.Name , T3.Theme FROM journal_committee AS T1 JOIN editor AS T2 ON T1.Editor_ID = T2.Editor_ID JOIN journal AS T3 ON T1.Journal_ID = T3.Journal_ID |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:Show the names and ages of editors and the theme of journals for which they serve on committees, in ascending alphabetical order of theme., schema:CREATE TABLE IF NOT EXISTS "journal" ("Journal_ID" int... | 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 |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:Show the names of editors that are on the committee of journals with sales bigger than 3000., schema:CREATE TABLE IF NOT EXISTS "journal" ("Journal_ID" int,"Date" text,"Theme" text,"Sales" int,PRIMARY ... | 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 |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:Show the id, name of each editor and the number of journal committees they are on., schema:CREATE TABLE IF NOT EXISTS "journal" ("Journal_ID" int,"Date" text,"Theme" text,"Sales" int,PRIMARY KEY ("Jour... | 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 |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:Show the names of editors that are on at least two journal committees., schema:CREATE TABLE IF NOT EXISTS "journal" ("Journal_ID" int,"Date" text,"Theme" text,"Sales" int,PRIMARY KEY ("Journal_ID")); C... | 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 |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:List the names of editors that are not on any journal committee., schema:CREATE TABLE IF NOT EXISTS "journal" ("Journal_ID" int,"Date" text,"Theme" text,"Sales" int,PRIMARY KEY ("Journal_ID")); CREATE ... | SELECT Name FROM editor WHERE editor_id NOT IN (SELECT editor_id FROM journal_committee) |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:List the date, theme and sales of the journal which did not have any of the listed editors serving on committee., schema:CREATE TABLE IF NOT EXISTS "journal" ("Journal_ID" int,"Date" text,"Theme" text,... | 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 |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:What is the average sales of the journals that have an editor whose work type is 'Photo'?, schema:CREATE TABLE IF NOT EXISTS "journal" ("Journal_ID" int,"Date" text,"Theme" text,"Sales" int,PRIMARY KEY... | 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' |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:How many accounts do we have?, schema:CREATE TABLE `Accounts` (`account_id` INTEGER PRIMARY KEY,`customer_id` INTEGER NOT NULL,`account_name` VARCHAR(50),`other_account_details` VARCHAR(255)); CREATE T... | SELECT count(*) FROM Accounts |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:Count the number of accounts., schema:CREATE TABLE `Accounts` (`account_id` INTEGER PRIMARY KEY,`customer_id` INTEGER NOT NULL,`account_name` VARCHAR(50),`other_account_details` VARCHAR(255)); CREATE T... | SELECT count(*) FROM Accounts |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:Show ids, customer ids, names for all accounts., schema:CREATE TABLE `Accounts` (`account_id` INTEGER PRIMARY KEY,`customer_id` INTEGER NOT NULL,`account_name` VARCHAR(50),`other_account_details` VARCH... | SELECT account_id , customer_id , account_name FROM Accounts |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:What are the account ids, customer ids, and account names for all the accounts?, schema:CREATE TABLE `Accounts` (`account_id` INTEGER PRIMARY KEY,`customer_id` INTEGER NOT NULL,`account_name` VARCHAR(5... | SELECT account_id , customer_id , account_name FROM Accounts |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:Show other account details for account with name 338., schema:CREATE TABLE `Accounts` (`account_id` INTEGER PRIMARY KEY,`customer_id` INTEGER NOT NULL,`account_name` VARCHAR(50),`other_account_details`... | SELECT other_account_details FROM Accounts WHERE account_name = "338" |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:What are the other account details for the account with the name 338?, schema:CREATE TABLE `Accounts` (`account_id` INTEGER PRIMARY KEY,`customer_id` INTEGER NOT NULL,`account_name` VARCHAR(50),`other_... | SELECT other_account_details FROM Accounts WHERE account_name = "338" |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:What is the first name, last name, and phone of the customer with account name 162?, schema:CREATE TABLE `Accounts` (`account_id` INTEGER PRIMARY KEY,`customer_id` INTEGER NOT NULL,`account_name` VARCH... | 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" |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:Give the full name and phone of the customer who has the account name 162., schema:CREATE TABLE `Accounts` (`account_id` INTEGER PRIMARY KEY,`customer_id` INTEGER NOT NULL,`account_name` VARCHAR(50),`o... | 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" |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:How many accounts does the customer with first name Art and last name Turcotte have?, schema:CREATE TABLE `Accounts` (`account_id` INTEGER PRIMARY KEY,`customer_id` INTEGER NOT NULL,`account_name` VARC... | 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" |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:Return the number of accounts that the customer with the first name Art and last name Turcotte has., schema:CREATE TABLE `Accounts` (`account_id` INTEGER PRIMARY KEY,`customer_id` INTEGER NOT NULL,`acc... | 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" |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:Show all customer ids and the number of accounts for each customer., schema:CREATE TABLE `Accounts` (`account_id` INTEGER PRIMARY KEY,`customer_id` INTEGER NOT NULL,`account_name` VARCHAR(50),`other_ac... | SELECT customer_id , count(*) FROM Accounts GROUP BY customer_id |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:How many accounts are there for each customer id?, schema:CREATE TABLE `Accounts` (`account_id` INTEGER PRIMARY KEY,`customer_id` INTEGER NOT NULL,`account_name` VARCHAR(50),`other_account_details` VAR... | SELECT customer_id , count(*) FROM Accounts GROUP BY customer_id |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:Show the customer id and number of accounts with most accounts., schema:CREATE TABLE `Accounts` (`account_id` INTEGER PRIMARY KEY,`customer_id` INTEGER NOT NULL,`account_name` VARCHAR(50),`other_accoun... | SELECT customer_id , count(*) FROM Accounts GROUP BY customer_id ORDER BY count(*) DESC LIMIT 1 |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:What is the customer id of the customer with the most accounts, and how many accounts does this person have?, schema:CREATE TABLE `Accounts` (`account_id` INTEGER PRIMARY KEY,`customer_id` INTEGER NOT ... | SELECT customer_id , count(*) FROM Accounts GROUP BY customer_id ORDER BY count(*) DESC LIMIT 1 |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:What is the customer first, last name and id with least number of accounts., schema:CREATE TABLE `Accounts` (`account_id` INTEGER PRIMARY KEY,`customer_id` INTEGER NOT NULL,`account_name` VARCHAR(50),`... | 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 |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:Give the full name and customer id of the customer with the fewest accounts., schema:CREATE TABLE `Accounts` (`account_id` INTEGER PRIMARY KEY,`customer_id` INTEGER NOT NULL,`account_name` VARCHAR(50),... | 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 |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:Show the number of all customers without an account., schema:CREATE TABLE `Accounts` (`account_id` INTEGER PRIMARY KEY,`customer_id` INTEGER NOT NULL,`account_name` VARCHAR(50),`other_account_details` ... | SELECT count(*) FROM Customers WHERE customer_id NOT IN (SELECT customer_id FROM Accounts) |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:How many customers do not have an account?, schema:CREATE TABLE `Accounts` (`account_id` INTEGER PRIMARY KEY,`customer_id` INTEGER NOT NULL,`account_name` VARCHAR(50),`other_account_details` VARCHAR(25... | SELECT count(*) FROM Customers WHERE customer_id NOT IN (SELECT customer_id FROM Accounts) |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:Show the first names and last names of customers without any account., schema:CREATE TABLE `Accounts` (`account_id` INTEGER PRIMARY KEY,`customer_id` INTEGER NOT NULL,`account_name` VARCHAR(50),`other_... | 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 |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:What are the full names of customers who do not have any accounts?, schema:CREATE TABLE `Accounts` (`account_id` INTEGER PRIMARY KEY,`customer_id` INTEGER NOT NULL,`account_name` VARCHAR(50),`other_acc... | 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 |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:Show distinct first and last names for all customers with an account., schema:CREATE TABLE `Accounts` (`account_id` INTEGER PRIMARY KEY,`customer_id` INTEGER NOT NULL,`account_name` VARCHAR(50),`other_... | 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 |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:What are the full names of customers who have accounts?, schema:CREATE TABLE `Accounts` (`account_id` INTEGER PRIMARY KEY,`customer_id` INTEGER NOT NULL,`account_name` VARCHAR(50),`other_account_detail... | 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 |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:How many customers have an account?, schema:CREATE TABLE `Accounts` (`account_id` INTEGER PRIMARY KEY,`customer_id` INTEGER NOT NULL,`account_name` VARCHAR(50),`other_account_details` VARCHAR(255)); CR... | SELECT count(DISTINCT customer_id) FROM Accounts |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:Count the number of customers who hold an account., schema:CREATE TABLE `Accounts` (`account_id` INTEGER PRIMARY KEY,`customer_id` INTEGER NOT NULL,`account_name` VARCHAR(50),`other_account_details` VA... | SELECT count(DISTINCT customer_id) FROM Accounts |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:How many customers do we have?, schema:CREATE TABLE `Accounts` (`account_id` INTEGER PRIMARY KEY,`customer_id` INTEGER NOT NULL,`account_name` VARCHAR(50),`other_account_details` VARCHAR(255)); CREATE ... | SELECT count(*) FROM Customers |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:Count the number of customers., schema:CREATE TABLE `Accounts` (`account_id` INTEGER PRIMARY KEY,`customer_id` INTEGER NOT NULL,`account_name` VARCHAR(50),`other_account_details` VARCHAR(255)); CREATE ... | SELECT count(*) FROM Customers |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:Show ids, first names, last names, and phones for all customers., schema:CREATE TABLE `Accounts` (`account_id` INTEGER PRIMARY KEY,`customer_id` INTEGER NOT NULL,`account_name` VARCHAR(50),`other_accou... | SELECT customer_id , customer_first_name , customer_last_name , customer_phone FROM Customers |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:What are the ids, full names, and phones of each customer?, schema:CREATE TABLE `Accounts` (`account_id` INTEGER PRIMARY KEY,`customer_id` INTEGER NOT NULL,`account_name` VARCHAR(50),`other_account_det... | SELECT customer_id , customer_first_name , customer_last_name , customer_phone FROM Customers |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:What is the phone and email for customer with first name Aniyah and last name Feest?, schema:CREATE TABLE `Accounts` (`account_id` INTEGER PRIMARY KEY,`customer_id` INTEGER NOT NULL,`account_name` VARC... | SELECT customer_phone , customer_email FROM Customers WHERE customer_first_name = "Aniyah" AND customer_last_name = "Feest" |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:Return the phone and email of the customer with the first name Aniyah and last name Feest., schema:CREATE TABLE `Accounts` (`account_id` INTEGER PRIMARY KEY,`customer_id` INTEGER NOT NULL,`account_name... | SELECT customer_phone , customer_email FROM Customers WHERE customer_first_name = "Aniyah" AND customer_last_name = "Feest" |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:Show the number of customer cards., schema:CREATE TABLE `Accounts` (`account_id` INTEGER PRIMARY KEY,`customer_id` INTEGER NOT NULL,`account_name` VARCHAR(50),`other_account_details` VARCHAR(255)); CRE... | SELECT count(*) FROM Customers_cards |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:How many customer cards are there?, schema:CREATE TABLE `Accounts` (`account_id` INTEGER PRIMARY KEY,`customer_id` INTEGER NOT NULL,`account_name` VARCHAR(50),`other_account_details` VARCHAR(255)); CRE... | SELECT count(*) FROM Customers_cards |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:Show ids, customer ids, card type codes, card numbers for all cards., schema:CREATE TABLE `Accounts` (`account_id` INTEGER PRIMARY KEY,`customer_id` INTEGER NOT NULL,`account_name` VARCHAR(50),`other_a... | SELECT card_id , customer_id , card_type_code , card_number FROM Customers_cards |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.