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 are the average score and average staff number of all shops?, schema:CREATE TABLE "shop" ("Shop_ID" int,"Address" text,"Num_of_staff" text,"Score" real,"Open_Year" text,PRIMARY KEY ("Shop_ID")); C... | SELECT avg(num_of_staff) , avg(score) FROM shop |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:Find the id and address of the shops whose score is below the average score., schema:CREATE TABLE "shop" ("Shop_ID" int,"Address" text,"Num_of_staff" text,"Score" real,"Open_Year" text,PRIMARY KEY ("Sh... | SELECT shop_id , address FROM shop WHERE score < (SELECT avg(score) FROM shop) |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:Find the address and staff number of the shops that do not have any happy hour., schema:CREATE TABLE "shop" ("Shop_ID" int,"Address" text,"Num_of_staff" text,"Score" real,"Open_Year" text,PRIMARY KEY (... | SELECT address , num_of_staff FROM shop WHERE shop_id NOT IN (SELECT shop_id FROM happy_hour) |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:What are the id and address of the shops which have a happy hour in May?, schema:CREATE TABLE "shop" ("Shop_ID" int,"Address" text,"Num_of_staff" text,"Score" real,"Open_Year" text,PRIMARY KEY ("Shop_I... | SELECT t1.address , t1.shop_id FROM shop AS t1 JOIN happy_hour AS t2 ON t1.shop_id = t2.shop_id WHERE MONTH = 'May' |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:which shop has happy hour most frequently? List its id and number of happy hours., schema:CREATE TABLE "shop" ("Shop_ID" int,"Address" text,"Num_of_staff" text,"Score" real,"Open_Year" text,PRIMARY KEY... | SELECT shop_id , count(*) FROM happy_hour GROUP BY shop_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:Which month has the most happy hours?, schema:CREATE TABLE "shop" ("Shop_ID" int,"Address" text,"Num_of_staff" text,"Score" real,"Open_Year" text,PRIMARY KEY ("Shop_ID")); CREATE TABLE "member" ("Membe... | SELECT MONTH FROM happy_hour GROUP BY MONTH 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:Which months have more than 2 happy hours?, schema:CREATE TABLE "shop" ("Shop_ID" int,"Address" text,"Num_of_staff" text,"Score" real,"Open_Year" text,PRIMARY KEY ("Shop_ID")); CREATE TABLE "member" ("... | SELECT MONTH FROM happy_hour GROUP BY MONTH HAVING count(*) > 2 |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:How many albums are there?, schema:NA | SELECT count(*) FROM ALBUM |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:Find the number of albums., schema:NA | SELECT count(*) FROM ALBUM |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:List the names of all music genres., schema:NA | SELECT Name FROM GENRE |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:What are the names of different music genres?, schema:NA | SELECT Name FROM GENRE |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:Find all the customer information in state NY., schema:NA | SELECT * FROM CUSTOMER WHERE State = "NY" |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:What is all the customer information for customers in NY state?, schema:NA | SELECT * FROM CUSTOMER WHERE State = "NY" |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:What are the first names and last names of the employees who live in Calgary city., schema:NA | SELECT FirstName , LastName FROM EMPLOYEE WHERE City = "Calgary" |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:Find the full names of employees living in the city of Calgary., schema:NA | SELECT FirstName , LastName FROM EMPLOYEE WHERE City = "Calgary" |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:What are the distinct billing countries of the invoices?, schema:NA | SELECT distinct(BillingCountry) FROM INVOICE |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:Find the different billing countries for all invoices., schema:NA | SELECT distinct(BillingCountry) FROM INVOICE |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:Find the names of all artists that have "a" in their names., schema:NA | SELECT Name FROM ARTIST WHERE Name LIKE "%a%" |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:What are the names of artist who have the letter 'a' in their names?, schema:NA | SELECT Name FROM ARTIST WHERE Name LIKE "%a%" |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:Find the title of all the albums of the artist "AC/DC"., schema:NA | SELECT Title FROM ALBUM AS T1 JOIN ARTIST AS T2 ON T1.ArtistId = T2.ArtistId WHERE T2.Name = "AC/DC" |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:What are the titles of albums by the artist "AC/DC"?, schema:NA | SELECT Title FROM ALBUM AS T1 JOIN ARTIST AS T2 ON T1.ArtistId = T2.ArtistId WHERE T2.Name = "AC/DC" |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:Hom many albums does the artist "Metallica" have?, schema:NA | SELECT COUNT(*) FROM ALBUM AS T1 JOIN ARTIST AS T2 ON T1.ArtistId = T2.ArtistId WHERE T2.Name = "Metallica" |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:Find the number of albums by the artist "Metallica"., schema:NA | SELECT COUNT(*) FROM ALBUM AS T1 JOIN ARTIST AS T2 ON T1.ArtistId = T2.ArtistId WHERE T2.Name = "Metallica" |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:Which artist does the album "Balls to the Wall" belong to?, schema:NA | SELECT T2.Name FROM ALBUM AS T1 JOIN ARTIST AS T2 ON T1.ArtistId = T2.ArtistId 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:Find the name of the artist who made the album "Balls to the Wall"., schema:NA | SELECT T2.Name FROM ALBUM AS T1 JOIN ARTIST AS T2 ON T1.ArtistId = T2.ArtistId 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:Which artist has the most albums?, schema:NA | SELECT T2.Name FROM ALBUM AS T1 JOIN ARTIST AS T2 ON T1.ArtistId = T2.ArtistId GROUP BY T2.Name 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 name of the artist with the greatest number of albums?, schema:NA | SELECT T2.Name FROM ALBUM AS T1 JOIN ARTIST AS T2 ON T1.ArtistId = T2.ArtistId GROUP BY T2.Name 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:Find the names of all the tracks that contain the word "you"., schema:NA | SELECT Name FROM TRACK WHERE Name LIKE '%you%' |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:What are the names of tracks that contain the the word you in them?, schema:NA | SELECT Name FROM TRACK WHERE Name LIKE '%you%' |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:What is the average unit price of all the tracks?, schema:NA | SELECT AVG(UnitPrice) FROM TRACK |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:Find the average unit price for a track., schema:NA | SELECT AVG(UnitPrice) FROM TRACK |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:What are the durations of the longest and the shortest tracks in milliseconds?, schema:NA | SELECT max(Milliseconds) , min(Milliseconds) FROM TRACK |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:Find the maximum and minimum durations of tracks in milliseconds., schema:NA | SELECT max(Milliseconds) , min(Milliseconds) FROM TRACK |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:Show the album names, ids and the number of tracks for each album., schema:NA | SELECT T1.Title , T2.AlbumID , COUNT(*) FROM ALBUM AS T1 JOIN TRACK AS T2 ON T1.AlbumId = T2.AlbumId GROUP BY T2.AlbumID |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:What are the names and ids of the different albums, and how many tracks are on each?, schema:NA | SELECT T1.Title , T2.AlbumID , COUNT(*) FROM ALBUM AS T1 JOIN TRACK AS T2 ON T1.AlbumId = T2.AlbumId GROUP BY T2.AlbumID |
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 most common genre in all tracks?, schema:NA | SELECT T1.Name FROM GENRE AS T1 JOIN TRACK AS T2 ON T1.GenreId = T2.GenreId GROUP BY T2.GenreId 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:Find the name of the genre that is most frequent across all tracks., schema:NA | SELECT T1.Name FROM GENRE AS T1 JOIN TRACK AS T2 ON T1.GenreId = T2.GenreId GROUP BY T2.GenreId 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 least common media type in all tracks?, schema:NA | SELECT T1.Name FROM MEDIATYPE AS T1 JOIN TRACK AS T2 ON T1.MediaTypeId = T2.MediaTypeId GROUP BY T2.MediaTypeId 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:What is the name of the media type that is least common across all tracks?, schema:NA | SELECT T1.Name FROM MEDIATYPE AS T1 JOIN TRACK AS T2 ON T1.MediaTypeId = T2.MediaTypeId GROUP BY T2.MediaTypeId 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 album names and ids for albums that contain tracks with unit price bigger than 1., schema:NA | SELECT T1.Title , T2.AlbumID FROM ALBUM AS T1 JOIN TRACK AS T2 ON T1.AlbumId = T2.AlbumId WHERE T2.UnitPrice > 1 GROUP BY T2.AlbumID |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:What are the titles and ids for albums containing tracks with unit price greater than 1?, schema:NA | SELECT T1.Title , T2.AlbumID FROM ALBUM AS T1 JOIN TRACK AS T2 ON T1.AlbumId = T2.AlbumId WHERE T2.UnitPrice > 1 GROUP BY T2.AlbumID |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:How many tracks belong to rock genre?, schema:NA | SELECT COUNT(*) FROM GENRE AS T1 JOIN TRACK AS T2 ON T1.GenreId = T2.GenreId WHERE T1.Name = "Rock" |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:Count the number of tracks that are part of the rock genre., schema:NA | SELECT COUNT(*) FROM GENRE AS T1 JOIN TRACK AS T2 ON T1.GenreId = T2.GenreId 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 average unit price of tracks that belong to Jazz genre?, schema:NA | SELECT AVG(UnitPrice) FROM GENRE AS T1 JOIN TRACK AS T2 ON T1.GenreId = T2.GenreId WHERE T1.Name = "Jazz" |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:Find the average unit price of jazz tracks., schema:NA | SELECT AVG(UnitPrice) FROM GENRE AS T1 JOIN TRACK AS T2 ON T1.GenreId = T2.GenreId WHERE T1.Name = "Jazz" |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:What is the first name and last name of the customer that has email "luisg@embraer.com.br"?, schema:NA | SELECT FirstName , LastName FROM CUSTOMER WHERE Email = "luisg@embraer.com.br" |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:Find the full name of the customer with the email "luisg@embraer.com.br"., schema:NA | SELECT FirstName , LastName FROM CUSTOMER WHERE Email = "luisg@embraer.com.br" |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:How many customers have email that contains "gmail.com"?, schema:NA | SELECT COUNT(*) FROM CUSTOMER WHERE Email LIKE "%gmail.com%" |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:Count the number of customers that have an email containing "gmail.com"., schema:NA | SELECT COUNT(*) FROM CUSTOMER WHERE Email LIKE "%gmail.com%" |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:What is the first name and last name employee helps the customer with first name Leonie?, schema:NA | SELECT T2.FirstName , T2.LastName FROM CUSTOMER AS T1 JOIN EMPLOYEE AS T2 ON T1.SupportRepId = T2.EmployeeId WHERE T1.FirstName = "Leonie" |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:Find the full names of employees who help customers with the first name Leonie., schema:NA | SELECT T2.FirstName , T2.LastName FROM CUSTOMER AS T1 JOIN EMPLOYEE AS T2 ON T1.SupportRepId = T2.EmployeeId WHERE T1.FirstName = "Leonie" |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:What city does the employee who helps the customer with postal code 70174 live in?, schema:NA | SELECT T2.City FROM CUSTOMER AS T1 JOIN EMPLOYEE AS T2 ON T1.SupportRepId = T2.EmployeeId WHERE T1.PostalCode = "70174" |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:Find the cities corresponding to employees who help customers with the postal code 70174., schema:NA | SELECT T2.City FROM CUSTOMER AS T1 JOIN EMPLOYEE AS T2 ON T1.SupportRepId = T2.EmployeeId WHERE T1.PostalCode = "70174" |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:How many distinct cities does the employees live in?, schema:NA | SELECT COUNT(DISTINCT city) FROM EMPLOYEE |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:Find the number of different cities that employees live in., schema:NA | SELECT COUNT(DISTINCT city) FROM EMPLOYEE |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:Find all invoice dates corresponding to customers with first name Astrid and last name Gruber., schema:NA | SELECT T2.InvoiceDate FROM CUSTOMER AS T1 JOIN INVOICE AS T2 ON T1.CustomerId = T2.CustomerId WHERE T1.FirstName = "Astrid" AND LastName = "Gruber" |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:What are the invoice dates for customers with the first name Astrid and the last name Gruber?, schema:NA | SELECT T2.InvoiceDate FROM CUSTOMER AS T1 JOIN INVOICE AS T2 ON T1.CustomerId = T2.CustomerId WHERE T1.FirstName = "Astrid" AND LastName = "Gruber" |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:Find all the customer last names that do not have invoice totals larger than 20., schema:NA | SELECT LastName FROM CUSTOMER EXCEPT SELECT T1.LastName FROM CUSTOMER AS T1 JOIN Invoice AS T2 ON T1.CustomerId = T2.CustomerId WHERE T2.total > 20 |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:What are the last names of customers without invoice totals exceeding 20?, schema:NA | SELECT LastName FROM CUSTOMER EXCEPT SELECT T1.LastName FROM CUSTOMER AS T1 JOIN Invoice AS T2 ON T1.CustomerId = T2.CustomerId WHERE T2.total > 20 |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:Find the first names of all customers that live in Brazil and have an invoice., schema:NA | SELECT DISTINCT T1.FirstName FROM CUSTOMER AS T1 JOIN INVOICE AS T2 ON T1.CustomerId = T2.CustomerId WHERE T1.country = "Brazil" |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:What are the different first names for customers from Brazil who have also had an invoice?, schema:NA | SELECT DISTINCT T1.FirstName FROM CUSTOMER AS T1 JOIN INVOICE AS T2 ON T1.CustomerId = T2.CustomerId WHERE T1.country = "Brazil" |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:Find the address of all customers that live in Germany and have invoice., schema:NA | SELECT DISTINCT T1.Address FROM CUSTOMER AS T1 JOIN INVOICE AS T2 ON T1.CustomerId = T2.CustomerId WHERE T1.country = "Germany" |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:What are the addresses of customers living in Germany who have had an invoice?, schema:NA | SELECT DISTINCT T1.Address FROM CUSTOMER AS T1 JOIN INVOICE AS T2 ON T1.CustomerId = T2.CustomerId WHERE T1.country = "Germany" |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:List the phone numbers of all employees., schema:NA | SELECT Phone FROM EMPLOYEE |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:What are the phone numbers for each employee?, schema:NA | SELECT Phone FROM EMPLOYEE |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:How many tracks are in the AAC audio file media type?, schema:NA | SELECT COUNT(*) FROM MEDIATYPE AS T1 JOIN TRACK AS T2 ON T1.MediaTypeId = T2.MediaTypeId WHERE T1.Name = "AAC audio file" |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:Count the number of tracks that are of the media type "AAC audio file"., schema:NA | SELECT COUNT(*) FROM MEDIATYPE AS T1 JOIN TRACK AS T2 ON T1.MediaTypeId = T2.MediaTypeId WHERE T1.Name = "AAC audio file" |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:What is the average duration in milliseconds of tracks that belong to Latin or Pop genre?, schema:NA | SELECT AVG(Milliseconds) FROM GENRE AS T1 JOIN TRACK AS T2 ON T1.GenreId = T2.GenreId WHERE T1.Name = "Latin" OR T1.Name = "Pop" |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:Find the average millisecond length of Latin and Pop tracks., schema:NA | SELECT AVG(Milliseconds) FROM GENRE AS T1 JOIN TRACK AS T2 ON T1.GenreId = T2.GenreId WHERE T1.Name = "Latin" OR T1.Name = "Pop" |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:Please show the employee first names and ids of employees who serve at least 10 customers., schema:NA | SELECT T1.FirstName , T1.SupportRepId FROM CUSTOMER AS T1 JOIN EMPLOYEE AS T2 ON T1.SupportRepId = T2.EmployeeId GROUP BY T1.SupportRepId HAVING COUNT(*) >= 10 |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:What are the first names and support rep ids for employees serving 10 or more customers?, schema:NA | SELECT T1.FirstName , T1.SupportRepId FROM CUSTOMER AS T1 JOIN EMPLOYEE AS T2 ON T1.SupportRepId = T2.EmployeeId GROUP BY T1.SupportRepId HAVING COUNT(*) >= 10 |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:Please show the employee last names that serves no more than 20 customers., schema:NA | SELECT T1.LastName FROM CUSTOMER AS T1 JOIN EMPLOYEE AS T2 ON T1.SupportRepId = T2.EmployeeId GROUP BY T1.SupportRepId HAVING COUNT(*) <= 20 |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:What are the last names of employees who serve at most 20 customers?, schema:NA | SELECT T1.LastName FROM CUSTOMER AS T1 JOIN EMPLOYEE AS T2 ON T1.SupportRepId = T2.EmployeeId GROUP BY T1.SupportRepId HAVING COUNT(*) <= 20 |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:Please list all album titles in alphabetical order., schema:NA | SELECT Title FROM ALBUM ORDER BY Title |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:What are all the album titles, in alphabetical order?, schema:NA | SELECT Title FROM ALBUM ORDER BY Title |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:Please list the name and id of all artists that have at least 3 albums in alphabetical order., schema:NA | SELECT T2.Name , T1.ArtistId FROM ALBUM AS T1 JOIN ARTIST AS T2 ON T1.ArtistId = T2.ArtistID GROUP BY T1.ArtistId HAVING COUNT(*) >= 3 ORDER BY T2.Name |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:What are the names and ids of artists with 3 or more albums, listed in alphabetical order?, schema:NA | SELECT T2.Name , T1.ArtistId FROM ALBUM AS T1 JOIN ARTIST AS T2 ON T1.ArtistId = T2.ArtistID GROUP BY T1.ArtistId HAVING COUNT(*) >= 3 ORDER BY T2.Name |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:Find the names of artists that do not have any albums., schema:NA | SELECT Name FROM ARTIST EXCEPT SELECT T2.Name FROM ALBUM AS T1 JOIN ARTIST AS T2 ON T1.ArtistId = T2.ArtistId |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:What are the names of artists who have not released any albums?, schema:NA | SELECT Name FROM ARTIST EXCEPT SELECT T2.Name FROM ALBUM AS T1 JOIN ARTIST AS T2 ON T1.ArtistId = T2.ArtistId |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:What is the average unit price of rock tracks?, schema:NA | SELECT AVG(T2.UnitPrice) FROM GENRE AS T1 JOIN TRACK AS T2 ON T1.GenreId = T2.GenreId WHERE T1.Name = "Rock" |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:Find the average unit price of tracks from the Rock genre., schema:NA | SELECT AVG(T2.UnitPrice) FROM GENRE AS T1 JOIN TRACK AS T2 ON T1.GenreId = T2.GenreId WHERE T1.Name = "Rock" |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:What are the duration of the longest and shortest pop tracks in milliseconds?, schema:NA | SELECT max(Milliseconds) , min(Milliseconds) FROM GENRE AS T1 JOIN TRACK AS T2 ON T1.GenreId = T2.GenreId WHERE T1.Name = "Pop" |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:Find the maximum and minimum millisecond lengths of pop tracks., schema:NA | SELECT max(Milliseconds) , min(Milliseconds) FROM GENRE AS T1 JOIN TRACK AS T2 ON T1.GenreId = T2.GenreId WHERE T1.Name = "Pop" |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:What are the birth dates of employees living in Edmonton?, schema:NA | SELECT BirthDate FROM EMPLOYEE WHERE City = "Edmonton" |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:Find the birth dates corresponding to employees who live in the city of Edmonton., schema:NA | SELECT BirthDate FROM EMPLOYEE WHERE City = "Edmonton" |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:What are the distinct unit prices of all tracks?, schema:NA | SELECT distinct(UnitPrice) FROM TRACK |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:Find the distinct unit prices for tracks., schema:NA | SELECT distinct(UnitPrice) FROM TRACK |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:How many artists do not have any album?, schema:NA | SELECT count(*) FROM ARTIST WHERE artistid NOT IN(SELECT artistid FROM ALBUM) |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:Cound the number of artists who have not released an album., schema:NA | SELECT count(*) FROM ARTIST WHERE artistid NOT IN(SELECT artistid FROM ALBUM) |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:What are the album titles for albums containing both 'Reggae' and 'Rock' genre tracks?, schema:NA | SELECT T1.Title FROM Album AS T1 JOIN Track AS T2 ON T1.AlbumId = T2.AlbumId JOIN Genre AS T3 ON T2.GenreID = T3.GenreID WHERE T3.Name = 'Reggae' INTERSECT SELECT T1.Title FROM Album AS T1 JOIN Track AS T2 ON T1.AlbumId = T2.AlbumId JOIN Genre AS T3 ON T2.GenreID = T3.GenreID WHERE T3.Name = 'Rock' |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:Find the titles of albums that contain tracks of both the Reggae and Rock genres., schema:NA | SELECT T1.Title FROM Album AS T1 JOIN Track AS T2 ON T1.AlbumId = T2.AlbumId JOIN Genre AS T3 ON T2.GenreID = T3.GenreID WHERE T3.Name = 'Reggae' INTERSECT SELECT T1.Title FROM Album AS T1 JOIN Track AS T2 ON T1.AlbumId = T2.AlbumId JOIN Genre AS T3 ON T2.GenreID = T3.GenreID WHERE T3.Name = 'Rock' |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:Find all the phone numbers., schema:CREATE TABLE Customers (Customer_ID INTEGER NOT NULL,Customer_name VARCHAR(40),PRIMARY KEY (Customer_ID)); CREATE TABLE Services (Service_ID INTEGER NOT NULL,Service... | SELECT customer_phone FROM available_policies |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:What are all the phone numbers?, schema:CREATE TABLE Customers (Customer_ID INTEGER NOT NULL,Customer_name VARCHAR(40),PRIMARY KEY (Customer_ID)); CREATE TABLE Services (Service_ID INTEGER NOT NULL,Ser... | SELECT customer_phone FROM available_policies |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:What are the customer phone numbers under the policy "Life Insurance"?, schema:CREATE TABLE Customers (Customer_ID INTEGER NOT NULL,Customer_name VARCHAR(40),PRIMARY KEY (Customer_ID)); CREATE TABLE Se... | SELECT customer_phone FROM available_policies WHERE policy_type_code = "Life Insurance" |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:What are the phone numbers of customers using the policy with the code "Life Insurance"?, schema:CREATE TABLE Customers (Customer_ID INTEGER NOT NULL,Customer_name VARCHAR(40),PRIMARY KEY (Customer_ID)... | SELECT customer_phone FROM available_policies WHERE policy_type_code = "Life Insurance" |
You are an excellent developer. Please make an SQL query based on the instructions and the provided schema.Instruction:Which policy type has the most records in the database?, schema:CREATE TABLE Customers (Customer_ID INTEGER NOT NULL,Customer_name VARCHAR(40),PRIMARY KEY (Customer_ID)); CREATE TABLE Services (Service... | SELECT policy_type_code FROM available_policies GROUP BY policy_type_code 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:Which policy type appears most frequently in the available policies?, schema:CREATE TABLE Customers (Customer_ID INTEGER NOT NULL,Customer_name VARCHAR(40),PRIMARY KEY (Customer_ID)); CREATE TABLE Serv... | SELECT policy_type_code FROM available_policies GROUP BY policy_type_code 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 are all the customer phone numbers under the most popular policy type?, schema:CREATE TABLE Customers (Customer_ID INTEGER NOT NULL,Customer_name VARCHAR(40),PRIMARY KEY (Customer_ID)); CREATE TAB... | SELECT customer_phone FROM available_policies WHERE policy_type_code = (SELECT policy_type_code FROM available_policies GROUP BY policy_type_code 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:Find the phone numbers of customers using the most common policy type among the available policies., schema:CREATE TABLE Customers (Customer_ID INTEGER NOT NULL,Customer_name VARCHAR(40),PRIMARY KEY (C... | SELECT customer_phone FROM available_policies WHERE policy_type_code = (SELECT policy_type_code FROM available_policies GROUP BY policy_type_code 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:Find the policy type used by more than 4 customers., schema:CREATE TABLE Customers (Customer_ID INTEGER NOT NULL,Customer_name VARCHAR(40),PRIMARY KEY (Customer_ID)); CREATE TABLE Services (Service_ID ... | SELECT policy_type_code FROM available_policies GROUP BY policy_type_code HAVING count(*) > 4 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.