input stringlengths 191 7.13k | output stringlengths 19 578 |
|---|---|
Tables: shop, member, happy_hour, happy_hour_member
Columns: shop.Shop_ID, shop.Address, shop.Num_of_staff, shop.Score, shop.Open_Year, member.Member_ID, member.Name, member.Membership_card, member.Age, member.Time_of_purchase, member.Level_of_membership, member.Address, happy_hour.HH_ID, happy_hour.Shop_ID, happy_hour.Month, happy_hour.Num_of_shaff_in_charge, happy_hour_member.HH_ID, happy_hour_member.Member_ID, happy_hour_member.Total_amount
Question: What are the average score and average staff number of all shops? [/INST] | SELECT avg(num_of_staff) , avg(score) FROM shop; |
Tables: shop, member, happy_hour, happy_hour_member
Columns: shop.Shop_ID, shop.Address, shop.Num_of_staff, shop.Score, shop.Open_Year, member.Member_ID, member.Name, member.Membership_card, member.Age, member.Time_of_purchase, member.Level_of_membership, member.Address, happy_hour.HH_ID, happy_hour.Shop_ID, happy_hour.Month, happy_hour.Num_of_shaff_in_charge, happy_hour_member.HH_ID, happy_hour_member.Member_ID, happy_hour_member.Total_amount
Question: Find the id and address of the shops whose score is below the average score. [/INST] | SELECT shop_id , address FROM shop WHERE score < (SELECT avg(score) FROM shop); |
Tables: shop, member, happy_hour, happy_hour_member
Columns: shop.Shop_ID, shop.Address, shop.Num_of_staff, shop.Score, shop.Open_Year, member.Member_ID, member.Name, member.Membership_card, member.Age, member.Time_of_purchase, member.Level_of_membership, member.Address, happy_hour.HH_ID, happy_hour.Shop_ID, happy_hour.Month, happy_hour.Num_of_shaff_in_charge, happy_hour_member.HH_ID, happy_hour_member.Member_ID, happy_hour_member.Total_amount
Question: Find the address and staff number of the shops that do not have any happy hour. [/INST] | SELECT address , num_of_staff FROM shop WHERE shop_id NOT IN (SELECT shop_id FROM happy_hour); |
Tables: shop, member, happy_hour, happy_hour_member
Columns: shop.Shop_ID, shop.Address, shop.Num_of_staff, shop.Score, shop.Open_Year, member.Member_ID, member.Name, member.Membership_card, member.Age, member.Time_of_purchase, member.Level_of_membership, member.Address, happy_hour.HH_ID, happy_hour.Shop_ID, happy_hour.Month, happy_hour.Num_of_shaff_in_charge, happy_hour_member.HH_ID, happy_hour_member.Member_ID, happy_hour_member.Total_amount
Question: What are the id and address of the shops which have a happy hour in May? [/INST] | 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'; |
Tables: shop, member, happy_hour, happy_hour_member
Columns: shop.Shop_ID, shop.Address, shop.Num_of_staff, shop.Score, shop.Open_Year, member.Member_ID, member.Name, member.Membership_card, member.Age, member.Time_of_purchase, member.Level_of_membership, member.Address, happy_hour.HH_ID, happy_hour.Shop_ID, happy_hour.Month, happy_hour.Num_of_shaff_in_charge, happy_hour_member.HH_ID, happy_hour_member.Member_ID, happy_hour_member.Total_amount
Question: which shop has happy hour most frequently? List its id and number of happy hours. [/INST] | SELECT shop_id , count(*) FROM happy_hour GROUP BY shop_id ORDER BY count(*) DESC LIMIT 1; |
Tables: shop, member, happy_hour, happy_hour_member
Columns: shop.Shop_ID, shop.Address, shop.Num_of_staff, shop.Score, shop.Open_Year, member.Member_ID, member.Name, member.Membership_card, member.Age, member.Time_of_purchase, member.Level_of_membership, member.Address, happy_hour.HH_ID, happy_hour.Shop_ID, happy_hour.Month, happy_hour.Num_of_shaff_in_charge, happy_hour_member.HH_ID, happy_hour_member.Member_ID, happy_hour_member.Total_amount
Question: Which month has the most happy hours? [/INST] | SELECT MONTH FROM happy_hour GROUP BY MONTH ORDER BY count(*) DESC LIMIT 1; |
Tables: shop, member, happy_hour, happy_hour_member
Columns: shop.Shop_ID, shop.Address, shop.Num_of_staff, shop.Score, shop.Open_Year, member.Member_ID, member.Name, member.Membership_card, member.Age, member.Time_of_purchase, member.Level_of_membership, member.Address, happy_hour.HH_ID, happy_hour.Shop_ID, happy_hour.Month, happy_hour.Num_of_shaff_in_charge, happy_hour_member.HH_ID, happy_hour_member.Member_ID, happy_hour_member.Total_amount
Question: Which months have more than 2 happy hours? [/INST] | SELECT MONTH FROM happy_hour GROUP BY MONTH HAVING count(*) > 2; |
Tables: Album, Artist, Customer, Employee, Genre, Invoice, InvoiceLine, MediaType, Playlist, PlaylistTrack, Track
Columns: Album.AlbumId, Album.Title, Album.ArtistId, Artist.ArtistId, Artist.Name, Customer.CustomerId, Customer.FirstName, Customer.LastName, Customer.Company, Customer.Address, Customer.City, Customer.State, Customer.Country, Customer.PostalCode, Customer.Phone, Customer.Fax, Customer.Email, Customer.SupportRepId, Employee.EmployeeId, Employee.LastName, Employee.FirstName, Employee.Title, Employee.ReportsTo, Employee.BirthDate, Employee.HireDate, Employee.Address, Employee.City, Employee.State, Employee.Country, Employee.PostalCode, Employee.Phone, Employee.Fax, Employee.Email, Genre.GenreId, Genre.Name, Invoice.InvoiceId, Invoice.CustomerId, Invoice.InvoiceDate, Invoice.BillingAddress, Invoice.BillingCity, Invoice.BillingState, Invoice.BillingCountry, Invoice.BillingPostalCode, Invoice.Total, InvoiceLine.InvoiceLineId, InvoiceLine.InvoiceId, InvoiceLine.TrackId, InvoiceLine.UnitPrice, InvoiceLine.Quantity, MediaType.MediaTypeId, MediaType.Name, Playlist.PlaylistId, Playlist.Name, PlaylistTrack.PlaylistId, PlaylistTrack.TrackId, Track.TrackId, Track.Name, Track.AlbumId, Track.MediaTypeId, Track.GenreId, Track.Composer, Track.Milliseconds, Track.Bytes, Track.UnitPrice
Question: How many albums are there? [/INST] | SELECT count(*) FROM ALBUM; |
Tables: Album, Artist, Customer, Employee, Genre, Invoice, InvoiceLine, MediaType, Playlist, PlaylistTrack, Track
Columns: Album.AlbumId, Album.Title, Album.ArtistId, Artist.ArtistId, Artist.Name, Customer.CustomerId, Customer.FirstName, Customer.LastName, Customer.Company, Customer.Address, Customer.City, Customer.State, Customer.Country, Customer.PostalCode, Customer.Phone, Customer.Fax, Customer.Email, Customer.SupportRepId, Employee.EmployeeId, Employee.LastName, Employee.FirstName, Employee.Title, Employee.ReportsTo, Employee.BirthDate, Employee.HireDate, Employee.Address, Employee.City, Employee.State, Employee.Country, Employee.PostalCode, Employee.Phone, Employee.Fax, Employee.Email, Genre.GenreId, Genre.Name, Invoice.InvoiceId, Invoice.CustomerId, Invoice.InvoiceDate, Invoice.BillingAddress, Invoice.BillingCity, Invoice.BillingState, Invoice.BillingCountry, Invoice.BillingPostalCode, Invoice.Total, InvoiceLine.InvoiceLineId, InvoiceLine.InvoiceId, InvoiceLine.TrackId, InvoiceLine.UnitPrice, InvoiceLine.Quantity, MediaType.MediaTypeId, MediaType.Name, Playlist.PlaylistId, Playlist.Name, PlaylistTrack.PlaylistId, PlaylistTrack.TrackId, Track.TrackId, Track.Name, Track.AlbumId, Track.MediaTypeId, Track.GenreId, Track.Composer, Track.Milliseconds, Track.Bytes, Track.UnitPrice
Question: Find the number of albums. [/INST] | SELECT count(*) FROM ALBUM; |
Tables: Album, Artist, Customer, Employee, Genre, Invoice, InvoiceLine, MediaType, Playlist, PlaylistTrack, Track
Columns: Album.AlbumId, Album.Title, Album.ArtistId, Artist.ArtistId, Artist.Name, Customer.CustomerId, Customer.FirstName, Customer.LastName, Customer.Company, Customer.Address, Customer.City, Customer.State, Customer.Country, Customer.PostalCode, Customer.Phone, Customer.Fax, Customer.Email, Customer.SupportRepId, Employee.EmployeeId, Employee.LastName, Employee.FirstName, Employee.Title, Employee.ReportsTo, Employee.BirthDate, Employee.HireDate, Employee.Address, Employee.City, Employee.State, Employee.Country, Employee.PostalCode, Employee.Phone, Employee.Fax, Employee.Email, Genre.GenreId, Genre.Name, Invoice.InvoiceId, Invoice.CustomerId, Invoice.InvoiceDate, Invoice.BillingAddress, Invoice.BillingCity, Invoice.BillingState, Invoice.BillingCountry, Invoice.BillingPostalCode, Invoice.Total, InvoiceLine.InvoiceLineId, InvoiceLine.InvoiceId, InvoiceLine.TrackId, InvoiceLine.UnitPrice, InvoiceLine.Quantity, MediaType.MediaTypeId, MediaType.Name, Playlist.PlaylistId, Playlist.Name, PlaylistTrack.PlaylistId, PlaylistTrack.TrackId, Track.TrackId, Track.Name, Track.AlbumId, Track.MediaTypeId, Track.GenreId, Track.Composer, Track.Milliseconds, Track.Bytes, Track.UnitPrice
Question: List the names of all music genres. [/INST] | SELECT Name FROM GENRE; |
Tables: Album, Artist, Customer, Employee, Genre, Invoice, InvoiceLine, MediaType, Playlist, PlaylistTrack, Track
Columns: Album.AlbumId, Album.Title, Album.ArtistId, Artist.ArtistId, Artist.Name, Customer.CustomerId, Customer.FirstName, Customer.LastName, Customer.Company, Customer.Address, Customer.City, Customer.State, Customer.Country, Customer.PostalCode, Customer.Phone, Customer.Fax, Customer.Email, Customer.SupportRepId, Employee.EmployeeId, Employee.LastName, Employee.FirstName, Employee.Title, Employee.ReportsTo, Employee.BirthDate, Employee.HireDate, Employee.Address, Employee.City, Employee.State, Employee.Country, Employee.PostalCode, Employee.Phone, Employee.Fax, Employee.Email, Genre.GenreId, Genre.Name, Invoice.InvoiceId, Invoice.CustomerId, Invoice.InvoiceDate, Invoice.BillingAddress, Invoice.BillingCity, Invoice.BillingState, Invoice.BillingCountry, Invoice.BillingPostalCode, Invoice.Total, InvoiceLine.InvoiceLineId, InvoiceLine.InvoiceId, InvoiceLine.TrackId, InvoiceLine.UnitPrice, InvoiceLine.Quantity, MediaType.MediaTypeId, MediaType.Name, Playlist.PlaylistId, Playlist.Name, PlaylistTrack.PlaylistId, PlaylistTrack.TrackId, Track.TrackId, Track.Name, Track.AlbumId, Track.MediaTypeId, Track.GenreId, Track.Composer, Track.Milliseconds, Track.Bytes, Track.UnitPrice
Question: What are the names of different music genres? [/INST] | SELECT Name FROM GENRE; |
Tables: Album, Artist, Customer, Employee, Genre, Invoice, InvoiceLine, MediaType, Playlist, PlaylistTrack, Track
Columns: Album.AlbumId, Album.Title, Album.ArtistId, Artist.ArtistId, Artist.Name, Customer.CustomerId, Customer.FirstName, Customer.LastName, Customer.Company, Customer.Address, Customer.City, Customer.State, Customer.Country, Customer.PostalCode, Customer.Phone, Customer.Fax, Customer.Email, Customer.SupportRepId, Employee.EmployeeId, Employee.LastName, Employee.FirstName, Employee.Title, Employee.ReportsTo, Employee.BirthDate, Employee.HireDate, Employee.Address, Employee.City, Employee.State, Employee.Country, Employee.PostalCode, Employee.Phone, Employee.Fax, Employee.Email, Genre.GenreId, Genre.Name, Invoice.InvoiceId, Invoice.CustomerId, Invoice.InvoiceDate, Invoice.BillingAddress, Invoice.BillingCity, Invoice.BillingState, Invoice.BillingCountry, Invoice.BillingPostalCode, Invoice.Total, InvoiceLine.InvoiceLineId, InvoiceLine.InvoiceId, InvoiceLine.TrackId, InvoiceLine.UnitPrice, InvoiceLine.Quantity, MediaType.MediaTypeId, MediaType.Name, Playlist.PlaylistId, Playlist.Name, PlaylistTrack.PlaylistId, PlaylistTrack.TrackId, Track.TrackId, Track.Name, Track.AlbumId, Track.MediaTypeId, Track.GenreId, Track.Composer, Track.Milliseconds, Track.Bytes, Track.UnitPrice
Question: Find all the customer information in state NY. [/INST] | SELECT * FROM CUSTOMER WHERE State = "NY"; |
Tables: Album, Artist, Customer, Employee, Genre, Invoice, InvoiceLine, MediaType, Playlist, PlaylistTrack, Track
Columns: Album.AlbumId, Album.Title, Album.ArtistId, Artist.ArtistId, Artist.Name, Customer.CustomerId, Customer.FirstName, Customer.LastName, Customer.Company, Customer.Address, Customer.City, Customer.State, Customer.Country, Customer.PostalCode, Customer.Phone, Customer.Fax, Customer.Email, Customer.SupportRepId, Employee.EmployeeId, Employee.LastName, Employee.FirstName, Employee.Title, Employee.ReportsTo, Employee.BirthDate, Employee.HireDate, Employee.Address, Employee.City, Employee.State, Employee.Country, Employee.PostalCode, Employee.Phone, Employee.Fax, Employee.Email, Genre.GenreId, Genre.Name, Invoice.InvoiceId, Invoice.CustomerId, Invoice.InvoiceDate, Invoice.BillingAddress, Invoice.BillingCity, Invoice.BillingState, Invoice.BillingCountry, Invoice.BillingPostalCode, Invoice.Total, InvoiceLine.InvoiceLineId, InvoiceLine.InvoiceId, InvoiceLine.TrackId, InvoiceLine.UnitPrice, InvoiceLine.Quantity, MediaType.MediaTypeId, MediaType.Name, Playlist.PlaylistId, Playlist.Name, PlaylistTrack.PlaylistId, PlaylistTrack.TrackId, Track.TrackId, Track.Name, Track.AlbumId, Track.MediaTypeId, Track.GenreId, Track.Composer, Track.Milliseconds, Track.Bytes, Track.UnitPrice
Question: What is all the customer information for customers in NY state? [/INST] | SELECT * FROM CUSTOMER WHERE State = "NY"; |
Tables: Album, Artist, Customer, Employee, Genre, Invoice, InvoiceLine, MediaType, Playlist, PlaylistTrack, Track
Columns: Album.AlbumId, Album.Title, Album.ArtistId, Artist.ArtistId, Artist.Name, Customer.CustomerId, Customer.FirstName, Customer.LastName, Customer.Company, Customer.Address, Customer.City, Customer.State, Customer.Country, Customer.PostalCode, Customer.Phone, Customer.Fax, Customer.Email, Customer.SupportRepId, Employee.EmployeeId, Employee.LastName, Employee.FirstName, Employee.Title, Employee.ReportsTo, Employee.BirthDate, Employee.HireDate, Employee.Address, Employee.City, Employee.State, Employee.Country, Employee.PostalCode, Employee.Phone, Employee.Fax, Employee.Email, Genre.GenreId, Genre.Name, Invoice.InvoiceId, Invoice.CustomerId, Invoice.InvoiceDate, Invoice.BillingAddress, Invoice.BillingCity, Invoice.BillingState, Invoice.BillingCountry, Invoice.BillingPostalCode, Invoice.Total, InvoiceLine.InvoiceLineId, InvoiceLine.InvoiceId, InvoiceLine.TrackId, InvoiceLine.UnitPrice, InvoiceLine.Quantity, MediaType.MediaTypeId, MediaType.Name, Playlist.PlaylistId, Playlist.Name, PlaylistTrack.PlaylistId, PlaylistTrack.TrackId, Track.TrackId, Track.Name, Track.AlbumId, Track.MediaTypeId, Track.GenreId, Track.Composer, Track.Milliseconds, Track.Bytes, Track.UnitPrice
Question: What are the first names and last names of the employees who live in Calgary city. [/INST] | SELECT FirstName , LastName FROM EMPLOYEE WHERE City = "Calgary"; |
Tables: Album, Artist, Customer, Employee, Genre, Invoice, InvoiceLine, MediaType, Playlist, PlaylistTrack, Track
Columns: Album.AlbumId, Album.Title, Album.ArtistId, Artist.ArtistId, Artist.Name, Customer.CustomerId, Customer.FirstName, Customer.LastName, Customer.Company, Customer.Address, Customer.City, Customer.State, Customer.Country, Customer.PostalCode, Customer.Phone, Customer.Fax, Customer.Email, Customer.SupportRepId, Employee.EmployeeId, Employee.LastName, Employee.FirstName, Employee.Title, Employee.ReportsTo, Employee.BirthDate, Employee.HireDate, Employee.Address, Employee.City, Employee.State, Employee.Country, Employee.PostalCode, Employee.Phone, Employee.Fax, Employee.Email, Genre.GenreId, Genre.Name, Invoice.InvoiceId, Invoice.CustomerId, Invoice.InvoiceDate, Invoice.BillingAddress, Invoice.BillingCity, Invoice.BillingState, Invoice.BillingCountry, Invoice.BillingPostalCode, Invoice.Total, InvoiceLine.InvoiceLineId, InvoiceLine.InvoiceId, InvoiceLine.TrackId, InvoiceLine.UnitPrice, InvoiceLine.Quantity, MediaType.MediaTypeId, MediaType.Name, Playlist.PlaylistId, Playlist.Name, PlaylistTrack.PlaylistId, PlaylistTrack.TrackId, Track.TrackId, Track.Name, Track.AlbumId, Track.MediaTypeId, Track.GenreId, Track.Composer, Track.Milliseconds, Track.Bytes, Track.UnitPrice
Question: Find the full names of employees living in the city of Calgary. [/INST] | SELECT FirstName , LastName FROM EMPLOYEE WHERE City = "Calgary"; |
Tables: Album, Artist, Customer, Employee, Genre, Invoice, InvoiceLine, MediaType, Playlist, PlaylistTrack, Track
Columns: Album.AlbumId, Album.Title, Album.ArtistId, Artist.ArtistId, Artist.Name, Customer.CustomerId, Customer.FirstName, Customer.LastName, Customer.Company, Customer.Address, Customer.City, Customer.State, Customer.Country, Customer.PostalCode, Customer.Phone, Customer.Fax, Customer.Email, Customer.SupportRepId, Employee.EmployeeId, Employee.LastName, Employee.FirstName, Employee.Title, Employee.ReportsTo, Employee.BirthDate, Employee.HireDate, Employee.Address, Employee.City, Employee.State, Employee.Country, Employee.PostalCode, Employee.Phone, Employee.Fax, Employee.Email, Genre.GenreId, Genre.Name, Invoice.InvoiceId, Invoice.CustomerId, Invoice.InvoiceDate, Invoice.BillingAddress, Invoice.BillingCity, Invoice.BillingState, Invoice.BillingCountry, Invoice.BillingPostalCode, Invoice.Total, InvoiceLine.InvoiceLineId, InvoiceLine.InvoiceId, InvoiceLine.TrackId, InvoiceLine.UnitPrice, InvoiceLine.Quantity, MediaType.MediaTypeId, MediaType.Name, Playlist.PlaylistId, Playlist.Name, PlaylistTrack.PlaylistId, PlaylistTrack.TrackId, Track.TrackId, Track.Name, Track.AlbumId, Track.MediaTypeId, Track.GenreId, Track.Composer, Track.Milliseconds, Track.Bytes, Track.UnitPrice
Question: What are the distinct billing countries of the invoices? [/INST] | SELECT distinct(BillingCountry) FROM INVOICE; |
Tables: Album, Artist, Customer, Employee, Genre, Invoice, InvoiceLine, MediaType, Playlist, PlaylistTrack, Track
Columns: Album.AlbumId, Album.Title, Album.ArtistId, Artist.ArtistId, Artist.Name, Customer.CustomerId, Customer.FirstName, Customer.LastName, Customer.Company, Customer.Address, Customer.City, Customer.State, Customer.Country, Customer.PostalCode, Customer.Phone, Customer.Fax, Customer.Email, Customer.SupportRepId, Employee.EmployeeId, Employee.LastName, Employee.FirstName, Employee.Title, Employee.ReportsTo, Employee.BirthDate, Employee.HireDate, Employee.Address, Employee.City, Employee.State, Employee.Country, Employee.PostalCode, Employee.Phone, Employee.Fax, Employee.Email, Genre.GenreId, Genre.Name, Invoice.InvoiceId, Invoice.CustomerId, Invoice.InvoiceDate, Invoice.BillingAddress, Invoice.BillingCity, Invoice.BillingState, Invoice.BillingCountry, Invoice.BillingPostalCode, Invoice.Total, InvoiceLine.InvoiceLineId, InvoiceLine.InvoiceId, InvoiceLine.TrackId, InvoiceLine.UnitPrice, InvoiceLine.Quantity, MediaType.MediaTypeId, MediaType.Name, Playlist.PlaylistId, Playlist.Name, PlaylistTrack.PlaylistId, PlaylistTrack.TrackId, Track.TrackId, Track.Name, Track.AlbumId, Track.MediaTypeId, Track.GenreId, Track.Composer, Track.Milliseconds, Track.Bytes, Track.UnitPrice
Question: Find the different billing countries for all invoices. [/INST] | SELECT distinct(BillingCountry) FROM INVOICE; |
Tables: Album, Artist, Customer, Employee, Genre, Invoice, InvoiceLine, MediaType, Playlist, PlaylistTrack, Track
Columns: Album.AlbumId, Album.Title, Album.ArtistId, Artist.ArtistId, Artist.Name, Customer.CustomerId, Customer.FirstName, Customer.LastName, Customer.Company, Customer.Address, Customer.City, Customer.State, Customer.Country, Customer.PostalCode, Customer.Phone, Customer.Fax, Customer.Email, Customer.SupportRepId, Employee.EmployeeId, Employee.LastName, Employee.FirstName, Employee.Title, Employee.ReportsTo, Employee.BirthDate, Employee.HireDate, Employee.Address, Employee.City, Employee.State, Employee.Country, Employee.PostalCode, Employee.Phone, Employee.Fax, Employee.Email, Genre.GenreId, Genre.Name, Invoice.InvoiceId, Invoice.CustomerId, Invoice.InvoiceDate, Invoice.BillingAddress, Invoice.BillingCity, Invoice.BillingState, Invoice.BillingCountry, Invoice.BillingPostalCode, Invoice.Total, InvoiceLine.InvoiceLineId, InvoiceLine.InvoiceId, InvoiceLine.TrackId, InvoiceLine.UnitPrice, InvoiceLine.Quantity, MediaType.MediaTypeId, MediaType.Name, Playlist.PlaylistId, Playlist.Name, PlaylistTrack.PlaylistId, PlaylistTrack.TrackId, Track.TrackId, Track.Name, Track.AlbumId, Track.MediaTypeId, Track.GenreId, Track.Composer, Track.Milliseconds, Track.Bytes, Track.UnitPrice
Question: Find the names of all artists that have "a" in their names. [/INST] | SELECT Name FROM ARTIST WHERE Name LIKE "%a%"; |
Tables: Album, Artist, Customer, Employee, Genre, Invoice, InvoiceLine, MediaType, Playlist, PlaylistTrack, Track
Columns: Album.AlbumId, Album.Title, Album.ArtistId, Artist.ArtistId, Artist.Name, Customer.CustomerId, Customer.FirstName, Customer.LastName, Customer.Company, Customer.Address, Customer.City, Customer.State, Customer.Country, Customer.PostalCode, Customer.Phone, Customer.Fax, Customer.Email, Customer.SupportRepId, Employee.EmployeeId, Employee.LastName, Employee.FirstName, Employee.Title, Employee.ReportsTo, Employee.BirthDate, Employee.HireDate, Employee.Address, Employee.City, Employee.State, Employee.Country, Employee.PostalCode, Employee.Phone, Employee.Fax, Employee.Email, Genre.GenreId, Genre.Name, Invoice.InvoiceId, Invoice.CustomerId, Invoice.InvoiceDate, Invoice.BillingAddress, Invoice.BillingCity, Invoice.BillingState, Invoice.BillingCountry, Invoice.BillingPostalCode, Invoice.Total, InvoiceLine.InvoiceLineId, InvoiceLine.InvoiceId, InvoiceLine.TrackId, InvoiceLine.UnitPrice, InvoiceLine.Quantity, MediaType.MediaTypeId, MediaType.Name, Playlist.PlaylistId, Playlist.Name, PlaylistTrack.PlaylistId, PlaylistTrack.TrackId, Track.TrackId, Track.Name, Track.AlbumId, Track.MediaTypeId, Track.GenreId, Track.Composer, Track.Milliseconds, Track.Bytes, Track.UnitPrice
Question: What are the names of artist who have the letter 'a' in their names? [/INST] | SELECT Name FROM ARTIST WHERE Name LIKE "%a%"; |
Tables: Album, Artist, Customer, Employee, Genre, Invoice, InvoiceLine, MediaType, Playlist, PlaylistTrack, Track
Columns: Album.AlbumId, Album.Title, Album.ArtistId, Artist.ArtistId, Artist.Name, Customer.CustomerId, Customer.FirstName, Customer.LastName, Customer.Company, Customer.Address, Customer.City, Customer.State, Customer.Country, Customer.PostalCode, Customer.Phone, Customer.Fax, Customer.Email, Customer.SupportRepId, Employee.EmployeeId, Employee.LastName, Employee.FirstName, Employee.Title, Employee.ReportsTo, Employee.BirthDate, Employee.HireDate, Employee.Address, Employee.City, Employee.State, Employee.Country, Employee.PostalCode, Employee.Phone, Employee.Fax, Employee.Email, Genre.GenreId, Genre.Name, Invoice.InvoiceId, Invoice.CustomerId, Invoice.InvoiceDate, Invoice.BillingAddress, Invoice.BillingCity, Invoice.BillingState, Invoice.BillingCountry, Invoice.BillingPostalCode, Invoice.Total, InvoiceLine.InvoiceLineId, InvoiceLine.InvoiceId, InvoiceLine.TrackId, InvoiceLine.UnitPrice, InvoiceLine.Quantity, MediaType.MediaTypeId, MediaType.Name, Playlist.PlaylistId, Playlist.Name, PlaylistTrack.PlaylistId, PlaylistTrack.TrackId, Track.TrackId, Track.Name, Track.AlbumId, Track.MediaTypeId, Track.GenreId, Track.Composer, Track.Milliseconds, Track.Bytes, Track.UnitPrice
Question: Find the title of all the albums of the artist "AC/DC". [/INST] | SELECT Title FROM ALBUM AS T1 JOIN ARTIST AS T2 ON T1.ArtistId = T2.ArtistId WHERE T2.Name = "AC/DC"; |
Tables: Album, Artist, Customer, Employee, Genre, Invoice, InvoiceLine, MediaType, Playlist, PlaylistTrack, Track
Columns: Album.AlbumId, Album.Title, Album.ArtistId, Artist.ArtistId, Artist.Name, Customer.CustomerId, Customer.FirstName, Customer.LastName, Customer.Company, Customer.Address, Customer.City, Customer.State, Customer.Country, Customer.PostalCode, Customer.Phone, Customer.Fax, Customer.Email, Customer.SupportRepId, Employee.EmployeeId, Employee.LastName, Employee.FirstName, Employee.Title, Employee.ReportsTo, Employee.BirthDate, Employee.HireDate, Employee.Address, Employee.City, Employee.State, Employee.Country, Employee.PostalCode, Employee.Phone, Employee.Fax, Employee.Email, Genre.GenreId, Genre.Name, Invoice.InvoiceId, Invoice.CustomerId, Invoice.InvoiceDate, Invoice.BillingAddress, Invoice.BillingCity, Invoice.BillingState, Invoice.BillingCountry, Invoice.BillingPostalCode, Invoice.Total, InvoiceLine.InvoiceLineId, InvoiceLine.InvoiceId, InvoiceLine.TrackId, InvoiceLine.UnitPrice, InvoiceLine.Quantity, MediaType.MediaTypeId, MediaType.Name, Playlist.PlaylistId, Playlist.Name, PlaylistTrack.PlaylistId, PlaylistTrack.TrackId, Track.TrackId, Track.Name, Track.AlbumId, Track.MediaTypeId, Track.GenreId, Track.Composer, Track.Milliseconds, Track.Bytes, Track.UnitPrice
Question: What are the titles of albums by the artist "AC/DC"? [/INST] | SELECT Title FROM ALBUM AS T1 JOIN ARTIST AS T2 ON T1.ArtistId = T2.ArtistId WHERE T2.Name = "AC/DC"; |
Tables: Album, Artist, Customer, Employee, Genre, Invoice, InvoiceLine, MediaType, Playlist, PlaylistTrack, Track
Columns: Album.AlbumId, Album.Title, Album.ArtistId, Artist.ArtistId, Artist.Name, Customer.CustomerId, Customer.FirstName, Customer.LastName, Customer.Company, Customer.Address, Customer.City, Customer.State, Customer.Country, Customer.PostalCode, Customer.Phone, Customer.Fax, Customer.Email, Customer.SupportRepId, Employee.EmployeeId, Employee.LastName, Employee.FirstName, Employee.Title, Employee.ReportsTo, Employee.BirthDate, Employee.HireDate, Employee.Address, Employee.City, Employee.State, Employee.Country, Employee.PostalCode, Employee.Phone, Employee.Fax, Employee.Email, Genre.GenreId, Genre.Name, Invoice.InvoiceId, Invoice.CustomerId, Invoice.InvoiceDate, Invoice.BillingAddress, Invoice.BillingCity, Invoice.BillingState, Invoice.BillingCountry, Invoice.BillingPostalCode, Invoice.Total, InvoiceLine.InvoiceLineId, InvoiceLine.InvoiceId, InvoiceLine.TrackId, InvoiceLine.UnitPrice, InvoiceLine.Quantity, MediaType.MediaTypeId, MediaType.Name, Playlist.PlaylistId, Playlist.Name, PlaylistTrack.PlaylistId, PlaylistTrack.TrackId, Track.TrackId, Track.Name, Track.AlbumId, Track.MediaTypeId, Track.GenreId, Track.Composer, Track.Milliseconds, Track.Bytes, Track.UnitPrice
Question: Hom many albums does the artist "Metallica" have? [/INST] | SELECT COUNT(*) FROM ALBUM AS T1 JOIN ARTIST AS T2 ON T1.ArtistId = T2.ArtistId WHERE T2.Name = "Metallica"; |
Tables: Album, Artist, Customer, Employee, Genre, Invoice, InvoiceLine, MediaType, Playlist, PlaylistTrack, Track
Columns: Album.AlbumId, Album.Title, Album.ArtistId, Artist.ArtistId, Artist.Name, Customer.CustomerId, Customer.FirstName, Customer.LastName, Customer.Company, Customer.Address, Customer.City, Customer.State, Customer.Country, Customer.PostalCode, Customer.Phone, Customer.Fax, Customer.Email, Customer.SupportRepId, Employee.EmployeeId, Employee.LastName, Employee.FirstName, Employee.Title, Employee.ReportsTo, Employee.BirthDate, Employee.HireDate, Employee.Address, Employee.City, Employee.State, Employee.Country, Employee.PostalCode, Employee.Phone, Employee.Fax, Employee.Email, Genre.GenreId, Genre.Name, Invoice.InvoiceId, Invoice.CustomerId, Invoice.InvoiceDate, Invoice.BillingAddress, Invoice.BillingCity, Invoice.BillingState, Invoice.BillingCountry, Invoice.BillingPostalCode, Invoice.Total, InvoiceLine.InvoiceLineId, InvoiceLine.InvoiceId, InvoiceLine.TrackId, InvoiceLine.UnitPrice, InvoiceLine.Quantity, MediaType.MediaTypeId, MediaType.Name, Playlist.PlaylistId, Playlist.Name, PlaylistTrack.PlaylistId, PlaylistTrack.TrackId, Track.TrackId, Track.Name, Track.AlbumId, Track.MediaTypeId, Track.GenreId, Track.Composer, Track.Milliseconds, Track.Bytes, Track.UnitPrice
Question: Find the number of albums by the artist "Metallica". [/INST] | SELECT COUNT(*) FROM ALBUM AS T1 JOIN ARTIST AS T2 ON T1.ArtistId = T2.ArtistId WHERE T2.Name = "Metallica"; |
Tables: Album, Artist, Customer, Employee, Genre, Invoice, InvoiceLine, MediaType, Playlist, PlaylistTrack, Track
Columns: Album.AlbumId, Album.Title, Album.ArtistId, Artist.ArtistId, Artist.Name, Customer.CustomerId, Customer.FirstName, Customer.LastName, Customer.Company, Customer.Address, Customer.City, Customer.State, Customer.Country, Customer.PostalCode, Customer.Phone, Customer.Fax, Customer.Email, Customer.SupportRepId, Employee.EmployeeId, Employee.LastName, Employee.FirstName, Employee.Title, Employee.ReportsTo, Employee.BirthDate, Employee.HireDate, Employee.Address, Employee.City, Employee.State, Employee.Country, Employee.PostalCode, Employee.Phone, Employee.Fax, Employee.Email, Genre.GenreId, Genre.Name, Invoice.InvoiceId, Invoice.CustomerId, Invoice.InvoiceDate, Invoice.BillingAddress, Invoice.BillingCity, Invoice.BillingState, Invoice.BillingCountry, Invoice.BillingPostalCode, Invoice.Total, InvoiceLine.InvoiceLineId, InvoiceLine.InvoiceId, InvoiceLine.TrackId, InvoiceLine.UnitPrice, InvoiceLine.Quantity, MediaType.MediaTypeId, MediaType.Name, Playlist.PlaylistId, Playlist.Name, PlaylistTrack.PlaylistId, PlaylistTrack.TrackId, Track.TrackId, Track.Name, Track.AlbumId, Track.MediaTypeId, Track.GenreId, Track.Composer, Track.Milliseconds, Track.Bytes, Track.UnitPrice
Question: Which artist does the album "Balls to the Wall" belong to? [/INST] | SELECT T2.Name FROM ALBUM AS T1 JOIN ARTIST AS T2 ON T1.ArtistId = T2.ArtistId WHERE T1.Title = "Balls to the Wall"; |
Tables: Album, Artist, Customer, Employee, Genre, Invoice, InvoiceLine, MediaType, Playlist, PlaylistTrack, Track
Columns: Album.AlbumId, Album.Title, Album.ArtistId, Artist.ArtistId, Artist.Name, Customer.CustomerId, Customer.FirstName, Customer.LastName, Customer.Company, Customer.Address, Customer.City, Customer.State, Customer.Country, Customer.PostalCode, Customer.Phone, Customer.Fax, Customer.Email, Customer.SupportRepId, Employee.EmployeeId, Employee.LastName, Employee.FirstName, Employee.Title, Employee.ReportsTo, Employee.BirthDate, Employee.HireDate, Employee.Address, Employee.City, Employee.State, Employee.Country, Employee.PostalCode, Employee.Phone, Employee.Fax, Employee.Email, Genre.GenreId, Genre.Name, Invoice.InvoiceId, Invoice.CustomerId, Invoice.InvoiceDate, Invoice.BillingAddress, Invoice.BillingCity, Invoice.BillingState, Invoice.BillingCountry, Invoice.BillingPostalCode, Invoice.Total, InvoiceLine.InvoiceLineId, InvoiceLine.InvoiceId, InvoiceLine.TrackId, InvoiceLine.UnitPrice, InvoiceLine.Quantity, MediaType.MediaTypeId, MediaType.Name, Playlist.PlaylistId, Playlist.Name, PlaylistTrack.PlaylistId, PlaylistTrack.TrackId, Track.TrackId, Track.Name, Track.AlbumId, Track.MediaTypeId, Track.GenreId, Track.Composer, Track.Milliseconds, Track.Bytes, Track.UnitPrice
Question: Find the name of the artist who made the album "Balls to the Wall". [/INST] | SELECT T2.Name FROM ALBUM AS T1 JOIN ARTIST AS T2 ON T1.ArtistId = T2.ArtistId WHERE T1.Title = "Balls to the Wall"; |
Tables: Album, Artist, Customer, Employee, Genre, Invoice, InvoiceLine, MediaType, Playlist, PlaylistTrack, Track
Columns: Album.AlbumId, Album.Title, Album.ArtistId, Artist.ArtistId, Artist.Name, Customer.CustomerId, Customer.FirstName, Customer.LastName, Customer.Company, Customer.Address, Customer.City, Customer.State, Customer.Country, Customer.PostalCode, Customer.Phone, Customer.Fax, Customer.Email, Customer.SupportRepId, Employee.EmployeeId, Employee.LastName, Employee.FirstName, Employee.Title, Employee.ReportsTo, Employee.BirthDate, Employee.HireDate, Employee.Address, Employee.City, Employee.State, Employee.Country, Employee.PostalCode, Employee.Phone, Employee.Fax, Employee.Email, Genre.GenreId, Genre.Name, Invoice.InvoiceId, Invoice.CustomerId, Invoice.InvoiceDate, Invoice.BillingAddress, Invoice.BillingCity, Invoice.BillingState, Invoice.BillingCountry, Invoice.BillingPostalCode, Invoice.Total, InvoiceLine.InvoiceLineId, InvoiceLine.InvoiceId, InvoiceLine.TrackId, InvoiceLine.UnitPrice, InvoiceLine.Quantity, MediaType.MediaTypeId, MediaType.Name, Playlist.PlaylistId, Playlist.Name, PlaylistTrack.PlaylistId, PlaylistTrack.TrackId, Track.TrackId, Track.Name, Track.AlbumId, Track.MediaTypeId, Track.GenreId, Track.Composer, Track.Milliseconds, Track.Bytes, Track.UnitPrice
Question: Which artist has the most albums? [/INST] | 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; |
Tables: Album, Artist, Customer, Employee, Genre, Invoice, InvoiceLine, MediaType, Playlist, PlaylistTrack, Track
Columns: Album.AlbumId, Album.Title, Album.ArtistId, Artist.ArtistId, Artist.Name, Customer.CustomerId, Customer.FirstName, Customer.LastName, Customer.Company, Customer.Address, Customer.City, Customer.State, Customer.Country, Customer.PostalCode, Customer.Phone, Customer.Fax, Customer.Email, Customer.SupportRepId, Employee.EmployeeId, Employee.LastName, Employee.FirstName, Employee.Title, Employee.ReportsTo, Employee.BirthDate, Employee.HireDate, Employee.Address, Employee.City, Employee.State, Employee.Country, Employee.PostalCode, Employee.Phone, Employee.Fax, Employee.Email, Genre.GenreId, Genre.Name, Invoice.InvoiceId, Invoice.CustomerId, Invoice.InvoiceDate, Invoice.BillingAddress, Invoice.BillingCity, Invoice.BillingState, Invoice.BillingCountry, Invoice.BillingPostalCode, Invoice.Total, InvoiceLine.InvoiceLineId, InvoiceLine.InvoiceId, InvoiceLine.TrackId, InvoiceLine.UnitPrice, InvoiceLine.Quantity, MediaType.MediaTypeId, MediaType.Name, Playlist.PlaylistId, Playlist.Name, PlaylistTrack.PlaylistId, PlaylistTrack.TrackId, Track.TrackId, Track.Name, Track.AlbumId, Track.MediaTypeId, Track.GenreId, Track.Composer, Track.Milliseconds, Track.Bytes, Track.UnitPrice
Question: What is the name of the artist with the greatest number of albums? [/INST] | 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; |
Tables: Album, Artist, Customer, Employee, Genre, Invoice, InvoiceLine, MediaType, Playlist, PlaylistTrack, Track
Columns: Album.AlbumId, Album.Title, Album.ArtistId, Artist.ArtistId, Artist.Name, Customer.CustomerId, Customer.FirstName, Customer.LastName, Customer.Company, Customer.Address, Customer.City, Customer.State, Customer.Country, Customer.PostalCode, Customer.Phone, Customer.Fax, Customer.Email, Customer.SupportRepId, Employee.EmployeeId, Employee.LastName, Employee.FirstName, Employee.Title, Employee.ReportsTo, Employee.BirthDate, Employee.HireDate, Employee.Address, Employee.City, Employee.State, Employee.Country, Employee.PostalCode, Employee.Phone, Employee.Fax, Employee.Email, Genre.GenreId, Genre.Name, Invoice.InvoiceId, Invoice.CustomerId, Invoice.InvoiceDate, Invoice.BillingAddress, Invoice.BillingCity, Invoice.BillingState, Invoice.BillingCountry, Invoice.BillingPostalCode, Invoice.Total, InvoiceLine.InvoiceLineId, InvoiceLine.InvoiceId, InvoiceLine.TrackId, InvoiceLine.UnitPrice, InvoiceLine.Quantity, MediaType.MediaTypeId, MediaType.Name, Playlist.PlaylistId, Playlist.Name, PlaylistTrack.PlaylistId, PlaylistTrack.TrackId, Track.TrackId, Track.Name, Track.AlbumId, Track.MediaTypeId, Track.GenreId, Track.Composer, Track.Milliseconds, Track.Bytes, Track.UnitPrice
Question: Find the names of all the tracks that contain the word "you". [/INST] | SELECT Name FROM TRACK WHERE Name LIKE '%you%'; |
Tables: Album, Artist, Customer, Employee, Genre, Invoice, InvoiceLine, MediaType, Playlist, PlaylistTrack, Track
Columns: Album.AlbumId, Album.Title, Album.ArtistId, Artist.ArtistId, Artist.Name, Customer.CustomerId, Customer.FirstName, Customer.LastName, Customer.Company, Customer.Address, Customer.City, Customer.State, Customer.Country, Customer.PostalCode, Customer.Phone, Customer.Fax, Customer.Email, Customer.SupportRepId, Employee.EmployeeId, Employee.LastName, Employee.FirstName, Employee.Title, Employee.ReportsTo, Employee.BirthDate, Employee.HireDate, Employee.Address, Employee.City, Employee.State, Employee.Country, Employee.PostalCode, Employee.Phone, Employee.Fax, Employee.Email, Genre.GenreId, Genre.Name, Invoice.InvoiceId, Invoice.CustomerId, Invoice.InvoiceDate, Invoice.BillingAddress, Invoice.BillingCity, Invoice.BillingState, Invoice.BillingCountry, Invoice.BillingPostalCode, Invoice.Total, InvoiceLine.InvoiceLineId, InvoiceLine.InvoiceId, InvoiceLine.TrackId, InvoiceLine.UnitPrice, InvoiceLine.Quantity, MediaType.MediaTypeId, MediaType.Name, Playlist.PlaylistId, Playlist.Name, PlaylistTrack.PlaylistId, PlaylistTrack.TrackId, Track.TrackId, Track.Name, Track.AlbumId, Track.MediaTypeId, Track.GenreId, Track.Composer, Track.Milliseconds, Track.Bytes, Track.UnitPrice
Question: What are the names of tracks that contain the the word you in them? [/INST] | SELECT Name FROM TRACK WHERE Name LIKE '%you%'; |
Tables: Album, Artist, Customer, Employee, Genre, Invoice, InvoiceLine, MediaType, Playlist, PlaylistTrack, Track
Columns: Album.AlbumId, Album.Title, Album.ArtistId, Artist.ArtistId, Artist.Name, Customer.CustomerId, Customer.FirstName, Customer.LastName, Customer.Company, Customer.Address, Customer.City, Customer.State, Customer.Country, Customer.PostalCode, Customer.Phone, Customer.Fax, Customer.Email, Customer.SupportRepId, Employee.EmployeeId, Employee.LastName, Employee.FirstName, Employee.Title, Employee.ReportsTo, Employee.BirthDate, Employee.HireDate, Employee.Address, Employee.City, Employee.State, Employee.Country, Employee.PostalCode, Employee.Phone, Employee.Fax, Employee.Email, Genre.GenreId, Genre.Name, Invoice.InvoiceId, Invoice.CustomerId, Invoice.InvoiceDate, Invoice.BillingAddress, Invoice.BillingCity, Invoice.BillingState, Invoice.BillingCountry, Invoice.BillingPostalCode, Invoice.Total, InvoiceLine.InvoiceLineId, InvoiceLine.InvoiceId, InvoiceLine.TrackId, InvoiceLine.UnitPrice, InvoiceLine.Quantity, MediaType.MediaTypeId, MediaType.Name, Playlist.PlaylistId, Playlist.Name, PlaylistTrack.PlaylistId, PlaylistTrack.TrackId, Track.TrackId, Track.Name, Track.AlbumId, Track.MediaTypeId, Track.GenreId, Track.Composer, Track.Milliseconds, Track.Bytes, Track.UnitPrice
Question: What is the average unit price of all the tracks? [/INST] | SELECT AVG(UnitPrice) FROM TRACK; |
Tables: Album, Artist, Customer, Employee, Genre, Invoice, InvoiceLine, MediaType, Playlist, PlaylistTrack, Track
Columns: Album.AlbumId, Album.Title, Album.ArtistId, Artist.ArtistId, Artist.Name, Customer.CustomerId, Customer.FirstName, Customer.LastName, Customer.Company, Customer.Address, Customer.City, Customer.State, Customer.Country, Customer.PostalCode, Customer.Phone, Customer.Fax, Customer.Email, Customer.SupportRepId, Employee.EmployeeId, Employee.LastName, Employee.FirstName, Employee.Title, Employee.ReportsTo, Employee.BirthDate, Employee.HireDate, Employee.Address, Employee.City, Employee.State, Employee.Country, Employee.PostalCode, Employee.Phone, Employee.Fax, Employee.Email, Genre.GenreId, Genre.Name, Invoice.InvoiceId, Invoice.CustomerId, Invoice.InvoiceDate, Invoice.BillingAddress, Invoice.BillingCity, Invoice.BillingState, Invoice.BillingCountry, Invoice.BillingPostalCode, Invoice.Total, InvoiceLine.InvoiceLineId, InvoiceLine.InvoiceId, InvoiceLine.TrackId, InvoiceLine.UnitPrice, InvoiceLine.Quantity, MediaType.MediaTypeId, MediaType.Name, Playlist.PlaylistId, Playlist.Name, PlaylistTrack.PlaylistId, PlaylistTrack.TrackId, Track.TrackId, Track.Name, Track.AlbumId, Track.MediaTypeId, Track.GenreId, Track.Composer, Track.Milliseconds, Track.Bytes, Track.UnitPrice
Question: Find the average unit price for a track. [/INST] | SELECT AVG(UnitPrice) FROM TRACK; |
Tables: Album, Artist, Customer, Employee, Genre, Invoice, InvoiceLine, MediaType, Playlist, PlaylistTrack, Track
Columns: Album.AlbumId, Album.Title, Album.ArtistId, Artist.ArtistId, Artist.Name, Customer.CustomerId, Customer.FirstName, Customer.LastName, Customer.Company, Customer.Address, Customer.City, Customer.State, Customer.Country, Customer.PostalCode, Customer.Phone, Customer.Fax, Customer.Email, Customer.SupportRepId, Employee.EmployeeId, Employee.LastName, Employee.FirstName, Employee.Title, Employee.ReportsTo, Employee.BirthDate, Employee.HireDate, Employee.Address, Employee.City, Employee.State, Employee.Country, Employee.PostalCode, Employee.Phone, Employee.Fax, Employee.Email, Genre.GenreId, Genre.Name, Invoice.InvoiceId, Invoice.CustomerId, Invoice.InvoiceDate, Invoice.BillingAddress, Invoice.BillingCity, Invoice.BillingState, Invoice.BillingCountry, Invoice.BillingPostalCode, Invoice.Total, InvoiceLine.InvoiceLineId, InvoiceLine.InvoiceId, InvoiceLine.TrackId, InvoiceLine.UnitPrice, InvoiceLine.Quantity, MediaType.MediaTypeId, MediaType.Name, Playlist.PlaylistId, Playlist.Name, PlaylistTrack.PlaylistId, PlaylistTrack.TrackId, Track.TrackId, Track.Name, Track.AlbumId, Track.MediaTypeId, Track.GenreId, Track.Composer, Track.Milliseconds, Track.Bytes, Track.UnitPrice
Question: What are the durations of the longest and the shortest tracks in milliseconds? [/INST] | SELECT max(Milliseconds) , min(Milliseconds) FROM TRACK; |
Tables: Album, Artist, Customer, Employee, Genre, Invoice, InvoiceLine, MediaType, Playlist, PlaylistTrack, Track
Columns: Album.AlbumId, Album.Title, Album.ArtistId, Artist.ArtistId, Artist.Name, Customer.CustomerId, Customer.FirstName, Customer.LastName, Customer.Company, Customer.Address, Customer.City, Customer.State, Customer.Country, Customer.PostalCode, Customer.Phone, Customer.Fax, Customer.Email, Customer.SupportRepId, Employee.EmployeeId, Employee.LastName, Employee.FirstName, Employee.Title, Employee.ReportsTo, Employee.BirthDate, Employee.HireDate, Employee.Address, Employee.City, Employee.State, Employee.Country, Employee.PostalCode, Employee.Phone, Employee.Fax, Employee.Email, Genre.GenreId, Genre.Name, Invoice.InvoiceId, Invoice.CustomerId, Invoice.InvoiceDate, Invoice.BillingAddress, Invoice.BillingCity, Invoice.BillingState, Invoice.BillingCountry, Invoice.BillingPostalCode, Invoice.Total, InvoiceLine.InvoiceLineId, InvoiceLine.InvoiceId, InvoiceLine.TrackId, InvoiceLine.UnitPrice, InvoiceLine.Quantity, MediaType.MediaTypeId, MediaType.Name, Playlist.PlaylistId, Playlist.Name, PlaylistTrack.PlaylistId, PlaylistTrack.TrackId, Track.TrackId, Track.Name, Track.AlbumId, Track.MediaTypeId, Track.GenreId, Track.Composer, Track.Milliseconds, Track.Bytes, Track.UnitPrice
Question: Find the maximum and minimum durations of tracks in milliseconds. [/INST] | SELECT max(Milliseconds) , min(Milliseconds) FROM TRACK; |
Tables: Album, Artist, Customer, Employee, Genre, Invoice, InvoiceLine, MediaType, Playlist, PlaylistTrack, Track
Columns: Album.AlbumId, Album.Title, Album.ArtistId, Artist.ArtistId, Artist.Name, Customer.CustomerId, Customer.FirstName, Customer.LastName, Customer.Company, Customer.Address, Customer.City, Customer.State, Customer.Country, Customer.PostalCode, Customer.Phone, Customer.Fax, Customer.Email, Customer.SupportRepId, Employee.EmployeeId, Employee.LastName, Employee.FirstName, Employee.Title, Employee.ReportsTo, Employee.BirthDate, Employee.HireDate, Employee.Address, Employee.City, Employee.State, Employee.Country, Employee.PostalCode, Employee.Phone, Employee.Fax, Employee.Email, Genre.GenreId, Genre.Name, Invoice.InvoiceId, Invoice.CustomerId, Invoice.InvoiceDate, Invoice.BillingAddress, Invoice.BillingCity, Invoice.BillingState, Invoice.BillingCountry, Invoice.BillingPostalCode, Invoice.Total, InvoiceLine.InvoiceLineId, InvoiceLine.InvoiceId, InvoiceLine.TrackId, InvoiceLine.UnitPrice, InvoiceLine.Quantity, MediaType.MediaTypeId, MediaType.Name, Playlist.PlaylistId, Playlist.Name, PlaylistTrack.PlaylistId, PlaylistTrack.TrackId, Track.TrackId, Track.Name, Track.AlbumId, Track.MediaTypeId, Track.GenreId, Track.Composer, Track.Milliseconds, Track.Bytes, Track.UnitPrice
Question: Show the album names, ids and the number of tracks for each album. [/INST] | SELECT T1.Title , T2.AlbumID , COUNT(*) FROM ALBUM AS T1 JOIN TRACK AS T2 ON T1.AlbumId = T2.AlbumId GROUP BY T2.AlbumID; |
Tables: Album, Artist, Customer, Employee, Genre, Invoice, InvoiceLine, MediaType, Playlist, PlaylistTrack, Track
Columns: Album.AlbumId, Album.Title, Album.ArtistId, Artist.ArtistId, Artist.Name, Customer.CustomerId, Customer.FirstName, Customer.LastName, Customer.Company, Customer.Address, Customer.City, Customer.State, Customer.Country, Customer.PostalCode, Customer.Phone, Customer.Fax, Customer.Email, Customer.SupportRepId, Employee.EmployeeId, Employee.LastName, Employee.FirstName, Employee.Title, Employee.ReportsTo, Employee.BirthDate, Employee.HireDate, Employee.Address, Employee.City, Employee.State, Employee.Country, Employee.PostalCode, Employee.Phone, Employee.Fax, Employee.Email, Genre.GenreId, Genre.Name, Invoice.InvoiceId, Invoice.CustomerId, Invoice.InvoiceDate, Invoice.BillingAddress, Invoice.BillingCity, Invoice.BillingState, Invoice.BillingCountry, Invoice.BillingPostalCode, Invoice.Total, InvoiceLine.InvoiceLineId, InvoiceLine.InvoiceId, InvoiceLine.TrackId, InvoiceLine.UnitPrice, InvoiceLine.Quantity, MediaType.MediaTypeId, MediaType.Name, Playlist.PlaylistId, Playlist.Name, PlaylistTrack.PlaylistId, PlaylistTrack.TrackId, Track.TrackId, Track.Name, Track.AlbumId, Track.MediaTypeId, Track.GenreId, Track.Composer, Track.Milliseconds, Track.Bytes, Track.UnitPrice
Question: What are the names and ids of the different albums, and how many tracks are on each? [/INST] | SELECT T1.Title , T2.AlbumID , COUNT(*) FROM ALBUM AS T1 JOIN TRACK AS T2 ON T1.AlbumId = T2.AlbumId GROUP BY T2.AlbumID; |
Tables: Album, Artist, Customer, Employee, Genre, Invoice, InvoiceLine, MediaType, Playlist, PlaylistTrack, Track
Columns: Album.AlbumId, Album.Title, Album.ArtistId, Artist.ArtistId, Artist.Name, Customer.CustomerId, Customer.FirstName, Customer.LastName, Customer.Company, Customer.Address, Customer.City, Customer.State, Customer.Country, Customer.PostalCode, Customer.Phone, Customer.Fax, Customer.Email, Customer.SupportRepId, Employee.EmployeeId, Employee.LastName, Employee.FirstName, Employee.Title, Employee.ReportsTo, Employee.BirthDate, Employee.HireDate, Employee.Address, Employee.City, Employee.State, Employee.Country, Employee.PostalCode, Employee.Phone, Employee.Fax, Employee.Email, Genre.GenreId, Genre.Name, Invoice.InvoiceId, Invoice.CustomerId, Invoice.InvoiceDate, Invoice.BillingAddress, Invoice.BillingCity, Invoice.BillingState, Invoice.BillingCountry, Invoice.BillingPostalCode, Invoice.Total, InvoiceLine.InvoiceLineId, InvoiceLine.InvoiceId, InvoiceLine.TrackId, InvoiceLine.UnitPrice, InvoiceLine.Quantity, MediaType.MediaTypeId, MediaType.Name, Playlist.PlaylistId, Playlist.Name, PlaylistTrack.PlaylistId, PlaylistTrack.TrackId, Track.TrackId, Track.Name, Track.AlbumId, Track.MediaTypeId, Track.GenreId, Track.Composer, Track.Milliseconds, Track.Bytes, Track.UnitPrice
Question: What is the name of the most common genre in all tracks? [/INST] | 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; |
Tables: Album, Artist, Customer, Employee, Genre, Invoice, InvoiceLine, MediaType, Playlist, PlaylistTrack, Track
Columns: Album.AlbumId, Album.Title, Album.ArtistId, Artist.ArtistId, Artist.Name, Customer.CustomerId, Customer.FirstName, Customer.LastName, Customer.Company, Customer.Address, Customer.City, Customer.State, Customer.Country, Customer.PostalCode, Customer.Phone, Customer.Fax, Customer.Email, Customer.SupportRepId, Employee.EmployeeId, Employee.LastName, Employee.FirstName, Employee.Title, Employee.ReportsTo, Employee.BirthDate, Employee.HireDate, Employee.Address, Employee.City, Employee.State, Employee.Country, Employee.PostalCode, Employee.Phone, Employee.Fax, Employee.Email, Genre.GenreId, Genre.Name, Invoice.InvoiceId, Invoice.CustomerId, Invoice.InvoiceDate, Invoice.BillingAddress, Invoice.BillingCity, Invoice.BillingState, Invoice.BillingCountry, Invoice.BillingPostalCode, Invoice.Total, InvoiceLine.InvoiceLineId, InvoiceLine.InvoiceId, InvoiceLine.TrackId, InvoiceLine.UnitPrice, InvoiceLine.Quantity, MediaType.MediaTypeId, MediaType.Name, Playlist.PlaylistId, Playlist.Name, PlaylistTrack.PlaylistId, PlaylistTrack.TrackId, Track.TrackId, Track.Name, Track.AlbumId, Track.MediaTypeId, Track.GenreId, Track.Composer, Track.Milliseconds, Track.Bytes, Track.UnitPrice
Question: Find the name of the genre that is most frequent across all tracks. [/INST] | 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; |
Tables: Album, Artist, Customer, Employee, Genre, Invoice, InvoiceLine, MediaType, Playlist, PlaylistTrack, Track
Columns: Album.AlbumId, Album.Title, Album.ArtistId, Artist.ArtistId, Artist.Name, Customer.CustomerId, Customer.FirstName, Customer.LastName, Customer.Company, Customer.Address, Customer.City, Customer.State, Customer.Country, Customer.PostalCode, Customer.Phone, Customer.Fax, Customer.Email, Customer.SupportRepId, Employee.EmployeeId, Employee.LastName, Employee.FirstName, Employee.Title, Employee.ReportsTo, Employee.BirthDate, Employee.HireDate, Employee.Address, Employee.City, Employee.State, Employee.Country, Employee.PostalCode, Employee.Phone, Employee.Fax, Employee.Email, Genre.GenreId, Genre.Name, Invoice.InvoiceId, Invoice.CustomerId, Invoice.InvoiceDate, Invoice.BillingAddress, Invoice.BillingCity, Invoice.BillingState, Invoice.BillingCountry, Invoice.BillingPostalCode, Invoice.Total, InvoiceLine.InvoiceLineId, InvoiceLine.InvoiceId, InvoiceLine.TrackId, InvoiceLine.UnitPrice, InvoiceLine.Quantity, MediaType.MediaTypeId, MediaType.Name, Playlist.PlaylistId, Playlist.Name, PlaylistTrack.PlaylistId, PlaylistTrack.TrackId, Track.TrackId, Track.Name, Track.AlbumId, Track.MediaTypeId, Track.GenreId, Track.Composer, Track.Milliseconds, Track.Bytes, Track.UnitPrice
Question: What is the least common media type in all tracks? [/INST] | 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; |
Tables: Album, Artist, Customer, Employee, Genre, Invoice, InvoiceLine, MediaType, Playlist, PlaylistTrack, Track
Columns: Album.AlbumId, Album.Title, Album.ArtistId, Artist.ArtistId, Artist.Name, Customer.CustomerId, Customer.FirstName, Customer.LastName, Customer.Company, Customer.Address, Customer.City, Customer.State, Customer.Country, Customer.PostalCode, Customer.Phone, Customer.Fax, Customer.Email, Customer.SupportRepId, Employee.EmployeeId, Employee.LastName, Employee.FirstName, Employee.Title, Employee.ReportsTo, Employee.BirthDate, Employee.HireDate, Employee.Address, Employee.City, Employee.State, Employee.Country, Employee.PostalCode, Employee.Phone, Employee.Fax, Employee.Email, Genre.GenreId, Genre.Name, Invoice.InvoiceId, Invoice.CustomerId, Invoice.InvoiceDate, Invoice.BillingAddress, Invoice.BillingCity, Invoice.BillingState, Invoice.BillingCountry, Invoice.BillingPostalCode, Invoice.Total, InvoiceLine.InvoiceLineId, InvoiceLine.InvoiceId, InvoiceLine.TrackId, InvoiceLine.UnitPrice, InvoiceLine.Quantity, MediaType.MediaTypeId, MediaType.Name, Playlist.PlaylistId, Playlist.Name, PlaylistTrack.PlaylistId, PlaylistTrack.TrackId, Track.TrackId, Track.Name, Track.AlbumId, Track.MediaTypeId, Track.GenreId, Track.Composer, Track.Milliseconds, Track.Bytes, Track.UnitPrice
Question: What is the name of the media type that is least common across all tracks? [/INST] | 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; |
Tables: Album, Artist, Customer, Employee, Genre, Invoice, InvoiceLine, MediaType, Playlist, PlaylistTrack, Track
Columns: Album.AlbumId, Album.Title, Album.ArtistId, Artist.ArtistId, Artist.Name, Customer.CustomerId, Customer.FirstName, Customer.LastName, Customer.Company, Customer.Address, Customer.City, Customer.State, Customer.Country, Customer.PostalCode, Customer.Phone, Customer.Fax, Customer.Email, Customer.SupportRepId, Employee.EmployeeId, Employee.LastName, Employee.FirstName, Employee.Title, Employee.ReportsTo, Employee.BirthDate, Employee.HireDate, Employee.Address, Employee.City, Employee.State, Employee.Country, Employee.PostalCode, Employee.Phone, Employee.Fax, Employee.Email, Genre.GenreId, Genre.Name, Invoice.InvoiceId, Invoice.CustomerId, Invoice.InvoiceDate, Invoice.BillingAddress, Invoice.BillingCity, Invoice.BillingState, Invoice.BillingCountry, Invoice.BillingPostalCode, Invoice.Total, InvoiceLine.InvoiceLineId, InvoiceLine.InvoiceId, InvoiceLine.TrackId, InvoiceLine.UnitPrice, InvoiceLine.Quantity, MediaType.MediaTypeId, MediaType.Name, Playlist.PlaylistId, Playlist.Name, PlaylistTrack.PlaylistId, PlaylistTrack.TrackId, Track.TrackId, Track.Name, Track.AlbumId, Track.MediaTypeId, Track.GenreId, Track.Composer, Track.Milliseconds, Track.Bytes, Track.UnitPrice
Question: Show the album names and ids for albums that contain tracks with unit price bigger than 1. [/INST] | 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; |
Tables: Album, Artist, Customer, Employee, Genre, Invoice, InvoiceLine, MediaType, Playlist, PlaylistTrack, Track
Columns: Album.AlbumId, Album.Title, Album.ArtistId, Artist.ArtistId, Artist.Name, Customer.CustomerId, Customer.FirstName, Customer.LastName, Customer.Company, Customer.Address, Customer.City, Customer.State, Customer.Country, Customer.PostalCode, Customer.Phone, Customer.Fax, Customer.Email, Customer.SupportRepId, Employee.EmployeeId, Employee.LastName, Employee.FirstName, Employee.Title, Employee.ReportsTo, Employee.BirthDate, Employee.HireDate, Employee.Address, Employee.City, Employee.State, Employee.Country, Employee.PostalCode, Employee.Phone, Employee.Fax, Employee.Email, Genre.GenreId, Genre.Name, Invoice.InvoiceId, Invoice.CustomerId, Invoice.InvoiceDate, Invoice.BillingAddress, Invoice.BillingCity, Invoice.BillingState, Invoice.BillingCountry, Invoice.BillingPostalCode, Invoice.Total, InvoiceLine.InvoiceLineId, InvoiceLine.InvoiceId, InvoiceLine.TrackId, InvoiceLine.UnitPrice, InvoiceLine.Quantity, MediaType.MediaTypeId, MediaType.Name, Playlist.PlaylistId, Playlist.Name, PlaylistTrack.PlaylistId, PlaylistTrack.TrackId, Track.TrackId, Track.Name, Track.AlbumId, Track.MediaTypeId, Track.GenreId, Track.Composer, Track.Milliseconds, Track.Bytes, Track.UnitPrice
Question: What are the titles and ids for albums containing tracks with unit price greater than 1? [/INST] | 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; |
Tables: Album, Artist, Customer, Employee, Genre, Invoice, InvoiceLine, MediaType, Playlist, PlaylistTrack, Track
Columns: Album.AlbumId, Album.Title, Album.ArtistId, Artist.ArtistId, Artist.Name, Customer.CustomerId, Customer.FirstName, Customer.LastName, Customer.Company, Customer.Address, Customer.City, Customer.State, Customer.Country, Customer.PostalCode, Customer.Phone, Customer.Fax, Customer.Email, Customer.SupportRepId, Employee.EmployeeId, Employee.LastName, Employee.FirstName, Employee.Title, Employee.ReportsTo, Employee.BirthDate, Employee.HireDate, Employee.Address, Employee.City, Employee.State, Employee.Country, Employee.PostalCode, Employee.Phone, Employee.Fax, Employee.Email, Genre.GenreId, Genre.Name, Invoice.InvoiceId, Invoice.CustomerId, Invoice.InvoiceDate, Invoice.BillingAddress, Invoice.BillingCity, Invoice.BillingState, Invoice.BillingCountry, Invoice.BillingPostalCode, Invoice.Total, InvoiceLine.InvoiceLineId, InvoiceLine.InvoiceId, InvoiceLine.TrackId, InvoiceLine.UnitPrice, InvoiceLine.Quantity, MediaType.MediaTypeId, MediaType.Name, Playlist.PlaylistId, Playlist.Name, PlaylistTrack.PlaylistId, PlaylistTrack.TrackId, Track.TrackId, Track.Name, Track.AlbumId, Track.MediaTypeId, Track.GenreId, Track.Composer, Track.Milliseconds, Track.Bytes, Track.UnitPrice
Question: How many tracks belong to rock genre? [/INST] | SELECT COUNT(*) FROM GENRE AS T1 JOIN TRACK AS T2 ON T1.GenreId = T2.GenreId WHERE T1.Name = "Rock"; |
Tables: Album, Artist, Customer, Employee, Genre, Invoice, InvoiceLine, MediaType, Playlist, PlaylistTrack, Track
Columns: Album.AlbumId, Album.Title, Album.ArtistId, Artist.ArtistId, Artist.Name, Customer.CustomerId, Customer.FirstName, Customer.LastName, Customer.Company, Customer.Address, Customer.City, Customer.State, Customer.Country, Customer.PostalCode, Customer.Phone, Customer.Fax, Customer.Email, Customer.SupportRepId, Employee.EmployeeId, Employee.LastName, Employee.FirstName, Employee.Title, Employee.ReportsTo, Employee.BirthDate, Employee.HireDate, Employee.Address, Employee.City, Employee.State, Employee.Country, Employee.PostalCode, Employee.Phone, Employee.Fax, Employee.Email, Genre.GenreId, Genre.Name, Invoice.InvoiceId, Invoice.CustomerId, Invoice.InvoiceDate, Invoice.BillingAddress, Invoice.BillingCity, Invoice.BillingState, Invoice.BillingCountry, Invoice.BillingPostalCode, Invoice.Total, InvoiceLine.InvoiceLineId, InvoiceLine.InvoiceId, InvoiceLine.TrackId, InvoiceLine.UnitPrice, InvoiceLine.Quantity, MediaType.MediaTypeId, MediaType.Name, Playlist.PlaylistId, Playlist.Name, PlaylistTrack.PlaylistId, PlaylistTrack.TrackId, Track.TrackId, Track.Name, Track.AlbumId, Track.MediaTypeId, Track.GenreId, Track.Composer, Track.Milliseconds, Track.Bytes, Track.UnitPrice
Question: Count the number of tracks that are part of the rock genre. [/INST] | SELECT COUNT(*) FROM GENRE AS T1 JOIN TRACK AS T2 ON T1.GenreId = T2.GenreId WHERE T1.Name = "Rock"; |
Tables: Album, Artist, Customer, Employee, Genre, Invoice, InvoiceLine, MediaType, Playlist, PlaylistTrack, Track
Columns: Album.AlbumId, Album.Title, Album.ArtistId, Artist.ArtistId, Artist.Name, Customer.CustomerId, Customer.FirstName, Customer.LastName, Customer.Company, Customer.Address, Customer.City, Customer.State, Customer.Country, Customer.PostalCode, Customer.Phone, Customer.Fax, Customer.Email, Customer.SupportRepId, Employee.EmployeeId, Employee.LastName, Employee.FirstName, Employee.Title, Employee.ReportsTo, Employee.BirthDate, Employee.HireDate, Employee.Address, Employee.City, Employee.State, Employee.Country, Employee.PostalCode, Employee.Phone, Employee.Fax, Employee.Email, Genre.GenreId, Genre.Name, Invoice.InvoiceId, Invoice.CustomerId, Invoice.InvoiceDate, Invoice.BillingAddress, Invoice.BillingCity, Invoice.BillingState, Invoice.BillingCountry, Invoice.BillingPostalCode, Invoice.Total, InvoiceLine.InvoiceLineId, InvoiceLine.InvoiceId, InvoiceLine.TrackId, InvoiceLine.UnitPrice, InvoiceLine.Quantity, MediaType.MediaTypeId, MediaType.Name, Playlist.PlaylistId, Playlist.Name, PlaylistTrack.PlaylistId, PlaylistTrack.TrackId, Track.TrackId, Track.Name, Track.AlbumId, Track.MediaTypeId, Track.GenreId, Track.Composer, Track.Milliseconds, Track.Bytes, Track.UnitPrice
Question: What is the average unit price of tracks that belong to Jazz genre? [/INST] | SELECT AVG(UnitPrice) FROM GENRE AS T1 JOIN TRACK AS T2 ON T1.GenreId = T2.GenreId WHERE T1.Name = "Jazz"; |
Tables: Album, Artist, Customer, Employee, Genre, Invoice, InvoiceLine, MediaType, Playlist, PlaylistTrack, Track
Columns: Album.AlbumId, Album.Title, Album.ArtistId, Artist.ArtistId, Artist.Name, Customer.CustomerId, Customer.FirstName, Customer.LastName, Customer.Company, Customer.Address, Customer.City, Customer.State, Customer.Country, Customer.PostalCode, Customer.Phone, Customer.Fax, Customer.Email, Customer.SupportRepId, Employee.EmployeeId, Employee.LastName, Employee.FirstName, Employee.Title, Employee.ReportsTo, Employee.BirthDate, Employee.HireDate, Employee.Address, Employee.City, Employee.State, Employee.Country, Employee.PostalCode, Employee.Phone, Employee.Fax, Employee.Email, Genre.GenreId, Genre.Name, Invoice.InvoiceId, Invoice.CustomerId, Invoice.InvoiceDate, Invoice.BillingAddress, Invoice.BillingCity, Invoice.BillingState, Invoice.BillingCountry, Invoice.BillingPostalCode, Invoice.Total, InvoiceLine.InvoiceLineId, InvoiceLine.InvoiceId, InvoiceLine.TrackId, InvoiceLine.UnitPrice, InvoiceLine.Quantity, MediaType.MediaTypeId, MediaType.Name, Playlist.PlaylistId, Playlist.Name, PlaylistTrack.PlaylistId, PlaylistTrack.TrackId, Track.TrackId, Track.Name, Track.AlbumId, Track.MediaTypeId, Track.GenreId, Track.Composer, Track.Milliseconds, Track.Bytes, Track.UnitPrice
Question: Find the average unit price of jazz tracks. [/INST] | SELECT AVG(UnitPrice) FROM GENRE AS T1 JOIN TRACK AS T2 ON T1.GenreId = T2.GenreId WHERE T1.Name = "Jazz"; |
Tables: Album, Artist, Customer, Employee, Genre, Invoice, InvoiceLine, MediaType, Playlist, PlaylistTrack, Track
Columns: Album.AlbumId, Album.Title, Album.ArtistId, Artist.ArtistId, Artist.Name, Customer.CustomerId, Customer.FirstName, Customer.LastName, Customer.Company, Customer.Address, Customer.City, Customer.State, Customer.Country, Customer.PostalCode, Customer.Phone, Customer.Fax, Customer.Email, Customer.SupportRepId, Employee.EmployeeId, Employee.LastName, Employee.FirstName, Employee.Title, Employee.ReportsTo, Employee.BirthDate, Employee.HireDate, Employee.Address, Employee.City, Employee.State, Employee.Country, Employee.PostalCode, Employee.Phone, Employee.Fax, Employee.Email, Genre.GenreId, Genre.Name, Invoice.InvoiceId, Invoice.CustomerId, Invoice.InvoiceDate, Invoice.BillingAddress, Invoice.BillingCity, Invoice.BillingState, Invoice.BillingCountry, Invoice.BillingPostalCode, Invoice.Total, InvoiceLine.InvoiceLineId, InvoiceLine.InvoiceId, InvoiceLine.TrackId, InvoiceLine.UnitPrice, InvoiceLine.Quantity, MediaType.MediaTypeId, MediaType.Name, Playlist.PlaylistId, Playlist.Name, PlaylistTrack.PlaylistId, PlaylistTrack.TrackId, Track.TrackId, Track.Name, Track.AlbumId, Track.MediaTypeId, Track.GenreId, Track.Composer, Track.Milliseconds, Track.Bytes, Track.UnitPrice
Question: What is the first name and last name of the customer that has email "luisg@embraer.com.br"? [/INST] | SELECT FirstName , LastName FROM CUSTOMER WHERE Email = "luisg@embraer.com.br"; |
Tables: Album, Artist, Customer, Employee, Genre, Invoice, InvoiceLine, MediaType, Playlist, PlaylistTrack, Track
Columns: Album.AlbumId, Album.Title, Album.ArtistId, Artist.ArtistId, Artist.Name, Customer.CustomerId, Customer.FirstName, Customer.LastName, Customer.Company, Customer.Address, Customer.City, Customer.State, Customer.Country, Customer.PostalCode, Customer.Phone, Customer.Fax, Customer.Email, Customer.SupportRepId, Employee.EmployeeId, Employee.LastName, Employee.FirstName, Employee.Title, Employee.ReportsTo, Employee.BirthDate, Employee.HireDate, Employee.Address, Employee.City, Employee.State, Employee.Country, Employee.PostalCode, Employee.Phone, Employee.Fax, Employee.Email, Genre.GenreId, Genre.Name, Invoice.InvoiceId, Invoice.CustomerId, Invoice.InvoiceDate, Invoice.BillingAddress, Invoice.BillingCity, Invoice.BillingState, Invoice.BillingCountry, Invoice.BillingPostalCode, Invoice.Total, InvoiceLine.InvoiceLineId, InvoiceLine.InvoiceId, InvoiceLine.TrackId, InvoiceLine.UnitPrice, InvoiceLine.Quantity, MediaType.MediaTypeId, MediaType.Name, Playlist.PlaylistId, Playlist.Name, PlaylistTrack.PlaylistId, PlaylistTrack.TrackId, Track.TrackId, Track.Name, Track.AlbumId, Track.MediaTypeId, Track.GenreId, Track.Composer, Track.Milliseconds, Track.Bytes, Track.UnitPrice
Question: Find the full name of the customer with the email "luisg@embraer.com.br". [/INST] | SELECT FirstName , LastName FROM CUSTOMER WHERE Email = "luisg@embraer.com.br"; |
Tables: Album, Artist, Customer, Employee, Genre, Invoice, InvoiceLine, MediaType, Playlist, PlaylistTrack, Track
Columns: Album.AlbumId, Album.Title, Album.ArtistId, Artist.ArtistId, Artist.Name, Customer.CustomerId, Customer.FirstName, Customer.LastName, Customer.Company, Customer.Address, Customer.City, Customer.State, Customer.Country, Customer.PostalCode, Customer.Phone, Customer.Fax, Customer.Email, Customer.SupportRepId, Employee.EmployeeId, Employee.LastName, Employee.FirstName, Employee.Title, Employee.ReportsTo, Employee.BirthDate, Employee.HireDate, Employee.Address, Employee.City, Employee.State, Employee.Country, Employee.PostalCode, Employee.Phone, Employee.Fax, Employee.Email, Genre.GenreId, Genre.Name, Invoice.InvoiceId, Invoice.CustomerId, Invoice.InvoiceDate, Invoice.BillingAddress, Invoice.BillingCity, Invoice.BillingState, Invoice.BillingCountry, Invoice.BillingPostalCode, Invoice.Total, InvoiceLine.InvoiceLineId, InvoiceLine.InvoiceId, InvoiceLine.TrackId, InvoiceLine.UnitPrice, InvoiceLine.Quantity, MediaType.MediaTypeId, MediaType.Name, Playlist.PlaylistId, Playlist.Name, PlaylistTrack.PlaylistId, PlaylistTrack.TrackId, Track.TrackId, Track.Name, Track.AlbumId, Track.MediaTypeId, Track.GenreId, Track.Composer, Track.Milliseconds, Track.Bytes, Track.UnitPrice
Question: How many customers have email that contains "gmail.com"? [/INST] | SELECT COUNT(*) FROM CUSTOMER WHERE Email LIKE "%gmail.com%"; |
Tables: Album, Artist, Customer, Employee, Genre, Invoice, InvoiceLine, MediaType, Playlist, PlaylistTrack, Track
Columns: Album.AlbumId, Album.Title, Album.ArtistId, Artist.ArtistId, Artist.Name, Customer.CustomerId, Customer.FirstName, Customer.LastName, Customer.Company, Customer.Address, Customer.City, Customer.State, Customer.Country, Customer.PostalCode, Customer.Phone, Customer.Fax, Customer.Email, Customer.SupportRepId, Employee.EmployeeId, Employee.LastName, Employee.FirstName, Employee.Title, Employee.ReportsTo, Employee.BirthDate, Employee.HireDate, Employee.Address, Employee.City, Employee.State, Employee.Country, Employee.PostalCode, Employee.Phone, Employee.Fax, Employee.Email, Genre.GenreId, Genre.Name, Invoice.InvoiceId, Invoice.CustomerId, Invoice.InvoiceDate, Invoice.BillingAddress, Invoice.BillingCity, Invoice.BillingState, Invoice.BillingCountry, Invoice.BillingPostalCode, Invoice.Total, InvoiceLine.InvoiceLineId, InvoiceLine.InvoiceId, InvoiceLine.TrackId, InvoiceLine.UnitPrice, InvoiceLine.Quantity, MediaType.MediaTypeId, MediaType.Name, Playlist.PlaylistId, Playlist.Name, PlaylistTrack.PlaylistId, PlaylistTrack.TrackId, Track.TrackId, Track.Name, Track.AlbumId, Track.MediaTypeId, Track.GenreId, Track.Composer, Track.Milliseconds, Track.Bytes, Track.UnitPrice
Question: Count the number of customers that have an email containing "gmail.com". [/INST] | SELECT COUNT(*) FROM CUSTOMER WHERE Email LIKE "%gmail.com%"; |
Tables: Album, Artist, Customer, Employee, Genre, Invoice, InvoiceLine, MediaType, Playlist, PlaylistTrack, Track
Columns: Album.AlbumId, Album.Title, Album.ArtistId, Artist.ArtistId, Artist.Name, Customer.CustomerId, Customer.FirstName, Customer.LastName, Customer.Company, Customer.Address, Customer.City, Customer.State, Customer.Country, Customer.PostalCode, Customer.Phone, Customer.Fax, Customer.Email, Customer.SupportRepId, Employee.EmployeeId, Employee.LastName, Employee.FirstName, Employee.Title, Employee.ReportsTo, Employee.BirthDate, Employee.HireDate, Employee.Address, Employee.City, Employee.State, Employee.Country, Employee.PostalCode, Employee.Phone, Employee.Fax, Employee.Email, Genre.GenreId, Genre.Name, Invoice.InvoiceId, Invoice.CustomerId, Invoice.InvoiceDate, Invoice.BillingAddress, Invoice.BillingCity, Invoice.BillingState, Invoice.BillingCountry, Invoice.BillingPostalCode, Invoice.Total, InvoiceLine.InvoiceLineId, InvoiceLine.InvoiceId, InvoiceLine.TrackId, InvoiceLine.UnitPrice, InvoiceLine.Quantity, MediaType.MediaTypeId, MediaType.Name, Playlist.PlaylistId, Playlist.Name, PlaylistTrack.PlaylistId, PlaylistTrack.TrackId, Track.TrackId, Track.Name, Track.AlbumId, Track.MediaTypeId, Track.GenreId, Track.Composer, Track.Milliseconds, Track.Bytes, Track.UnitPrice
Question: What is the first name and last name employee helps the customer with first name Leonie? [/INST] | SELECT T2.FirstName , T2.LastName FROM CUSTOMER AS T1 JOIN EMPLOYEE AS T2 ON T1.SupportRepId = T2.EmployeeId WHERE T1.FirstName = "Leonie"; |
Tables: Album, Artist, Customer, Employee, Genre, Invoice, InvoiceLine, MediaType, Playlist, PlaylistTrack, Track
Columns: Album.AlbumId, Album.Title, Album.ArtistId, Artist.ArtistId, Artist.Name, Customer.CustomerId, Customer.FirstName, Customer.LastName, Customer.Company, Customer.Address, Customer.City, Customer.State, Customer.Country, Customer.PostalCode, Customer.Phone, Customer.Fax, Customer.Email, Customer.SupportRepId, Employee.EmployeeId, Employee.LastName, Employee.FirstName, Employee.Title, Employee.ReportsTo, Employee.BirthDate, Employee.HireDate, Employee.Address, Employee.City, Employee.State, Employee.Country, Employee.PostalCode, Employee.Phone, Employee.Fax, Employee.Email, Genre.GenreId, Genre.Name, Invoice.InvoiceId, Invoice.CustomerId, Invoice.InvoiceDate, Invoice.BillingAddress, Invoice.BillingCity, Invoice.BillingState, Invoice.BillingCountry, Invoice.BillingPostalCode, Invoice.Total, InvoiceLine.InvoiceLineId, InvoiceLine.InvoiceId, InvoiceLine.TrackId, InvoiceLine.UnitPrice, InvoiceLine.Quantity, MediaType.MediaTypeId, MediaType.Name, Playlist.PlaylistId, Playlist.Name, PlaylistTrack.PlaylistId, PlaylistTrack.TrackId, Track.TrackId, Track.Name, Track.AlbumId, Track.MediaTypeId, Track.GenreId, Track.Composer, Track.Milliseconds, Track.Bytes, Track.UnitPrice
Question: Find the full names of employees who help customers with the first name Leonie. [/INST] | SELECT T2.FirstName , T2.LastName FROM CUSTOMER AS T1 JOIN EMPLOYEE AS T2 ON T1.SupportRepId = T2.EmployeeId WHERE T1.FirstName = "Leonie"; |
Tables: Album, Artist, Customer, Employee, Genre, Invoice, InvoiceLine, MediaType, Playlist, PlaylistTrack, Track
Columns: Album.AlbumId, Album.Title, Album.ArtistId, Artist.ArtistId, Artist.Name, Customer.CustomerId, Customer.FirstName, Customer.LastName, Customer.Company, Customer.Address, Customer.City, Customer.State, Customer.Country, Customer.PostalCode, Customer.Phone, Customer.Fax, Customer.Email, Customer.SupportRepId, Employee.EmployeeId, Employee.LastName, Employee.FirstName, Employee.Title, Employee.ReportsTo, Employee.BirthDate, Employee.HireDate, Employee.Address, Employee.City, Employee.State, Employee.Country, Employee.PostalCode, Employee.Phone, Employee.Fax, Employee.Email, Genre.GenreId, Genre.Name, Invoice.InvoiceId, Invoice.CustomerId, Invoice.InvoiceDate, Invoice.BillingAddress, Invoice.BillingCity, Invoice.BillingState, Invoice.BillingCountry, Invoice.BillingPostalCode, Invoice.Total, InvoiceLine.InvoiceLineId, InvoiceLine.InvoiceId, InvoiceLine.TrackId, InvoiceLine.UnitPrice, InvoiceLine.Quantity, MediaType.MediaTypeId, MediaType.Name, Playlist.PlaylistId, Playlist.Name, PlaylistTrack.PlaylistId, PlaylistTrack.TrackId, Track.TrackId, Track.Name, Track.AlbumId, Track.MediaTypeId, Track.GenreId, Track.Composer, Track.Milliseconds, Track.Bytes, Track.UnitPrice
Question: What city does the employee who helps the customer with postal code 70174 live in? [/INST] | SELECT T2.City FROM CUSTOMER AS T1 JOIN EMPLOYEE AS T2 ON T1.SupportRepId = T2.EmployeeId WHERE T1.PostalCode = "70174"; |
Tables: Album, Artist, Customer, Employee, Genre, Invoice, InvoiceLine, MediaType, Playlist, PlaylistTrack, Track
Columns: Album.AlbumId, Album.Title, Album.ArtistId, Artist.ArtistId, Artist.Name, Customer.CustomerId, Customer.FirstName, Customer.LastName, Customer.Company, Customer.Address, Customer.City, Customer.State, Customer.Country, Customer.PostalCode, Customer.Phone, Customer.Fax, Customer.Email, Customer.SupportRepId, Employee.EmployeeId, Employee.LastName, Employee.FirstName, Employee.Title, Employee.ReportsTo, Employee.BirthDate, Employee.HireDate, Employee.Address, Employee.City, Employee.State, Employee.Country, Employee.PostalCode, Employee.Phone, Employee.Fax, Employee.Email, Genre.GenreId, Genre.Name, Invoice.InvoiceId, Invoice.CustomerId, Invoice.InvoiceDate, Invoice.BillingAddress, Invoice.BillingCity, Invoice.BillingState, Invoice.BillingCountry, Invoice.BillingPostalCode, Invoice.Total, InvoiceLine.InvoiceLineId, InvoiceLine.InvoiceId, InvoiceLine.TrackId, InvoiceLine.UnitPrice, InvoiceLine.Quantity, MediaType.MediaTypeId, MediaType.Name, Playlist.PlaylistId, Playlist.Name, PlaylistTrack.PlaylistId, PlaylistTrack.TrackId, Track.TrackId, Track.Name, Track.AlbumId, Track.MediaTypeId, Track.GenreId, Track.Composer, Track.Milliseconds, Track.Bytes, Track.UnitPrice
Question: Find the cities corresponding to employees who help customers with the postal code 70174. [/INST] | SELECT T2.City FROM CUSTOMER AS T1 JOIN EMPLOYEE AS T2 ON T1.SupportRepId = T2.EmployeeId WHERE T1.PostalCode = "70174"; |
Tables: Album, Artist, Customer, Employee, Genre, Invoice, InvoiceLine, MediaType, Playlist, PlaylistTrack, Track
Columns: Album.AlbumId, Album.Title, Album.ArtistId, Artist.ArtistId, Artist.Name, Customer.CustomerId, Customer.FirstName, Customer.LastName, Customer.Company, Customer.Address, Customer.City, Customer.State, Customer.Country, Customer.PostalCode, Customer.Phone, Customer.Fax, Customer.Email, Customer.SupportRepId, Employee.EmployeeId, Employee.LastName, Employee.FirstName, Employee.Title, Employee.ReportsTo, Employee.BirthDate, Employee.HireDate, Employee.Address, Employee.City, Employee.State, Employee.Country, Employee.PostalCode, Employee.Phone, Employee.Fax, Employee.Email, Genre.GenreId, Genre.Name, Invoice.InvoiceId, Invoice.CustomerId, Invoice.InvoiceDate, Invoice.BillingAddress, Invoice.BillingCity, Invoice.BillingState, Invoice.BillingCountry, Invoice.BillingPostalCode, Invoice.Total, InvoiceLine.InvoiceLineId, InvoiceLine.InvoiceId, InvoiceLine.TrackId, InvoiceLine.UnitPrice, InvoiceLine.Quantity, MediaType.MediaTypeId, MediaType.Name, Playlist.PlaylistId, Playlist.Name, PlaylistTrack.PlaylistId, PlaylistTrack.TrackId, Track.TrackId, Track.Name, Track.AlbumId, Track.MediaTypeId, Track.GenreId, Track.Composer, Track.Milliseconds, Track.Bytes, Track.UnitPrice
Question: How many distinct cities does the employees live in? [/INST] | SELECT COUNT(DISTINCT city) FROM EMPLOYEE; |
Tables: Album, Artist, Customer, Employee, Genre, Invoice, InvoiceLine, MediaType, Playlist, PlaylistTrack, Track
Columns: Album.AlbumId, Album.Title, Album.ArtistId, Artist.ArtistId, Artist.Name, Customer.CustomerId, Customer.FirstName, Customer.LastName, Customer.Company, Customer.Address, Customer.City, Customer.State, Customer.Country, Customer.PostalCode, Customer.Phone, Customer.Fax, Customer.Email, Customer.SupportRepId, Employee.EmployeeId, Employee.LastName, Employee.FirstName, Employee.Title, Employee.ReportsTo, Employee.BirthDate, Employee.HireDate, Employee.Address, Employee.City, Employee.State, Employee.Country, Employee.PostalCode, Employee.Phone, Employee.Fax, Employee.Email, Genre.GenreId, Genre.Name, Invoice.InvoiceId, Invoice.CustomerId, Invoice.InvoiceDate, Invoice.BillingAddress, Invoice.BillingCity, Invoice.BillingState, Invoice.BillingCountry, Invoice.BillingPostalCode, Invoice.Total, InvoiceLine.InvoiceLineId, InvoiceLine.InvoiceId, InvoiceLine.TrackId, InvoiceLine.UnitPrice, InvoiceLine.Quantity, MediaType.MediaTypeId, MediaType.Name, Playlist.PlaylistId, Playlist.Name, PlaylistTrack.PlaylistId, PlaylistTrack.TrackId, Track.TrackId, Track.Name, Track.AlbumId, Track.MediaTypeId, Track.GenreId, Track.Composer, Track.Milliseconds, Track.Bytes, Track.UnitPrice
Question: Find the number of different cities that employees live in. [/INST] | SELECT COUNT(DISTINCT city) FROM EMPLOYEE; |
Tables: Album, Artist, Customer, Employee, Genre, Invoice, InvoiceLine, MediaType, Playlist, PlaylistTrack, Track
Columns: Album.AlbumId, Album.Title, Album.ArtistId, Artist.ArtistId, Artist.Name, Customer.CustomerId, Customer.FirstName, Customer.LastName, Customer.Company, Customer.Address, Customer.City, Customer.State, Customer.Country, Customer.PostalCode, Customer.Phone, Customer.Fax, Customer.Email, Customer.SupportRepId, Employee.EmployeeId, Employee.LastName, Employee.FirstName, Employee.Title, Employee.ReportsTo, Employee.BirthDate, Employee.HireDate, Employee.Address, Employee.City, Employee.State, Employee.Country, Employee.PostalCode, Employee.Phone, Employee.Fax, Employee.Email, Genre.GenreId, Genre.Name, Invoice.InvoiceId, Invoice.CustomerId, Invoice.InvoiceDate, Invoice.BillingAddress, Invoice.BillingCity, Invoice.BillingState, Invoice.BillingCountry, Invoice.BillingPostalCode, Invoice.Total, InvoiceLine.InvoiceLineId, InvoiceLine.InvoiceId, InvoiceLine.TrackId, InvoiceLine.UnitPrice, InvoiceLine.Quantity, MediaType.MediaTypeId, MediaType.Name, Playlist.PlaylistId, Playlist.Name, PlaylistTrack.PlaylistId, PlaylistTrack.TrackId, Track.TrackId, Track.Name, Track.AlbumId, Track.MediaTypeId, Track.GenreId, Track.Composer, Track.Milliseconds, Track.Bytes, Track.UnitPrice
Question: Find all invoice dates corresponding to customers with first name Astrid and last name Gruber. [/INST] | SELECT T2.InvoiceDate FROM CUSTOMER AS T1 JOIN INVOICE AS T2 ON T1.CustomerId = T2.CustomerId WHERE T1.FirstName = "Astrid" AND LastName = "Gruber"; |
Tables: Album, Artist, Customer, Employee, Genre, Invoice, InvoiceLine, MediaType, Playlist, PlaylistTrack, Track
Columns: Album.AlbumId, Album.Title, Album.ArtistId, Artist.ArtistId, Artist.Name, Customer.CustomerId, Customer.FirstName, Customer.LastName, Customer.Company, Customer.Address, Customer.City, Customer.State, Customer.Country, Customer.PostalCode, Customer.Phone, Customer.Fax, Customer.Email, Customer.SupportRepId, Employee.EmployeeId, Employee.LastName, Employee.FirstName, Employee.Title, Employee.ReportsTo, Employee.BirthDate, Employee.HireDate, Employee.Address, Employee.City, Employee.State, Employee.Country, Employee.PostalCode, Employee.Phone, Employee.Fax, Employee.Email, Genre.GenreId, Genre.Name, Invoice.InvoiceId, Invoice.CustomerId, Invoice.InvoiceDate, Invoice.BillingAddress, Invoice.BillingCity, Invoice.BillingState, Invoice.BillingCountry, Invoice.BillingPostalCode, Invoice.Total, InvoiceLine.InvoiceLineId, InvoiceLine.InvoiceId, InvoiceLine.TrackId, InvoiceLine.UnitPrice, InvoiceLine.Quantity, MediaType.MediaTypeId, MediaType.Name, Playlist.PlaylistId, Playlist.Name, PlaylistTrack.PlaylistId, PlaylistTrack.TrackId, Track.TrackId, Track.Name, Track.AlbumId, Track.MediaTypeId, Track.GenreId, Track.Composer, Track.Milliseconds, Track.Bytes, Track.UnitPrice
Question: What are the invoice dates for customers with the first name Astrid and the last name Gruber? [/INST] | SELECT T2.InvoiceDate FROM CUSTOMER AS T1 JOIN INVOICE AS T2 ON T1.CustomerId = T2.CustomerId WHERE T1.FirstName = "Astrid" AND LastName = "Gruber"; |
Tables: Album, Artist, Customer, Employee, Genre, Invoice, InvoiceLine, MediaType, Playlist, PlaylistTrack, Track
Columns: Album.AlbumId, Album.Title, Album.ArtistId, Artist.ArtistId, Artist.Name, Customer.CustomerId, Customer.FirstName, Customer.LastName, Customer.Company, Customer.Address, Customer.City, Customer.State, Customer.Country, Customer.PostalCode, Customer.Phone, Customer.Fax, Customer.Email, Customer.SupportRepId, Employee.EmployeeId, Employee.LastName, Employee.FirstName, Employee.Title, Employee.ReportsTo, Employee.BirthDate, Employee.HireDate, Employee.Address, Employee.City, Employee.State, Employee.Country, Employee.PostalCode, Employee.Phone, Employee.Fax, Employee.Email, Genre.GenreId, Genre.Name, Invoice.InvoiceId, Invoice.CustomerId, Invoice.InvoiceDate, Invoice.BillingAddress, Invoice.BillingCity, Invoice.BillingState, Invoice.BillingCountry, Invoice.BillingPostalCode, Invoice.Total, InvoiceLine.InvoiceLineId, InvoiceLine.InvoiceId, InvoiceLine.TrackId, InvoiceLine.UnitPrice, InvoiceLine.Quantity, MediaType.MediaTypeId, MediaType.Name, Playlist.PlaylistId, Playlist.Name, PlaylistTrack.PlaylistId, PlaylistTrack.TrackId, Track.TrackId, Track.Name, Track.AlbumId, Track.MediaTypeId, Track.GenreId, Track.Composer, Track.Milliseconds, Track.Bytes, Track.UnitPrice
Question: Find all the customer last names that do not have invoice totals larger than 20. [/INST] | 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; |
Tables: Album, Artist, Customer, Employee, Genre, Invoice, InvoiceLine, MediaType, Playlist, PlaylistTrack, Track
Columns: Album.AlbumId, Album.Title, Album.ArtistId, Artist.ArtistId, Artist.Name, Customer.CustomerId, Customer.FirstName, Customer.LastName, Customer.Company, Customer.Address, Customer.City, Customer.State, Customer.Country, Customer.PostalCode, Customer.Phone, Customer.Fax, Customer.Email, Customer.SupportRepId, Employee.EmployeeId, Employee.LastName, Employee.FirstName, Employee.Title, Employee.ReportsTo, Employee.BirthDate, Employee.HireDate, Employee.Address, Employee.City, Employee.State, Employee.Country, Employee.PostalCode, Employee.Phone, Employee.Fax, Employee.Email, Genre.GenreId, Genre.Name, Invoice.InvoiceId, Invoice.CustomerId, Invoice.InvoiceDate, Invoice.BillingAddress, Invoice.BillingCity, Invoice.BillingState, Invoice.BillingCountry, Invoice.BillingPostalCode, Invoice.Total, InvoiceLine.InvoiceLineId, InvoiceLine.InvoiceId, InvoiceLine.TrackId, InvoiceLine.UnitPrice, InvoiceLine.Quantity, MediaType.MediaTypeId, MediaType.Name, Playlist.PlaylistId, Playlist.Name, PlaylistTrack.PlaylistId, PlaylistTrack.TrackId, Track.TrackId, Track.Name, Track.AlbumId, Track.MediaTypeId, Track.GenreId, Track.Composer, Track.Milliseconds, Track.Bytes, Track.UnitPrice
Question: What are the last names of customers without invoice totals exceeding 20? [/INST] | 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; |
Tables: Album, Artist, Customer, Employee, Genre, Invoice, InvoiceLine, MediaType, Playlist, PlaylistTrack, Track
Columns: Album.AlbumId, Album.Title, Album.ArtistId, Artist.ArtistId, Artist.Name, Customer.CustomerId, Customer.FirstName, Customer.LastName, Customer.Company, Customer.Address, Customer.City, Customer.State, Customer.Country, Customer.PostalCode, Customer.Phone, Customer.Fax, Customer.Email, Customer.SupportRepId, Employee.EmployeeId, Employee.LastName, Employee.FirstName, Employee.Title, Employee.ReportsTo, Employee.BirthDate, Employee.HireDate, Employee.Address, Employee.City, Employee.State, Employee.Country, Employee.PostalCode, Employee.Phone, Employee.Fax, Employee.Email, Genre.GenreId, Genre.Name, Invoice.InvoiceId, Invoice.CustomerId, Invoice.InvoiceDate, Invoice.BillingAddress, Invoice.BillingCity, Invoice.BillingState, Invoice.BillingCountry, Invoice.BillingPostalCode, Invoice.Total, InvoiceLine.InvoiceLineId, InvoiceLine.InvoiceId, InvoiceLine.TrackId, InvoiceLine.UnitPrice, InvoiceLine.Quantity, MediaType.MediaTypeId, MediaType.Name, Playlist.PlaylistId, Playlist.Name, PlaylistTrack.PlaylistId, PlaylistTrack.TrackId, Track.TrackId, Track.Name, Track.AlbumId, Track.MediaTypeId, Track.GenreId, Track.Composer, Track.Milliseconds, Track.Bytes, Track.UnitPrice
Question: Find the first names of all customers that live in Brazil and have an invoice. [/INST] | SELECT DISTINCT T1.FirstName FROM CUSTOMER AS T1 JOIN INVOICE AS T2 ON T1.CustomerId = T2.CustomerId WHERE T1.country = "Brazil"; |
Tables: Album, Artist, Customer, Employee, Genre, Invoice, InvoiceLine, MediaType, Playlist, PlaylistTrack, Track
Columns: Album.AlbumId, Album.Title, Album.ArtistId, Artist.ArtistId, Artist.Name, Customer.CustomerId, Customer.FirstName, Customer.LastName, Customer.Company, Customer.Address, Customer.City, Customer.State, Customer.Country, Customer.PostalCode, Customer.Phone, Customer.Fax, Customer.Email, Customer.SupportRepId, Employee.EmployeeId, Employee.LastName, Employee.FirstName, Employee.Title, Employee.ReportsTo, Employee.BirthDate, Employee.HireDate, Employee.Address, Employee.City, Employee.State, Employee.Country, Employee.PostalCode, Employee.Phone, Employee.Fax, Employee.Email, Genre.GenreId, Genre.Name, Invoice.InvoiceId, Invoice.CustomerId, Invoice.InvoiceDate, Invoice.BillingAddress, Invoice.BillingCity, Invoice.BillingState, Invoice.BillingCountry, Invoice.BillingPostalCode, Invoice.Total, InvoiceLine.InvoiceLineId, InvoiceLine.InvoiceId, InvoiceLine.TrackId, InvoiceLine.UnitPrice, InvoiceLine.Quantity, MediaType.MediaTypeId, MediaType.Name, Playlist.PlaylistId, Playlist.Name, PlaylistTrack.PlaylistId, PlaylistTrack.TrackId, Track.TrackId, Track.Name, Track.AlbumId, Track.MediaTypeId, Track.GenreId, Track.Composer, Track.Milliseconds, Track.Bytes, Track.UnitPrice
Question: What are the different first names for customers from Brazil who have also had an invoice? [/INST] | SELECT DISTINCT T1.FirstName FROM CUSTOMER AS T1 JOIN INVOICE AS T2 ON T1.CustomerId = T2.CustomerId WHERE T1.country = "Brazil"; |
Tables: Album, Artist, Customer, Employee, Genre, Invoice, InvoiceLine, MediaType, Playlist, PlaylistTrack, Track
Columns: Album.AlbumId, Album.Title, Album.ArtistId, Artist.ArtistId, Artist.Name, Customer.CustomerId, Customer.FirstName, Customer.LastName, Customer.Company, Customer.Address, Customer.City, Customer.State, Customer.Country, Customer.PostalCode, Customer.Phone, Customer.Fax, Customer.Email, Customer.SupportRepId, Employee.EmployeeId, Employee.LastName, Employee.FirstName, Employee.Title, Employee.ReportsTo, Employee.BirthDate, Employee.HireDate, Employee.Address, Employee.City, Employee.State, Employee.Country, Employee.PostalCode, Employee.Phone, Employee.Fax, Employee.Email, Genre.GenreId, Genre.Name, Invoice.InvoiceId, Invoice.CustomerId, Invoice.InvoiceDate, Invoice.BillingAddress, Invoice.BillingCity, Invoice.BillingState, Invoice.BillingCountry, Invoice.BillingPostalCode, Invoice.Total, InvoiceLine.InvoiceLineId, InvoiceLine.InvoiceId, InvoiceLine.TrackId, InvoiceLine.UnitPrice, InvoiceLine.Quantity, MediaType.MediaTypeId, MediaType.Name, Playlist.PlaylistId, Playlist.Name, PlaylistTrack.PlaylistId, PlaylistTrack.TrackId, Track.TrackId, Track.Name, Track.AlbumId, Track.MediaTypeId, Track.GenreId, Track.Composer, Track.Milliseconds, Track.Bytes, Track.UnitPrice
Question: Find the address of all customers that live in Germany and have invoice. [/INST] | SELECT DISTINCT T1.Address FROM CUSTOMER AS T1 JOIN INVOICE AS T2 ON T1.CustomerId = T2.CustomerId WHERE T1.country = "Germany"; |
Tables: Album, Artist, Customer, Employee, Genre, Invoice, InvoiceLine, MediaType, Playlist, PlaylistTrack, Track
Columns: Album.AlbumId, Album.Title, Album.ArtistId, Artist.ArtistId, Artist.Name, Customer.CustomerId, Customer.FirstName, Customer.LastName, Customer.Company, Customer.Address, Customer.City, Customer.State, Customer.Country, Customer.PostalCode, Customer.Phone, Customer.Fax, Customer.Email, Customer.SupportRepId, Employee.EmployeeId, Employee.LastName, Employee.FirstName, Employee.Title, Employee.ReportsTo, Employee.BirthDate, Employee.HireDate, Employee.Address, Employee.City, Employee.State, Employee.Country, Employee.PostalCode, Employee.Phone, Employee.Fax, Employee.Email, Genre.GenreId, Genre.Name, Invoice.InvoiceId, Invoice.CustomerId, Invoice.InvoiceDate, Invoice.BillingAddress, Invoice.BillingCity, Invoice.BillingState, Invoice.BillingCountry, Invoice.BillingPostalCode, Invoice.Total, InvoiceLine.InvoiceLineId, InvoiceLine.InvoiceId, InvoiceLine.TrackId, InvoiceLine.UnitPrice, InvoiceLine.Quantity, MediaType.MediaTypeId, MediaType.Name, Playlist.PlaylistId, Playlist.Name, PlaylistTrack.PlaylistId, PlaylistTrack.TrackId, Track.TrackId, Track.Name, Track.AlbumId, Track.MediaTypeId, Track.GenreId, Track.Composer, Track.Milliseconds, Track.Bytes, Track.UnitPrice
Question: What are the addresses of customers living in Germany who have had an invoice? [/INST] | SELECT DISTINCT T1.Address FROM CUSTOMER AS T1 JOIN INVOICE AS T2 ON T1.CustomerId = T2.CustomerId WHERE T1.country = "Germany"; |
Tables: Album, Artist, Customer, Employee, Genre, Invoice, InvoiceLine, MediaType, Playlist, PlaylistTrack, Track
Columns: Album.AlbumId, Album.Title, Album.ArtistId, Artist.ArtistId, Artist.Name, Customer.CustomerId, Customer.FirstName, Customer.LastName, Customer.Company, Customer.Address, Customer.City, Customer.State, Customer.Country, Customer.PostalCode, Customer.Phone, Customer.Fax, Customer.Email, Customer.SupportRepId, Employee.EmployeeId, Employee.LastName, Employee.FirstName, Employee.Title, Employee.ReportsTo, Employee.BirthDate, Employee.HireDate, Employee.Address, Employee.City, Employee.State, Employee.Country, Employee.PostalCode, Employee.Phone, Employee.Fax, Employee.Email, Genre.GenreId, Genre.Name, Invoice.InvoiceId, Invoice.CustomerId, Invoice.InvoiceDate, Invoice.BillingAddress, Invoice.BillingCity, Invoice.BillingState, Invoice.BillingCountry, Invoice.BillingPostalCode, Invoice.Total, InvoiceLine.InvoiceLineId, InvoiceLine.InvoiceId, InvoiceLine.TrackId, InvoiceLine.UnitPrice, InvoiceLine.Quantity, MediaType.MediaTypeId, MediaType.Name, Playlist.PlaylistId, Playlist.Name, PlaylistTrack.PlaylistId, PlaylistTrack.TrackId, Track.TrackId, Track.Name, Track.AlbumId, Track.MediaTypeId, Track.GenreId, Track.Composer, Track.Milliseconds, Track.Bytes, Track.UnitPrice
Question: List the phone numbers of all employees. [/INST] | SELECT Phone FROM EMPLOYEE; |
Tables: Album, Artist, Customer, Employee, Genre, Invoice, InvoiceLine, MediaType, Playlist, PlaylistTrack, Track
Columns: Album.AlbumId, Album.Title, Album.ArtistId, Artist.ArtistId, Artist.Name, Customer.CustomerId, Customer.FirstName, Customer.LastName, Customer.Company, Customer.Address, Customer.City, Customer.State, Customer.Country, Customer.PostalCode, Customer.Phone, Customer.Fax, Customer.Email, Customer.SupportRepId, Employee.EmployeeId, Employee.LastName, Employee.FirstName, Employee.Title, Employee.ReportsTo, Employee.BirthDate, Employee.HireDate, Employee.Address, Employee.City, Employee.State, Employee.Country, Employee.PostalCode, Employee.Phone, Employee.Fax, Employee.Email, Genre.GenreId, Genre.Name, Invoice.InvoiceId, Invoice.CustomerId, Invoice.InvoiceDate, Invoice.BillingAddress, Invoice.BillingCity, Invoice.BillingState, Invoice.BillingCountry, Invoice.BillingPostalCode, Invoice.Total, InvoiceLine.InvoiceLineId, InvoiceLine.InvoiceId, InvoiceLine.TrackId, InvoiceLine.UnitPrice, InvoiceLine.Quantity, MediaType.MediaTypeId, MediaType.Name, Playlist.PlaylistId, Playlist.Name, PlaylistTrack.PlaylistId, PlaylistTrack.TrackId, Track.TrackId, Track.Name, Track.AlbumId, Track.MediaTypeId, Track.GenreId, Track.Composer, Track.Milliseconds, Track.Bytes, Track.UnitPrice
Question: What are the phone numbers for each employee? [/INST] | SELECT Phone FROM EMPLOYEE; |
Tables: Album, Artist, Customer, Employee, Genre, Invoice, InvoiceLine, MediaType, Playlist, PlaylistTrack, Track
Columns: Album.AlbumId, Album.Title, Album.ArtistId, Artist.ArtistId, Artist.Name, Customer.CustomerId, Customer.FirstName, Customer.LastName, Customer.Company, Customer.Address, Customer.City, Customer.State, Customer.Country, Customer.PostalCode, Customer.Phone, Customer.Fax, Customer.Email, Customer.SupportRepId, Employee.EmployeeId, Employee.LastName, Employee.FirstName, Employee.Title, Employee.ReportsTo, Employee.BirthDate, Employee.HireDate, Employee.Address, Employee.City, Employee.State, Employee.Country, Employee.PostalCode, Employee.Phone, Employee.Fax, Employee.Email, Genre.GenreId, Genre.Name, Invoice.InvoiceId, Invoice.CustomerId, Invoice.InvoiceDate, Invoice.BillingAddress, Invoice.BillingCity, Invoice.BillingState, Invoice.BillingCountry, Invoice.BillingPostalCode, Invoice.Total, InvoiceLine.InvoiceLineId, InvoiceLine.InvoiceId, InvoiceLine.TrackId, InvoiceLine.UnitPrice, InvoiceLine.Quantity, MediaType.MediaTypeId, MediaType.Name, Playlist.PlaylistId, Playlist.Name, PlaylistTrack.PlaylistId, PlaylistTrack.TrackId, Track.TrackId, Track.Name, Track.AlbumId, Track.MediaTypeId, Track.GenreId, Track.Composer, Track.Milliseconds, Track.Bytes, Track.UnitPrice
Question: How many tracks are in the AAC audio file media type? [/INST] | SELECT COUNT(*) FROM MEDIATYPE AS T1 JOIN TRACK AS T2 ON T1.MediaTypeId = T2.MediaTypeId WHERE T1.Name = "AAC audio file"; |
Tables: Album, Artist, Customer, Employee, Genre, Invoice, InvoiceLine, MediaType, Playlist, PlaylistTrack, Track
Columns: Album.AlbumId, Album.Title, Album.ArtistId, Artist.ArtistId, Artist.Name, Customer.CustomerId, Customer.FirstName, Customer.LastName, Customer.Company, Customer.Address, Customer.City, Customer.State, Customer.Country, Customer.PostalCode, Customer.Phone, Customer.Fax, Customer.Email, Customer.SupportRepId, Employee.EmployeeId, Employee.LastName, Employee.FirstName, Employee.Title, Employee.ReportsTo, Employee.BirthDate, Employee.HireDate, Employee.Address, Employee.City, Employee.State, Employee.Country, Employee.PostalCode, Employee.Phone, Employee.Fax, Employee.Email, Genre.GenreId, Genre.Name, Invoice.InvoiceId, Invoice.CustomerId, Invoice.InvoiceDate, Invoice.BillingAddress, Invoice.BillingCity, Invoice.BillingState, Invoice.BillingCountry, Invoice.BillingPostalCode, Invoice.Total, InvoiceLine.InvoiceLineId, InvoiceLine.InvoiceId, InvoiceLine.TrackId, InvoiceLine.UnitPrice, InvoiceLine.Quantity, MediaType.MediaTypeId, MediaType.Name, Playlist.PlaylistId, Playlist.Name, PlaylistTrack.PlaylistId, PlaylistTrack.TrackId, Track.TrackId, Track.Name, Track.AlbumId, Track.MediaTypeId, Track.GenreId, Track.Composer, Track.Milliseconds, Track.Bytes, Track.UnitPrice
Question: Count the number of tracks that are of the media type "AAC audio file". [/INST] | SELECT COUNT(*) FROM MEDIATYPE AS T1 JOIN TRACK AS T2 ON T1.MediaTypeId = T2.MediaTypeId WHERE T1.Name = "AAC audio file"; |
Tables: Album, Artist, Customer, Employee, Genre, Invoice, InvoiceLine, MediaType, Playlist, PlaylistTrack, Track
Columns: Album.AlbumId, Album.Title, Album.ArtistId, Artist.ArtistId, Artist.Name, Customer.CustomerId, Customer.FirstName, Customer.LastName, Customer.Company, Customer.Address, Customer.City, Customer.State, Customer.Country, Customer.PostalCode, Customer.Phone, Customer.Fax, Customer.Email, Customer.SupportRepId, Employee.EmployeeId, Employee.LastName, Employee.FirstName, Employee.Title, Employee.ReportsTo, Employee.BirthDate, Employee.HireDate, Employee.Address, Employee.City, Employee.State, Employee.Country, Employee.PostalCode, Employee.Phone, Employee.Fax, Employee.Email, Genre.GenreId, Genre.Name, Invoice.InvoiceId, Invoice.CustomerId, Invoice.InvoiceDate, Invoice.BillingAddress, Invoice.BillingCity, Invoice.BillingState, Invoice.BillingCountry, Invoice.BillingPostalCode, Invoice.Total, InvoiceLine.InvoiceLineId, InvoiceLine.InvoiceId, InvoiceLine.TrackId, InvoiceLine.UnitPrice, InvoiceLine.Quantity, MediaType.MediaTypeId, MediaType.Name, Playlist.PlaylistId, Playlist.Name, PlaylistTrack.PlaylistId, PlaylistTrack.TrackId, Track.TrackId, Track.Name, Track.AlbumId, Track.MediaTypeId, Track.GenreId, Track.Composer, Track.Milliseconds, Track.Bytes, Track.UnitPrice
Question: What is the average duration in milliseconds of tracks that belong to Latin or Pop genre? [/INST] | SELECT AVG(Milliseconds) FROM GENRE AS T1 JOIN TRACK AS T2 ON T1.GenreId = T2.GenreId WHERE T1.Name = "Latin" OR T1.Name = "Pop"; |
Tables: Album, Artist, Customer, Employee, Genre, Invoice, InvoiceLine, MediaType, Playlist, PlaylistTrack, Track
Columns: Album.AlbumId, Album.Title, Album.ArtistId, Artist.ArtistId, Artist.Name, Customer.CustomerId, Customer.FirstName, Customer.LastName, Customer.Company, Customer.Address, Customer.City, Customer.State, Customer.Country, Customer.PostalCode, Customer.Phone, Customer.Fax, Customer.Email, Customer.SupportRepId, Employee.EmployeeId, Employee.LastName, Employee.FirstName, Employee.Title, Employee.ReportsTo, Employee.BirthDate, Employee.HireDate, Employee.Address, Employee.City, Employee.State, Employee.Country, Employee.PostalCode, Employee.Phone, Employee.Fax, Employee.Email, Genre.GenreId, Genre.Name, Invoice.InvoiceId, Invoice.CustomerId, Invoice.InvoiceDate, Invoice.BillingAddress, Invoice.BillingCity, Invoice.BillingState, Invoice.BillingCountry, Invoice.BillingPostalCode, Invoice.Total, InvoiceLine.InvoiceLineId, InvoiceLine.InvoiceId, InvoiceLine.TrackId, InvoiceLine.UnitPrice, InvoiceLine.Quantity, MediaType.MediaTypeId, MediaType.Name, Playlist.PlaylistId, Playlist.Name, PlaylistTrack.PlaylistId, PlaylistTrack.TrackId, Track.TrackId, Track.Name, Track.AlbumId, Track.MediaTypeId, Track.GenreId, Track.Composer, Track.Milliseconds, Track.Bytes, Track.UnitPrice
Question: Find the average millisecond length of Latin and Pop tracks. [/INST] | SELECT AVG(Milliseconds) FROM GENRE AS T1 JOIN TRACK AS T2 ON T1.GenreId = T2.GenreId WHERE T1.Name = "Latin" OR T1.Name = "Pop"; |
Tables: Album, Artist, Customer, Employee, Genre, Invoice, InvoiceLine, MediaType, Playlist, PlaylistTrack, Track
Columns: Album.AlbumId, Album.Title, Album.ArtistId, Artist.ArtistId, Artist.Name, Customer.CustomerId, Customer.FirstName, Customer.LastName, Customer.Company, Customer.Address, Customer.City, Customer.State, Customer.Country, Customer.PostalCode, Customer.Phone, Customer.Fax, Customer.Email, Customer.SupportRepId, Employee.EmployeeId, Employee.LastName, Employee.FirstName, Employee.Title, Employee.ReportsTo, Employee.BirthDate, Employee.HireDate, Employee.Address, Employee.City, Employee.State, Employee.Country, Employee.PostalCode, Employee.Phone, Employee.Fax, Employee.Email, Genre.GenreId, Genre.Name, Invoice.InvoiceId, Invoice.CustomerId, Invoice.InvoiceDate, Invoice.BillingAddress, Invoice.BillingCity, Invoice.BillingState, Invoice.BillingCountry, Invoice.BillingPostalCode, Invoice.Total, InvoiceLine.InvoiceLineId, InvoiceLine.InvoiceId, InvoiceLine.TrackId, InvoiceLine.UnitPrice, InvoiceLine.Quantity, MediaType.MediaTypeId, MediaType.Name, Playlist.PlaylistId, Playlist.Name, PlaylistTrack.PlaylistId, PlaylistTrack.TrackId, Track.TrackId, Track.Name, Track.AlbumId, Track.MediaTypeId, Track.GenreId, Track.Composer, Track.Milliseconds, Track.Bytes, Track.UnitPrice
Question: Please show the employee first names and ids of employees who serve at least 10 customers. [/INST] | 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; |
Tables: Album, Artist, Customer, Employee, Genre, Invoice, InvoiceLine, MediaType, Playlist, PlaylistTrack, Track
Columns: Album.AlbumId, Album.Title, Album.ArtistId, Artist.ArtistId, Artist.Name, Customer.CustomerId, Customer.FirstName, Customer.LastName, Customer.Company, Customer.Address, Customer.City, Customer.State, Customer.Country, Customer.PostalCode, Customer.Phone, Customer.Fax, Customer.Email, Customer.SupportRepId, Employee.EmployeeId, Employee.LastName, Employee.FirstName, Employee.Title, Employee.ReportsTo, Employee.BirthDate, Employee.HireDate, Employee.Address, Employee.City, Employee.State, Employee.Country, Employee.PostalCode, Employee.Phone, Employee.Fax, Employee.Email, Genre.GenreId, Genre.Name, Invoice.InvoiceId, Invoice.CustomerId, Invoice.InvoiceDate, Invoice.BillingAddress, Invoice.BillingCity, Invoice.BillingState, Invoice.BillingCountry, Invoice.BillingPostalCode, Invoice.Total, InvoiceLine.InvoiceLineId, InvoiceLine.InvoiceId, InvoiceLine.TrackId, InvoiceLine.UnitPrice, InvoiceLine.Quantity, MediaType.MediaTypeId, MediaType.Name, Playlist.PlaylistId, Playlist.Name, PlaylistTrack.PlaylistId, PlaylistTrack.TrackId, Track.TrackId, Track.Name, Track.AlbumId, Track.MediaTypeId, Track.GenreId, Track.Composer, Track.Milliseconds, Track.Bytes, Track.UnitPrice
Question: What are the first names and support rep ids for employees serving 10 or more customers? [/INST] | 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; |
Tables: Album, Artist, Customer, Employee, Genre, Invoice, InvoiceLine, MediaType, Playlist, PlaylistTrack, Track
Columns: Album.AlbumId, Album.Title, Album.ArtistId, Artist.ArtistId, Artist.Name, Customer.CustomerId, Customer.FirstName, Customer.LastName, Customer.Company, Customer.Address, Customer.City, Customer.State, Customer.Country, Customer.PostalCode, Customer.Phone, Customer.Fax, Customer.Email, Customer.SupportRepId, Employee.EmployeeId, Employee.LastName, Employee.FirstName, Employee.Title, Employee.ReportsTo, Employee.BirthDate, Employee.HireDate, Employee.Address, Employee.City, Employee.State, Employee.Country, Employee.PostalCode, Employee.Phone, Employee.Fax, Employee.Email, Genre.GenreId, Genre.Name, Invoice.InvoiceId, Invoice.CustomerId, Invoice.InvoiceDate, Invoice.BillingAddress, Invoice.BillingCity, Invoice.BillingState, Invoice.BillingCountry, Invoice.BillingPostalCode, Invoice.Total, InvoiceLine.InvoiceLineId, InvoiceLine.InvoiceId, InvoiceLine.TrackId, InvoiceLine.UnitPrice, InvoiceLine.Quantity, MediaType.MediaTypeId, MediaType.Name, Playlist.PlaylistId, Playlist.Name, PlaylistTrack.PlaylistId, PlaylistTrack.TrackId, Track.TrackId, Track.Name, Track.AlbumId, Track.MediaTypeId, Track.GenreId, Track.Composer, Track.Milliseconds, Track.Bytes, Track.UnitPrice
Question: Please show the employee last names that serves no more than 20 customers. [/INST] | SELECT T1.LastName FROM CUSTOMER AS T1 JOIN EMPLOYEE AS T2 ON T1.SupportRepId = T2.EmployeeId GROUP BY T1.SupportRepId HAVING COUNT(*) <= 20; |
Tables: Album, Artist, Customer, Employee, Genre, Invoice, InvoiceLine, MediaType, Playlist, PlaylistTrack, Track
Columns: Album.AlbumId, Album.Title, Album.ArtistId, Artist.ArtistId, Artist.Name, Customer.CustomerId, Customer.FirstName, Customer.LastName, Customer.Company, Customer.Address, Customer.City, Customer.State, Customer.Country, Customer.PostalCode, Customer.Phone, Customer.Fax, Customer.Email, Customer.SupportRepId, Employee.EmployeeId, Employee.LastName, Employee.FirstName, Employee.Title, Employee.ReportsTo, Employee.BirthDate, Employee.HireDate, Employee.Address, Employee.City, Employee.State, Employee.Country, Employee.PostalCode, Employee.Phone, Employee.Fax, Employee.Email, Genre.GenreId, Genre.Name, Invoice.InvoiceId, Invoice.CustomerId, Invoice.InvoiceDate, Invoice.BillingAddress, Invoice.BillingCity, Invoice.BillingState, Invoice.BillingCountry, Invoice.BillingPostalCode, Invoice.Total, InvoiceLine.InvoiceLineId, InvoiceLine.InvoiceId, InvoiceLine.TrackId, InvoiceLine.UnitPrice, InvoiceLine.Quantity, MediaType.MediaTypeId, MediaType.Name, Playlist.PlaylistId, Playlist.Name, PlaylistTrack.PlaylistId, PlaylistTrack.TrackId, Track.TrackId, Track.Name, Track.AlbumId, Track.MediaTypeId, Track.GenreId, Track.Composer, Track.Milliseconds, Track.Bytes, Track.UnitPrice
Question: What are the last names of employees who serve at most 20 customers? [/INST] | SELECT T1.LastName FROM CUSTOMER AS T1 JOIN EMPLOYEE AS T2 ON T1.SupportRepId = T2.EmployeeId GROUP BY T1.SupportRepId HAVING COUNT(*) <= 20; |
Tables: Album, Artist, Customer, Employee, Genre, Invoice, InvoiceLine, MediaType, Playlist, PlaylistTrack, Track
Columns: Album.AlbumId, Album.Title, Album.ArtistId, Artist.ArtistId, Artist.Name, Customer.CustomerId, Customer.FirstName, Customer.LastName, Customer.Company, Customer.Address, Customer.City, Customer.State, Customer.Country, Customer.PostalCode, Customer.Phone, Customer.Fax, Customer.Email, Customer.SupportRepId, Employee.EmployeeId, Employee.LastName, Employee.FirstName, Employee.Title, Employee.ReportsTo, Employee.BirthDate, Employee.HireDate, Employee.Address, Employee.City, Employee.State, Employee.Country, Employee.PostalCode, Employee.Phone, Employee.Fax, Employee.Email, Genre.GenreId, Genre.Name, Invoice.InvoiceId, Invoice.CustomerId, Invoice.InvoiceDate, Invoice.BillingAddress, Invoice.BillingCity, Invoice.BillingState, Invoice.BillingCountry, Invoice.BillingPostalCode, Invoice.Total, InvoiceLine.InvoiceLineId, InvoiceLine.InvoiceId, InvoiceLine.TrackId, InvoiceLine.UnitPrice, InvoiceLine.Quantity, MediaType.MediaTypeId, MediaType.Name, Playlist.PlaylistId, Playlist.Name, PlaylistTrack.PlaylistId, PlaylistTrack.TrackId, Track.TrackId, Track.Name, Track.AlbumId, Track.MediaTypeId, Track.GenreId, Track.Composer, Track.Milliseconds, Track.Bytes, Track.UnitPrice
Question: Please list all album titles in alphabetical order. [/INST] | SELECT Title FROM ALBUM ORDER BY Title; |
Tables: Album, Artist, Customer, Employee, Genre, Invoice, InvoiceLine, MediaType, Playlist, PlaylistTrack, Track
Columns: Album.AlbumId, Album.Title, Album.ArtistId, Artist.ArtistId, Artist.Name, Customer.CustomerId, Customer.FirstName, Customer.LastName, Customer.Company, Customer.Address, Customer.City, Customer.State, Customer.Country, Customer.PostalCode, Customer.Phone, Customer.Fax, Customer.Email, Customer.SupportRepId, Employee.EmployeeId, Employee.LastName, Employee.FirstName, Employee.Title, Employee.ReportsTo, Employee.BirthDate, Employee.HireDate, Employee.Address, Employee.City, Employee.State, Employee.Country, Employee.PostalCode, Employee.Phone, Employee.Fax, Employee.Email, Genre.GenreId, Genre.Name, Invoice.InvoiceId, Invoice.CustomerId, Invoice.InvoiceDate, Invoice.BillingAddress, Invoice.BillingCity, Invoice.BillingState, Invoice.BillingCountry, Invoice.BillingPostalCode, Invoice.Total, InvoiceLine.InvoiceLineId, InvoiceLine.InvoiceId, InvoiceLine.TrackId, InvoiceLine.UnitPrice, InvoiceLine.Quantity, MediaType.MediaTypeId, MediaType.Name, Playlist.PlaylistId, Playlist.Name, PlaylistTrack.PlaylistId, PlaylistTrack.TrackId, Track.TrackId, Track.Name, Track.AlbumId, Track.MediaTypeId, Track.GenreId, Track.Composer, Track.Milliseconds, Track.Bytes, Track.UnitPrice
Question: What are all the album titles, in alphabetical order? [/INST] | SELECT Title FROM ALBUM ORDER BY Title; |
Tables: Album, Artist, Customer, Employee, Genre, Invoice, InvoiceLine, MediaType, Playlist, PlaylistTrack, Track
Columns: Album.AlbumId, Album.Title, Album.ArtistId, Artist.ArtistId, Artist.Name, Customer.CustomerId, Customer.FirstName, Customer.LastName, Customer.Company, Customer.Address, Customer.City, Customer.State, Customer.Country, Customer.PostalCode, Customer.Phone, Customer.Fax, Customer.Email, Customer.SupportRepId, Employee.EmployeeId, Employee.LastName, Employee.FirstName, Employee.Title, Employee.ReportsTo, Employee.BirthDate, Employee.HireDate, Employee.Address, Employee.City, Employee.State, Employee.Country, Employee.PostalCode, Employee.Phone, Employee.Fax, Employee.Email, Genre.GenreId, Genre.Name, Invoice.InvoiceId, Invoice.CustomerId, Invoice.InvoiceDate, Invoice.BillingAddress, Invoice.BillingCity, Invoice.BillingState, Invoice.BillingCountry, Invoice.BillingPostalCode, Invoice.Total, InvoiceLine.InvoiceLineId, InvoiceLine.InvoiceId, InvoiceLine.TrackId, InvoiceLine.UnitPrice, InvoiceLine.Quantity, MediaType.MediaTypeId, MediaType.Name, Playlist.PlaylistId, Playlist.Name, PlaylistTrack.PlaylistId, PlaylistTrack.TrackId, Track.TrackId, Track.Name, Track.AlbumId, Track.MediaTypeId, Track.GenreId, Track.Composer, Track.Milliseconds, Track.Bytes, Track.UnitPrice
Question: Please list the name and id of all artists that have at least 3 albums in alphabetical order. [/INST] | 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; |
Tables: Album, Artist, Customer, Employee, Genre, Invoice, InvoiceLine, MediaType, Playlist, PlaylistTrack, Track
Columns: Album.AlbumId, Album.Title, Album.ArtistId, Artist.ArtistId, Artist.Name, Customer.CustomerId, Customer.FirstName, Customer.LastName, Customer.Company, Customer.Address, Customer.City, Customer.State, Customer.Country, Customer.PostalCode, Customer.Phone, Customer.Fax, Customer.Email, Customer.SupportRepId, Employee.EmployeeId, Employee.LastName, Employee.FirstName, Employee.Title, Employee.ReportsTo, Employee.BirthDate, Employee.HireDate, Employee.Address, Employee.City, Employee.State, Employee.Country, Employee.PostalCode, Employee.Phone, Employee.Fax, Employee.Email, Genre.GenreId, Genre.Name, Invoice.InvoiceId, Invoice.CustomerId, Invoice.InvoiceDate, Invoice.BillingAddress, Invoice.BillingCity, Invoice.BillingState, Invoice.BillingCountry, Invoice.BillingPostalCode, Invoice.Total, InvoiceLine.InvoiceLineId, InvoiceLine.InvoiceId, InvoiceLine.TrackId, InvoiceLine.UnitPrice, InvoiceLine.Quantity, MediaType.MediaTypeId, MediaType.Name, Playlist.PlaylistId, Playlist.Name, PlaylistTrack.PlaylistId, PlaylistTrack.TrackId, Track.TrackId, Track.Name, Track.AlbumId, Track.MediaTypeId, Track.GenreId, Track.Composer, Track.Milliseconds, Track.Bytes, Track.UnitPrice
Question: What are the names and ids of artists with 3 or more albums, listed in alphabetical order? [/INST] | 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; |
Tables: Album, Artist, Customer, Employee, Genre, Invoice, InvoiceLine, MediaType, Playlist, PlaylistTrack, Track
Columns: Album.AlbumId, Album.Title, Album.ArtistId, Artist.ArtistId, Artist.Name, Customer.CustomerId, Customer.FirstName, Customer.LastName, Customer.Company, Customer.Address, Customer.City, Customer.State, Customer.Country, Customer.PostalCode, Customer.Phone, Customer.Fax, Customer.Email, Customer.SupportRepId, Employee.EmployeeId, Employee.LastName, Employee.FirstName, Employee.Title, Employee.ReportsTo, Employee.BirthDate, Employee.HireDate, Employee.Address, Employee.City, Employee.State, Employee.Country, Employee.PostalCode, Employee.Phone, Employee.Fax, Employee.Email, Genre.GenreId, Genre.Name, Invoice.InvoiceId, Invoice.CustomerId, Invoice.InvoiceDate, Invoice.BillingAddress, Invoice.BillingCity, Invoice.BillingState, Invoice.BillingCountry, Invoice.BillingPostalCode, Invoice.Total, InvoiceLine.InvoiceLineId, InvoiceLine.InvoiceId, InvoiceLine.TrackId, InvoiceLine.UnitPrice, InvoiceLine.Quantity, MediaType.MediaTypeId, MediaType.Name, Playlist.PlaylistId, Playlist.Name, PlaylistTrack.PlaylistId, PlaylistTrack.TrackId, Track.TrackId, Track.Name, Track.AlbumId, Track.MediaTypeId, Track.GenreId, Track.Composer, Track.Milliseconds, Track.Bytes, Track.UnitPrice
Question: Find the names of artists that do not have any albums. [/INST] | SELECT Name FROM ARTIST EXCEPT SELECT T2.Name FROM ALBUM AS T1 JOIN ARTIST AS T2 ON T1.ArtistId = T2.ArtistId; |
Tables: Album, Artist, Customer, Employee, Genre, Invoice, InvoiceLine, MediaType, Playlist, PlaylistTrack, Track
Columns: Album.AlbumId, Album.Title, Album.ArtistId, Artist.ArtistId, Artist.Name, Customer.CustomerId, Customer.FirstName, Customer.LastName, Customer.Company, Customer.Address, Customer.City, Customer.State, Customer.Country, Customer.PostalCode, Customer.Phone, Customer.Fax, Customer.Email, Customer.SupportRepId, Employee.EmployeeId, Employee.LastName, Employee.FirstName, Employee.Title, Employee.ReportsTo, Employee.BirthDate, Employee.HireDate, Employee.Address, Employee.City, Employee.State, Employee.Country, Employee.PostalCode, Employee.Phone, Employee.Fax, Employee.Email, Genre.GenreId, Genre.Name, Invoice.InvoiceId, Invoice.CustomerId, Invoice.InvoiceDate, Invoice.BillingAddress, Invoice.BillingCity, Invoice.BillingState, Invoice.BillingCountry, Invoice.BillingPostalCode, Invoice.Total, InvoiceLine.InvoiceLineId, InvoiceLine.InvoiceId, InvoiceLine.TrackId, InvoiceLine.UnitPrice, InvoiceLine.Quantity, MediaType.MediaTypeId, MediaType.Name, Playlist.PlaylistId, Playlist.Name, PlaylistTrack.PlaylistId, PlaylistTrack.TrackId, Track.TrackId, Track.Name, Track.AlbumId, Track.MediaTypeId, Track.GenreId, Track.Composer, Track.Milliseconds, Track.Bytes, Track.UnitPrice
Question: What are the names of artists who have not released any albums? [/INST] | SELECT Name FROM ARTIST EXCEPT SELECT T2.Name FROM ALBUM AS T1 JOIN ARTIST AS T2 ON T1.ArtistId = T2.ArtistId; |
Tables: Album, Artist, Customer, Employee, Genre, Invoice, InvoiceLine, MediaType, Playlist, PlaylistTrack, Track
Columns: Album.AlbumId, Album.Title, Album.ArtistId, Artist.ArtistId, Artist.Name, Customer.CustomerId, Customer.FirstName, Customer.LastName, Customer.Company, Customer.Address, Customer.City, Customer.State, Customer.Country, Customer.PostalCode, Customer.Phone, Customer.Fax, Customer.Email, Customer.SupportRepId, Employee.EmployeeId, Employee.LastName, Employee.FirstName, Employee.Title, Employee.ReportsTo, Employee.BirthDate, Employee.HireDate, Employee.Address, Employee.City, Employee.State, Employee.Country, Employee.PostalCode, Employee.Phone, Employee.Fax, Employee.Email, Genre.GenreId, Genre.Name, Invoice.InvoiceId, Invoice.CustomerId, Invoice.InvoiceDate, Invoice.BillingAddress, Invoice.BillingCity, Invoice.BillingState, Invoice.BillingCountry, Invoice.BillingPostalCode, Invoice.Total, InvoiceLine.InvoiceLineId, InvoiceLine.InvoiceId, InvoiceLine.TrackId, InvoiceLine.UnitPrice, InvoiceLine.Quantity, MediaType.MediaTypeId, MediaType.Name, Playlist.PlaylistId, Playlist.Name, PlaylistTrack.PlaylistId, PlaylistTrack.TrackId, Track.TrackId, Track.Name, Track.AlbumId, Track.MediaTypeId, Track.GenreId, Track.Composer, Track.Milliseconds, Track.Bytes, Track.UnitPrice
Question: What is the average unit price of rock tracks? [/INST] | SELECT AVG(T2.UnitPrice) FROM GENRE AS T1 JOIN TRACK AS T2 ON T1.GenreId = T2.GenreId WHERE T1.Name = "Rock"; |
Tables: Album, Artist, Customer, Employee, Genre, Invoice, InvoiceLine, MediaType, Playlist, PlaylistTrack, Track
Columns: Album.AlbumId, Album.Title, Album.ArtistId, Artist.ArtistId, Artist.Name, Customer.CustomerId, Customer.FirstName, Customer.LastName, Customer.Company, Customer.Address, Customer.City, Customer.State, Customer.Country, Customer.PostalCode, Customer.Phone, Customer.Fax, Customer.Email, Customer.SupportRepId, Employee.EmployeeId, Employee.LastName, Employee.FirstName, Employee.Title, Employee.ReportsTo, Employee.BirthDate, Employee.HireDate, Employee.Address, Employee.City, Employee.State, Employee.Country, Employee.PostalCode, Employee.Phone, Employee.Fax, Employee.Email, Genre.GenreId, Genre.Name, Invoice.InvoiceId, Invoice.CustomerId, Invoice.InvoiceDate, Invoice.BillingAddress, Invoice.BillingCity, Invoice.BillingState, Invoice.BillingCountry, Invoice.BillingPostalCode, Invoice.Total, InvoiceLine.InvoiceLineId, InvoiceLine.InvoiceId, InvoiceLine.TrackId, InvoiceLine.UnitPrice, InvoiceLine.Quantity, MediaType.MediaTypeId, MediaType.Name, Playlist.PlaylistId, Playlist.Name, PlaylistTrack.PlaylistId, PlaylistTrack.TrackId, Track.TrackId, Track.Name, Track.AlbumId, Track.MediaTypeId, Track.GenreId, Track.Composer, Track.Milliseconds, Track.Bytes, Track.UnitPrice
Question: Find the average unit price of tracks from the Rock genre. [/INST] | SELECT AVG(T2.UnitPrice) FROM GENRE AS T1 JOIN TRACK AS T2 ON T1.GenreId = T2.GenreId WHERE T1.Name = "Rock"; |
Tables: Album, Artist, Customer, Employee, Genre, Invoice, InvoiceLine, MediaType, Playlist, PlaylistTrack, Track
Columns: Album.AlbumId, Album.Title, Album.ArtistId, Artist.ArtistId, Artist.Name, Customer.CustomerId, Customer.FirstName, Customer.LastName, Customer.Company, Customer.Address, Customer.City, Customer.State, Customer.Country, Customer.PostalCode, Customer.Phone, Customer.Fax, Customer.Email, Customer.SupportRepId, Employee.EmployeeId, Employee.LastName, Employee.FirstName, Employee.Title, Employee.ReportsTo, Employee.BirthDate, Employee.HireDate, Employee.Address, Employee.City, Employee.State, Employee.Country, Employee.PostalCode, Employee.Phone, Employee.Fax, Employee.Email, Genre.GenreId, Genre.Name, Invoice.InvoiceId, Invoice.CustomerId, Invoice.InvoiceDate, Invoice.BillingAddress, Invoice.BillingCity, Invoice.BillingState, Invoice.BillingCountry, Invoice.BillingPostalCode, Invoice.Total, InvoiceLine.InvoiceLineId, InvoiceLine.InvoiceId, InvoiceLine.TrackId, InvoiceLine.UnitPrice, InvoiceLine.Quantity, MediaType.MediaTypeId, MediaType.Name, Playlist.PlaylistId, Playlist.Name, PlaylistTrack.PlaylistId, PlaylistTrack.TrackId, Track.TrackId, Track.Name, Track.AlbumId, Track.MediaTypeId, Track.GenreId, Track.Composer, Track.Milliseconds, Track.Bytes, Track.UnitPrice
Question: What are the duration of the longest and shortest pop tracks in milliseconds? [/INST] | SELECT max(Milliseconds) , min(Milliseconds) FROM GENRE AS T1 JOIN TRACK AS T2 ON T1.GenreId = T2.GenreId WHERE T1.Name = "Pop"; |
Tables: Album, Artist, Customer, Employee, Genre, Invoice, InvoiceLine, MediaType, Playlist, PlaylistTrack, Track
Columns: Album.AlbumId, Album.Title, Album.ArtistId, Artist.ArtistId, Artist.Name, Customer.CustomerId, Customer.FirstName, Customer.LastName, Customer.Company, Customer.Address, Customer.City, Customer.State, Customer.Country, Customer.PostalCode, Customer.Phone, Customer.Fax, Customer.Email, Customer.SupportRepId, Employee.EmployeeId, Employee.LastName, Employee.FirstName, Employee.Title, Employee.ReportsTo, Employee.BirthDate, Employee.HireDate, Employee.Address, Employee.City, Employee.State, Employee.Country, Employee.PostalCode, Employee.Phone, Employee.Fax, Employee.Email, Genre.GenreId, Genre.Name, Invoice.InvoiceId, Invoice.CustomerId, Invoice.InvoiceDate, Invoice.BillingAddress, Invoice.BillingCity, Invoice.BillingState, Invoice.BillingCountry, Invoice.BillingPostalCode, Invoice.Total, InvoiceLine.InvoiceLineId, InvoiceLine.InvoiceId, InvoiceLine.TrackId, InvoiceLine.UnitPrice, InvoiceLine.Quantity, MediaType.MediaTypeId, MediaType.Name, Playlist.PlaylistId, Playlist.Name, PlaylistTrack.PlaylistId, PlaylistTrack.TrackId, Track.TrackId, Track.Name, Track.AlbumId, Track.MediaTypeId, Track.GenreId, Track.Composer, Track.Milliseconds, Track.Bytes, Track.UnitPrice
Question: Find the maximum and minimum millisecond lengths of pop tracks. [/INST] | SELECT max(Milliseconds) , min(Milliseconds) FROM GENRE AS T1 JOIN TRACK AS T2 ON T1.GenreId = T2.GenreId WHERE T1.Name = "Pop"; |
Tables: Album, Artist, Customer, Employee, Genre, Invoice, InvoiceLine, MediaType, Playlist, PlaylistTrack, Track
Columns: Album.AlbumId, Album.Title, Album.ArtistId, Artist.ArtistId, Artist.Name, Customer.CustomerId, Customer.FirstName, Customer.LastName, Customer.Company, Customer.Address, Customer.City, Customer.State, Customer.Country, Customer.PostalCode, Customer.Phone, Customer.Fax, Customer.Email, Customer.SupportRepId, Employee.EmployeeId, Employee.LastName, Employee.FirstName, Employee.Title, Employee.ReportsTo, Employee.BirthDate, Employee.HireDate, Employee.Address, Employee.City, Employee.State, Employee.Country, Employee.PostalCode, Employee.Phone, Employee.Fax, Employee.Email, Genre.GenreId, Genre.Name, Invoice.InvoiceId, Invoice.CustomerId, Invoice.InvoiceDate, Invoice.BillingAddress, Invoice.BillingCity, Invoice.BillingState, Invoice.BillingCountry, Invoice.BillingPostalCode, Invoice.Total, InvoiceLine.InvoiceLineId, InvoiceLine.InvoiceId, InvoiceLine.TrackId, InvoiceLine.UnitPrice, InvoiceLine.Quantity, MediaType.MediaTypeId, MediaType.Name, Playlist.PlaylistId, Playlist.Name, PlaylistTrack.PlaylistId, PlaylistTrack.TrackId, Track.TrackId, Track.Name, Track.AlbumId, Track.MediaTypeId, Track.GenreId, Track.Composer, Track.Milliseconds, Track.Bytes, Track.UnitPrice
Question: What are the birth dates of employees living in Edmonton? [/INST] | SELECT BirthDate FROM EMPLOYEE WHERE City = "Edmonton"; |
Tables: Album, Artist, Customer, Employee, Genre, Invoice, InvoiceLine, MediaType, Playlist, PlaylistTrack, Track
Columns: Album.AlbumId, Album.Title, Album.ArtistId, Artist.ArtistId, Artist.Name, Customer.CustomerId, Customer.FirstName, Customer.LastName, Customer.Company, Customer.Address, Customer.City, Customer.State, Customer.Country, Customer.PostalCode, Customer.Phone, Customer.Fax, Customer.Email, Customer.SupportRepId, Employee.EmployeeId, Employee.LastName, Employee.FirstName, Employee.Title, Employee.ReportsTo, Employee.BirthDate, Employee.HireDate, Employee.Address, Employee.City, Employee.State, Employee.Country, Employee.PostalCode, Employee.Phone, Employee.Fax, Employee.Email, Genre.GenreId, Genre.Name, Invoice.InvoiceId, Invoice.CustomerId, Invoice.InvoiceDate, Invoice.BillingAddress, Invoice.BillingCity, Invoice.BillingState, Invoice.BillingCountry, Invoice.BillingPostalCode, Invoice.Total, InvoiceLine.InvoiceLineId, InvoiceLine.InvoiceId, InvoiceLine.TrackId, InvoiceLine.UnitPrice, InvoiceLine.Quantity, MediaType.MediaTypeId, MediaType.Name, Playlist.PlaylistId, Playlist.Name, PlaylistTrack.PlaylistId, PlaylistTrack.TrackId, Track.TrackId, Track.Name, Track.AlbumId, Track.MediaTypeId, Track.GenreId, Track.Composer, Track.Milliseconds, Track.Bytes, Track.UnitPrice
Question: Find the birth dates corresponding to employees who live in the city of Edmonton. [/INST] | SELECT BirthDate FROM EMPLOYEE WHERE City = "Edmonton"; |
Tables: Album, Artist, Customer, Employee, Genre, Invoice, InvoiceLine, MediaType, Playlist, PlaylistTrack, Track
Columns: Album.AlbumId, Album.Title, Album.ArtistId, Artist.ArtistId, Artist.Name, Customer.CustomerId, Customer.FirstName, Customer.LastName, Customer.Company, Customer.Address, Customer.City, Customer.State, Customer.Country, Customer.PostalCode, Customer.Phone, Customer.Fax, Customer.Email, Customer.SupportRepId, Employee.EmployeeId, Employee.LastName, Employee.FirstName, Employee.Title, Employee.ReportsTo, Employee.BirthDate, Employee.HireDate, Employee.Address, Employee.City, Employee.State, Employee.Country, Employee.PostalCode, Employee.Phone, Employee.Fax, Employee.Email, Genre.GenreId, Genre.Name, Invoice.InvoiceId, Invoice.CustomerId, Invoice.InvoiceDate, Invoice.BillingAddress, Invoice.BillingCity, Invoice.BillingState, Invoice.BillingCountry, Invoice.BillingPostalCode, Invoice.Total, InvoiceLine.InvoiceLineId, InvoiceLine.InvoiceId, InvoiceLine.TrackId, InvoiceLine.UnitPrice, InvoiceLine.Quantity, MediaType.MediaTypeId, MediaType.Name, Playlist.PlaylistId, Playlist.Name, PlaylistTrack.PlaylistId, PlaylistTrack.TrackId, Track.TrackId, Track.Name, Track.AlbumId, Track.MediaTypeId, Track.GenreId, Track.Composer, Track.Milliseconds, Track.Bytes, Track.UnitPrice
Question: What are the distinct unit prices of all tracks? [/INST] | SELECT distinct(UnitPrice) FROM TRACK; |
Tables: Album, Artist, Customer, Employee, Genre, Invoice, InvoiceLine, MediaType, Playlist, PlaylistTrack, Track
Columns: Album.AlbumId, Album.Title, Album.ArtistId, Artist.ArtistId, Artist.Name, Customer.CustomerId, Customer.FirstName, Customer.LastName, Customer.Company, Customer.Address, Customer.City, Customer.State, Customer.Country, Customer.PostalCode, Customer.Phone, Customer.Fax, Customer.Email, Customer.SupportRepId, Employee.EmployeeId, Employee.LastName, Employee.FirstName, Employee.Title, Employee.ReportsTo, Employee.BirthDate, Employee.HireDate, Employee.Address, Employee.City, Employee.State, Employee.Country, Employee.PostalCode, Employee.Phone, Employee.Fax, Employee.Email, Genre.GenreId, Genre.Name, Invoice.InvoiceId, Invoice.CustomerId, Invoice.InvoiceDate, Invoice.BillingAddress, Invoice.BillingCity, Invoice.BillingState, Invoice.BillingCountry, Invoice.BillingPostalCode, Invoice.Total, InvoiceLine.InvoiceLineId, InvoiceLine.InvoiceId, InvoiceLine.TrackId, InvoiceLine.UnitPrice, InvoiceLine.Quantity, MediaType.MediaTypeId, MediaType.Name, Playlist.PlaylistId, Playlist.Name, PlaylistTrack.PlaylistId, PlaylistTrack.TrackId, Track.TrackId, Track.Name, Track.AlbumId, Track.MediaTypeId, Track.GenreId, Track.Composer, Track.Milliseconds, Track.Bytes, Track.UnitPrice
Question: Find the distinct unit prices for tracks. [/INST] | SELECT distinct(UnitPrice) FROM TRACK; |
Tables: Album, Artist, Customer, Employee, Genre, Invoice, InvoiceLine, MediaType, Playlist, PlaylistTrack, Track
Columns: Album.AlbumId, Album.Title, Album.ArtistId, Artist.ArtistId, Artist.Name, Customer.CustomerId, Customer.FirstName, Customer.LastName, Customer.Company, Customer.Address, Customer.City, Customer.State, Customer.Country, Customer.PostalCode, Customer.Phone, Customer.Fax, Customer.Email, Customer.SupportRepId, Employee.EmployeeId, Employee.LastName, Employee.FirstName, Employee.Title, Employee.ReportsTo, Employee.BirthDate, Employee.HireDate, Employee.Address, Employee.City, Employee.State, Employee.Country, Employee.PostalCode, Employee.Phone, Employee.Fax, Employee.Email, Genre.GenreId, Genre.Name, Invoice.InvoiceId, Invoice.CustomerId, Invoice.InvoiceDate, Invoice.BillingAddress, Invoice.BillingCity, Invoice.BillingState, Invoice.BillingCountry, Invoice.BillingPostalCode, Invoice.Total, InvoiceLine.InvoiceLineId, InvoiceLine.InvoiceId, InvoiceLine.TrackId, InvoiceLine.UnitPrice, InvoiceLine.Quantity, MediaType.MediaTypeId, MediaType.Name, Playlist.PlaylistId, Playlist.Name, PlaylistTrack.PlaylistId, PlaylistTrack.TrackId, Track.TrackId, Track.Name, Track.AlbumId, Track.MediaTypeId, Track.GenreId, Track.Composer, Track.Milliseconds, Track.Bytes, Track.UnitPrice
Question: How many artists do not have any album? [/INST] | SELECT count(*) FROM ARTIST WHERE artistid NOT IN(SELECT artistid FROM ALBUM); |
Tables: Album, Artist, Customer, Employee, Genre, Invoice, InvoiceLine, MediaType, Playlist, PlaylistTrack, Track
Columns: Album.AlbumId, Album.Title, Album.ArtistId, Artist.ArtistId, Artist.Name, Customer.CustomerId, Customer.FirstName, Customer.LastName, Customer.Company, Customer.Address, Customer.City, Customer.State, Customer.Country, Customer.PostalCode, Customer.Phone, Customer.Fax, Customer.Email, Customer.SupportRepId, Employee.EmployeeId, Employee.LastName, Employee.FirstName, Employee.Title, Employee.ReportsTo, Employee.BirthDate, Employee.HireDate, Employee.Address, Employee.City, Employee.State, Employee.Country, Employee.PostalCode, Employee.Phone, Employee.Fax, Employee.Email, Genre.GenreId, Genre.Name, Invoice.InvoiceId, Invoice.CustomerId, Invoice.InvoiceDate, Invoice.BillingAddress, Invoice.BillingCity, Invoice.BillingState, Invoice.BillingCountry, Invoice.BillingPostalCode, Invoice.Total, InvoiceLine.InvoiceLineId, InvoiceLine.InvoiceId, InvoiceLine.TrackId, InvoiceLine.UnitPrice, InvoiceLine.Quantity, MediaType.MediaTypeId, MediaType.Name, Playlist.PlaylistId, Playlist.Name, PlaylistTrack.PlaylistId, PlaylistTrack.TrackId, Track.TrackId, Track.Name, Track.AlbumId, Track.MediaTypeId, Track.GenreId, Track.Composer, Track.Milliseconds, Track.Bytes, Track.UnitPrice
Question: Cound the number of artists who have not released an album. [/INST] | SELECT count(*) FROM ARTIST WHERE artistid NOT IN(SELECT artistid FROM ALBUM); |
Tables: Album, Artist, Customer, Employee, Genre, Invoice, InvoiceLine, MediaType, Playlist, PlaylistTrack, Track
Columns: Album.AlbumId, Album.Title, Album.ArtistId, Artist.ArtistId, Artist.Name, Customer.CustomerId, Customer.FirstName, Customer.LastName, Customer.Company, Customer.Address, Customer.City, Customer.State, Customer.Country, Customer.PostalCode, Customer.Phone, Customer.Fax, Customer.Email, Customer.SupportRepId, Employee.EmployeeId, Employee.LastName, Employee.FirstName, Employee.Title, Employee.ReportsTo, Employee.BirthDate, Employee.HireDate, Employee.Address, Employee.City, Employee.State, Employee.Country, Employee.PostalCode, Employee.Phone, Employee.Fax, Employee.Email, Genre.GenreId, Genre.Name, Invoice.InvoiceId, Invoice.CustomerId, Invoice.InvoiceDate, Invoice.BillingAddress, Invoice.BillingCity, Invoice.BillingState, Invoice.BillingCountry, Invoice.BillingPostalCode, Invoice.Total, InvoiceLine.InvoiceLineId, InvoiceLine.InvoiceId, InvoiceLine.TrackId, InvoiceLine.UnitPrice, InvoiceLine.Quantity, MediaType.MediaTypeId, MediaType.Name, Playlist.PlaylistId, Playlist.Name, PlaylistTrack.PlaylistId, PlaylistTrack.TrackId, Track.TrackId, Track.Name, Track.AlbumId, Track.MediaTypeId, Track.GenreId, Track.Composer, Track.Milliseconds, Track.Bytes, Track.UnitPrice
Question: What are the album titles for albums containing both 'Reggae' and 'Rock' genre tracks? [/INST] | 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'; |
Tables: Album, Artist, Customer, Employee, Genre, Invoice, InvoiceLine, MediaType, Playlist, PlaylistTrack, Track
Columns: Album.AlbumId, Album.Title, Album.ArtistId, Artist.ArtistId, Artist.Name, Customer.CustomerId, Customer.FirstName, Customer.LastName, Customer.Company, Customer.Address, Customer.City, Customer.State, Customer.Country, Customer.PostalCode, Customer.Phone, Customer.Fax, Customer.Email, Customer.SupportRepId, Employee.EmployeeId, Employee.LastName, Employee.FirstName, Employee.Title, Employee.ReportsTo, Employee.BirthDate, Employee.HireDate, Employee.Address, Employee.City, Employee.State, Employee.Country, Employee.PostalCode, Employee.Phone, Employee.Fax, Employee.Email, Genre.GenreId, Genre.Name, Invoice.InvoiceId, Invoice.CustomerId, Invoice.InvoiceDate, Invoice.BillingAddress, Invoice.BillingCity, Invoice.BillingState, Invoice.BillingCountry, Invoice.BillingPostalCode, Invoice.Total, InvoiceLine.InvoiceLineId, InvoiceLine.InvoiceId, InvoiceLine.TrackId, InvoiceLine.UnitPrice, InvoiceLine.Quantity, MediaType.MediaTypeId, MediaType.Name, Playlist.PlaylistId, Playlist.Name, PlaylistTrack.PlaylistId, PlaylistTrack.TrackId, Track.TrackId, Track.Name, Track.AlbumId, Track.MediaTypeId, Track.GenreId, Track.Composer, Track.Milliseconds, Track.Bytes, Track.UnitPrice
Question: Find the titles of albums that contain tracks of both the Reggae and Rock genres. [/INST] | 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'; |
Tables: Customers, Services, Available_Policies, Customers_Policies, First_Notification_of_Loss, Claims, Settlements
Columns: Customers.Customer_ID, Customers.Customer_name, Services.Service_ID, Services.Service_name, Available_Policies.Policy_ID, Available_Policies.policy_type_code, Available_Policies.Customer_Phone, Customers_Policies.Customer_ID, Customers_Policies.Policy_ID, Customers_Policies.Date_Opened, Customers_Policies.Date_Closed, First_Notification_of_Loss.FNOL_ID, First_Notification_of_Loss.Customer_ID, First_Notification_of_Loss.Policy_ID, First_Notification_of_Loss.Service_ID, Claims.Claim_ID, Claims.FNOL_ID, Claims.Effective_Date, Settlements.Settlement_ID, Settlements.Claim_ID, Settlements.Effective_Date, Settlements.Settlement_Amount
Question: Find all the phone numbers. [/INST] | SELECT customer_phone FROM available_policies; |
Tables: Customers, Services, Available_Policies, Customers_Policies, First_Notification_of_Loss, Claims, Settlements
Columns: Customers.Customer_ID, Customers.Customer_name, Services.Service_ID, Services.Service_name, Available_Policies.Policy_ID, Available_Policies.policy_type_code, Available_Policies.Customer_Phone, Customers_Policies.Customer_ID, Customers_Policies.Policy_ID, Customers_Policies.Date_Opened, Customers_Policies.Date_Closed, First_Notification_of_Loss.FNOL_ID, First_Notification_of_Loss.Customer_ID, First_Notification_of_Loss.Policy_ID, First_Notification_of_Loss.Service_ID, Claims.Claim_ID, Claims.FNOL_ID, Claims.Effective_Date, Settlements.Settlement_ID, Settlements.Claim_ID, Settlements.Effective_Date, Settlements.Settlement_Amount
Question: What are all the phone numbers? [/INST] | SELECT customer_phone FROM available_policies; |
Tables: Customers, Services, Available_Policies, Customers_Policies, First_Notification_of_Loss, Claims, Settlements
Columns: Customers.Customer_ID, Customers.Customer_name, Services.Service_ID, Services.Service_name, Available_Policies.Policy_ID, Available_Policies.policy_type_code, Available_Policies.Customer_Phone, Customers_Policies.Customer_ID, Customers_Policies.Policy_ID, Customers_Policies.Date_Opened, Customers_Policies.Date_Closed, First_Notification_of_Loss.FNOL_ID, First_Notification_of_Loss.Customer_ID, First_Notification_of_Loss.Policy_ID, First_Notification_of_Loss.Service_ID, Claims.Claim_ID, Claims.FNOL_ID, Claims.Effective_Date, Settlements.Settlement_ID, Settlements.Claim_ID, Settlements.Effective_Date, Settlements.Settlement_Amount
Question: What are the customer phone numbers under the policy "Life Insurance"? [/INST] | SELECT customer_phone FROM available_policies WHERE policy_type_code = "Life Insurance"; |
Tables: Customers, Services, Available_Policies, Customers_Policies, First_Notification_of_Loss, Claims, Settlements
Columns: Customers.Customer_ID, Customers.Customer_name, Services.Service_ID, Services.Service_name, Available_Policies.Policy_ID, Available_Policies.policy_type_code, Available_Policies.Customer_Phone, Customers_Policies.Customer_ID, Customers_Policies.Policy_ID, Customers_Policies.Date_Opened, Customers_Policies.Date_Closed, First_Notification_of_Loss.FNOL_ID, First_Notification_of_Loss.Customer_ID, First_Notification_of_Loss.Policy_ID, First_Notification_of_Loss.Service_ID, Claims.Claim_ID, Claims.FNOL_ID, Claims.Effective_Date, Settlements.Settlement_ID, Settlements.Claim_ID, Settlements.Effective_Date, Settlements.Settlement_Amount
Question: What are the phone numbers of customers using the policy with the code "Life Insurance"? [/INST] | SELECT customer_phone FROM available_policies WHERE policy_type_code = "Life Insurance"; |
Tables: Customers, Services, Available_Policies, Customers_Policies, First_Notification_of_Loss, Claims, Settlements
Columns: Customers.Customer_ID, Customers.Customer_name, Services.Service_ID, Services.Service_name, Available_Policies.Policy_ID, Available_Policies.policy_type_code, Available_Policies.Customer_Phone, Customers_Policies.Customer_ID, Customers_Policies.Policy_ID, Customers_Policies.Date_Opened, Customers_Policies.Date_Closed, First_Notification_of_Loss.FNOL_ID, First_Notification_of_Loss.Customer_ID, First_Notification_of_Loss.Policy_ID, First_Notification_of_Loss.Service_ID, Claims.Claim_ID, Claims.FNOL_ID, Claims.Effective_Date, Settlements.Settlement_ID, Settlements.Claim_ID, Settlements.Effective_Date, Settlements.Settlement_Amount
Question: Which policy type has the most records in the database? [/INST] | SELECT policy_type_code FROM available_policies GROUP BY policy_type_code ORDER BY count(*) DESC LIMIT 1; |
Tables: Customers, Services, Available_Policies, Customers_Policies, First_Notification_of_Loss, Claims, Settlements
Columns: Customers.Customer_ID, Customers.Customer_name, Services.Service_ID, Services.Service_name, Available_Policies.Policy_ID, Available_Policies.policy_type_code, Available_Policies.Customer_Phone, Customers_Policies.Customer_ID, Customers_Policies.Policy_ID, Customers_Policies.Date_Opened, Customers_Policies.Date_Closed, First_Notification_of_Loss.FNOL_ID, First_Notification_of_Loss.Customer_ID, First_Notification_of_Loss.Policy_ID, First_Notification_of_Loss.Service_ID, Claims.Claim_ID, Claims.FNOL_ID, Claims.Effective_Date, Settlements.Settlement_ID, Settlements.Claim_ID, Settlements.Effective_Date, Settlements.Settlement_Amount
Question: Which policy type appears most frequently in the available policies? [/INST] | SELECT policy_type_code FROM available_policies GROUP BY policy_type_code ORDER BY count(*) DESC LIMIT 1; |
Tables: Customers, Services, Available_Policies, Customers_Policies, First_Notification_of_Loss, Claims, Settlements
Columns: Customers.Customer_ID, Customers.Customer_name, Services.Service_ID, Services.Service_name, Available_Policies.Policy_ID, Available_Policies.policy_type_code, Available_Policies.Customer_Phone, Customers_Policies.Customer_ID, Customers_Policies.Policy_ID, Customers_Policies.Date_Opened, Customers_Policies.Date_Closed, First_Notification_of_Loss.FNOL_ID, First_Notification_of_Loss.Customer_ID, First_Notification_of_Loss.Policy_ID, First_Notification_of_Loss.Service_ID, Claims.Claim_ID, Claims.FNOL_ID, Claims.Effective_Date, Settlements.Settlement_ID, Settlements.Claim_ID, Settlements.Effective_Date, Settlements.Settlement_Amount
Question: What are all the customer phone numbers under the most popular policy type? [/INST] | 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); |
Tables: Customers, Services, Available_Policies, Customers_Policies, First_Notification_of_Loss, Claims, Settlements
Columns: Customers.Customer_ID, Customers.Customer_name, Services.Service_ID, Services.Service_name, Available_Policies.Policy_ID, Available_Policies.policy_type_code, Available_Policies.Customer_Phone, Customers_Policies.Customer_ID, Customers_Policies.Policy_ID, Customers_Policies.Date_Opened, Customers_Policies.Date_Closed, First_Notification_of_Loss.FNOL_ID, First_Notification_of_Loss.Customer_ID, First_Notification_of_Loss.Policy_ID, First_Notification_of_Loss.Service_ID, Claims.Claim_ID, Claims.FNOL_ID, Claims.Effective_Date, Settlements.Settlement_ID, Settlements.Claim_ID, Settlements.Effective_Date, Settlements.Settlement_Amount
Question: Find the phone numbers of customers using the most common policy type among the available policies. [/INST] | 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); |
Tables: Customers, Services, Available_Policies, Customers_Policies, First_Notification_of_Loss, Claims, Settlements
Columns: Customers.Customer_ID, Customers.Customer_name, Services.Service_ID, Services.Service_name, Available_Policies.Policy_ID, Available_Policies.policy_type_code, Available_Policies.Customer_Phone, Customers_Policies.Customer_ID, Customers_Policies.Policy_ID, Customers_Policies.Date_Opened, Customers_Policies.Date_Closed, First_Notification_of_Loss.FNOL_ID, First_Notification_of_Loss.Customer_ID, First_Notification_of_Loss.Policy_ID, First_Notification_of_Loss.Service_ID, Claims.Claim_ID, Claims.FNOL_ID, Claims.Effective_Date, Settlements.Settlement_ID, Settlements.Claim_ID, Settlements.Effective_Date, Settlements.Settlement_Amount
Question: Find the policy type used by more than 4 customers. [/INST] | 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.