aherntech/sparc huggingface dataset:
Database: small_bank_1
Question sequence:
List all the account owner names.
Is there an owner with the name that has 'ee' in it?
What is the savings balance for that owner?
How about the checking balance?
SQL query sequence:
SELECT name FROM accounts
SELECT name FROM accounts where name LIKE '%ee%'
SELECT T2.balance FROM accounts AS T1 JOIN savings AS T2 ON T1.custid  =  T2.custid WHERE T1.name LIKE '%ee%'
SELECT T2.balance FROM accounts AS T1 JOIN checking AS T2 ON T1.custid  =  T2.custid WHERE T1.name LIKE '%ee%'
Final question: What is the checking balance of the account whose owner’s name contains the substring ‘ee’?
Final SQL: SELECT T2.balance FROM accounts AS T1 JOIN checking AS T2 ON T1.custid  =  T2.custid WHERE T1.name LIKE '%ee%'
Database: small_bank_1
Question sequence:
Is there an owner named Brown?
What is his checking balance?
What is his savings balance?
Please show both at the same time.
SQL query sequence:
SELECT * FROM accounts where name = "Brown"
SELECT T2.balance FROM accounts AS T1 JOIN checking AS T2 ON T1.custid  =  T2.custid WHERE T1.name  =  'Brown'
SELECT T2.balance FROM accounts AS T1 JOIN savings AS T2 ON T1.custid  =  T2.custid WHERE T1.name  =  'Brown'
SELECT T2.balance,  T3.balance FROM accounts AS T1 JOIN checking AS T2 ON T1.custid  =  T2.custid JOIN savings AS T3 ON T1.custid  =  T3.custid WHERE T1.name  =  'Brown'
Final question: Find the checking balance and saving balance in the Brown’s account.
Final SQL: SELECT T2.balance,  T3.balance FROM accounts AS T1 JOIN checking AS T2 ON T1.custid  =  T2.custid JOIN savings AS T3 ON T1.custid  =  T3.custid WHERE T1.name  =  'Brown'
Database: small_bank_1
Question sequence:
What is the average saving balance?
Who have savings account balances below that?
What are their checking account balances?
Who of these users have checking account balances above the average checking balance of all users?
SQL query sequence:
SELECT avg(balance) FROM savings
SELECT T1.name FROM accounts AS T1 JOIN savings AS T2 ON T1.custid  =  T2.custid WHERE T2.balance  <  (SELECT avg(balance) FROM savings)
SELECT T1.name, T2.balance FROM accounts AS T1 JOIN checking AS T2 ON T1.custid  =  T2.custid WHERE T2.custid in (SELECT T1.custid FROM accounts AS T1 JOIN savings AS T2 ON T1.custid  =  T2.custid WHERE T2.balance  <  (SELECT avg(balance) FROM savings))
SELECT T1.name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid  =  T2.custid WHERE T2.balance  >  (SELECT avg(balance) FROM checking) INTERSECT SELECT T1.name FROM accounts AS T1 JOIN savings AS T2 ON T1.custid  =  T2.custid WHERE T2.balance  <  (SELECT avg(balance) FROM savings)
Final question: Find the names of accounts whose checking balance is above the average checking balance, but savings balance is below the average savings balance.
Final SQL: SELECT T1.name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid  =  T2.custid WHERE T2.balance  >  (SELECT avg(balance) FROM checking) INTERSECT SELECT T1.name FROM accounts AS T1 JOIN savings AS T2 ON T1.custid  =  T2.custid WHERE T2.balance  <  (SELECT avg(balance) FROM savings)
Database: small_bank_1
Question sequence:
What is the average savings balance?
How many people have savings account balances over it?
What are their names?
What are their checking account balances?
SQL query sequence:
SELECT avg(balance) FROM savings
SELECT count(*)  FROM savings where balance > (SELECT avg(balance) FROM savings)
SELECT T1.name FROM accounts AS T1 JOIN savings AS T2 ON T1.custid  =  T2.custid WHERE T2.balance  >  (SELECT avg(balance) FROM savings)
SELECT T2.balance FROM accounts AS T1 JOIN checking AS T2 ON T1.custid  =  T2.custid WHERE T1.name IN (SELECT T1.name FROM accounts AS T1 JOIN savings AS T2 ON T1.custid  =  T2.custid WHERE T2.balance  >  (SELECT avg(balance) FROM savings))
Final question: Find the checking balance of the accounts whose savings balance is higher than the average savings balance.
Final SQL: SELECT T2.balance FROM accounts AS T1 JOIN checking AS T2 ON T1.custid  =  T2.custid WHERE T1.name IN (SELECT T1.name FROM accounts AS T1 JOIN savings AS T2 ON T1.custid  =  T2.custid WHERE T2.balance  >  (SELECT avg(balance) FROM savings))
Database: small_bank_1
Question sequence:
What is the name of the user that has the lowest checking balance?
the lowest saving balance?
how about the lowest total sum of checking and saving balance?
SQL query sequence:
SELECT T1.name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid  =  T2.custid ORDER BY T2.balance limit 1
SELECT T1.name FROM accounts AS T1 JOIN savings AS T2 ON T1.custid  =  T2.custid ORDER BY T2.balance limit 1
SELECT T1.name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid  =  T2.custid JOIN savings AS T3 ON T1.custid  =  T3.custid ORDER BY T2.balance + T3.balance LIMIT 1
Final question: Find the name of account that has the lowest total checking and saving balance.
Final SQL: SELECT T1.name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid  =  T2.custid JOIN savings AS T3 ON T1.custid  =  T3.custid ORDER BY T2.balance + T3.balance LIMIT 1
Database: small_bank_1
Question sequence:
How many accounts have savings balances greater than the average savings balance?
What are their names?
What are their checking account balances?
How about both their total checking and savings balances.
SQL query sequence:
SELECT count(*) FROM savings where balance > (SELECT avg(balance) FROM savings)
SELECT T1.name FROM accounts AS T1 JOIN savings AS T2 ON T1.custid  =  T2.custid WHERE T2.balance  >  (SELECT avg(balance) FROM savings)
SELECT T1.name, T2.balance  FROM accounts AS T1 JOIN checking AS T2 ON T1.custid  =  T2.custid JOIN savings AS T3 ON T1.custid  =  T3.custid WHERE T3.balance  >  (SELECT avg(balance) FROM savings)
SELECT T1.name, T2.balance + T3.balance FROM accounts AS T1 JOIN checking AS T2 ON T1.custid  =  T2.custid JOIN savings AS T3 ON T1.custid  =  T3.custid WHERE T3.balance  >  (SELECT avg(balance) FROM savings)
Final question: Find the names and total checking and savings balances of accounts whose savings balance is higher than the average savings balance.
Final SQL: SELECT T1.name, T2.balance + T3.balance FROM accounts AS T1 JOIN checking AS T2 ON T1.custid  =  T2.custid JOIN savings AS T3 ON T1.custid  =  T3.custid WHERE T3.balance  >  (SELECT avg(balance) FROM savings)
Database: small_bank_1
Question sequence:
What are all the savings balances?
What is the lowest one?
What is the name on the account has the lowest one?
Also provide the checking balance.
SQL query sequence:
SELECT balance FROM savings
SELECT min(balance) FROM savings
SELECT T1.name FROM accounts AS T1 JOIN savings AS T2 ON T1.custid  =  T2.custid ORDER BY T2.balance LIMIT 1
SELECT T1.name,  T2.balance FROM accounts AS T1 JOIN checking AS T2 ON T1.custid  =  T2.custid JOIN savings AS T3 ON T1.custid  =  T3.custid ORDER BY T3.balance LIMIT 1
Final question: Find the name and checking balance of the account with the lowest savings balance.
Final SQL: SELECT T1.name,  T2.balance FROM accounts AS T1 JOIN checking AS T2 ON T1.custid  =  T2.custid JOIN savings AS T3 ON T1.custid  =  T3.custid ORDER BY T3.balance LIMIT 1
Database: small_bank_1
Question sequence:
Show all the names for each account.
What are the unique set of names?
How many savings accounts under each of these names?
How about checking accounts?
SQL query sequence:
SELECT name FROM accounts
SELECT DISTINCT name FROM accounts
SELECT count(*),  T1.name FROM accounts AS T1 JOIN savings AS T2 ON T1.custid  =  T2.custid GROUP BY T1.name
SELECT count(*),  T1.name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid  =  T2.custid GROUP BY T1.name
Final question: Find the number of checking accounts for each account name.
Final SQL: SELECT count(*),  T1.name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid  =  T2.custid GROUP BY T1.name
Database: small_bank_1
Question sequence:
What are the names of all the accounts?
Show the savings balances for all accounts.
Now show me the total by account name.
SQL query sequence:
SELECT name FROM accounts
SELECT T1.name, T2.balance FROM accounts AS T1 JOIN savings AS T2 ON T1.custid  =  T2.custid
SELECT sum(T2.balance),  T1.name FROM accounts AS T1 JOIN savings AS T2 ON T1.custid  =  T2.custid GROUP BY T1.name
Final question: Find the total saving balance for each account name.
Final SQL: SELECT sum(T2.balance) ,  T1.name FROM accounts AS T1 JOIN savings AS T2 ON T1.custid  =  T2.custid GROUP BY T1.name
Database: small_bank_1
Question sequence:
What is the average checking balance?
What is the account information for those have greater checking balances than that?
How about for lower checking balances?
What are their account names?
SQL query sequence:
SELECT avg(balance) FROM checking
SELECT * FROM accounts AS T1 JOIN checking AS T2 ON T1.custid  =  T2.custid WHERE T2.balance  >  (SELECT avg(balance) FROM checking)
SELECT * FROM accounts AS T1 JOIN checking AS T2 ON T1.custid  =  T2.custid WHERE T2.balance  <  (SELECT avg(balance) FROM checking)
SELECT T1.name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid  =  T2.custid WHERE T2.balance  <  (SELECT avg(balance) FROM checking)
Final question: Find the name of accounts whose checking balance is below the average checking balance.
Final SQL: SELECT T1.name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid  =  T2.custid WHERE T2.balance  <  (SELECT avg(balance) FROM checking)
Database: small_bank_1
Question sequence:
Whose checking balance is the highest?
What is it?
what is her saving balance?
SQL query sequence:
SELECT name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid  =  T2.custid ORDER BY T2.balance desc limit 1
SELECT T2.balance FROM accounts AS T1 JOIN checking AS T2 ON T1.custid  =  T2.custid ORDER BY T2.balance desc limit 1
SELECT T3.balance FROM accounts AS T1 JOIN checking AS T2 ON T1.custid  =  T2.custid JOIN savings AS T3 ON T1.custid  =  T3.custid ORDER BY T2.balance DESC LIMIT 1
Final question: Find the saving balance of the account with the highest checking balance.
Final SQL: SELECT T3.balance FROM accounts AS T1 JOIN checking AS T2 ON T1.custid  =  T2.custid JOIN savings AS T3 ON T1.custid  =  T3.custid ORDER BY T2.balance DESC LIMIT 1
Database: small_bank_1
Question sequence:
What are the total checking and saving balances for all accounts?
Show me the the balances FROM greatest to least?
How about FROM least to greatest?
SQL query sequence:
SELECT T1.balance + T2.balance FROM checking AS T1 JOIN savings AS T2 ON T1.custid  =  T2.custid
SELECT T1.balance + T2.balance FROM checking AS T1 JOIN savings AS T2 ON T1.custid  =  T2.custid ORDER BY T1.balance + T2.balance desc
SELECT T1.balance + T2.balance FROM checking AS T1 JOIN savings AS T2 ON T1.custid  =  T2.custid ORDER BY T1.balance + T2.balance
Final question: Find the total checking and saving balance of all accounts sorted by the total balance in ascending order.
Final SQL: SELECT T1.balance + T2.balance FROM checking AS T1 JOIN savings AS T2 ON T1.custid  =  T2.custid ORDER BY T1.balance + T2.balance
Database: small_bank_1
Question sequence:
What is the average saving balance?
how about the lowest saving balance?
What is the name of the user that has this?
Also show his checking balance too.
SQL query sequence:
SELECT avg(balance) FROM savings
SELECT balance FROM savings order by balance limit 1
SELECT T1.name, T2.balance FROM accounts AS T1 JOIN savings AS T2 ON T1.custid  =  T2.custid ORDER BY T2.balance LIMIT 1
SELECT T2.balance,  T1.name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid  =  T2.custid JOIN savings AS T3 ON T1.custid  =  T3.custid ORDER BY T3.balance LIMIT 1
Final question: Find the name and checking balance of the account with the lowest saving balance.
Final SQL: SELECT T2.balance,  T1.name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid  =  T2.custid JOIN savings AS T3 ON T1.custid  =  T3.custid ORDER BY T3.balance LIMIT 1
Database: small_bank_1
Question sequence:
How many accounts are there in the bank?
What are the names for each?
Include the checking and saving balances for each.
SQL query sequence:
SELECT count(*) FROM accounts
SELECT name FROM accounts
SELECT T2.balance ,  T3.balance ,  T1.name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid  =  T2.custid JOIN savings AS T3 ON T1.custid  =  T3.custid
Final question: Find the name, checking balance and saving balance of all accounts in the bank.
Final SQL: SELECT T2.balance ,  T3.balance ,  T1.name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid  =  T2.custid JOIN savings AS T3 ON T1.custid  =  T3.custid
Database: small_bank_1
Question sequence:
Show me the names, checking balances, and savings balance for all accounts?
Also provide their total checking and saving balances?
Just show names, checking balance, saving balance but sort them by savings account balance.
Actually, sort them by the total checking and savings balance FROM greatest to least.
SQL query sequence:
SELECT T2.balance ,  T3.balance ,  T1.name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid  =  T2.custid JOIN savings AS T3 ON T1.custid  =  T3.custid
SELECT T2.balance + T3.balance, T2.balance ,  T3.balance ,  T1.name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid  =  T2.custid JOIN savings AS T3 ON T1.custid  =  T3.custid
SELECT T2.balance ,  T3.balance ,  T1.name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid  =  T2.custid JOIN savings AS T3 ON T1.custid  =  T3.custid ORDER BY T3.balance
SELECT T2.balance ,  T3.balance ,  T1.name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid  =  T2.custid JOIN savings AS T3 ON T1.custid  =  T3.custid ORDER BY T2.balance + T3.balance DESC
Final question: Find the name, checking balance and savings balance of all accounts in the bank sorted by their total checking and savings balance in descending order.
Final SQL: SELECT T2.balance ,  T3.balance ,  T1.name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid  =  T2.custid JOIN savings AS T3 ON T1.custid  =  T3.custid ORDER BY T2.balance + T3.balance DESC
Database: small_bank_1
Question sequence:
How many accounts have higher savings balances than their checking balances?
How about higher checking balances than their saving balances?
Show me the checking balances and saving balances for each of these accounts.
Actually, just show me the corresponding names.
SQL query sequence:
SELECT count(*) FROM accounts AS T1 JOIN checking AS T2 ON T1.custid  =  T2.custid JOIN savings AS T3 ON T1.custid  =  T3.custid WHERE T3.balance  >  T2.balance
SELECT count(*) FROM accounts AS T1 JOIN checking AS T2 ON T1.custid  =  T2.custid JOIN savings AS T3 ON T1.custid  =  T3.custid WHERE T2.balance  >  T3.balance
SELECT T2.balance, T3.balance FROM accounts AS T1 JOIN checking AS T2 ON T1.custid  =  T2.custid JOIN savings AS T3 ON T1.custid  =  T3.custid WHERE T2.balance  >  T3.balance
SELECT T1.name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid  =  T2.custid JOIN savings AS T3 ON T1.custid  =  T3.custid WHERE T2.balance  >  T3.balance
Final question: Find the name of accounts whose checking balance is higher than corresponding saving balance.
Final SQL: SELECT T1.name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid  =  T2.custid JOIN savings AS T3 ON T1.custid  =  T3.custid WHERE T2.balance  >  T3.balance
Database: small_bank_1
Question sequence:
What are the name, checking, and saving balances for all accounts?
Show me the total checking and savings balance of the accounts!
Show me only the accounts that have a lower savings balance than their checking balance?
Show just the name and total checking and savings balance.
SQL query sequence:
SELECT T2.balance ,  T3.balance ,  T1.name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid  =  T2.custid JOIN savings AS T3 ON T1.custid  =  T3.custid
SELECT T2.balance ,  T3.balance ,  T1.name, T3.balance + T2.balance FROM accounts AS T1 JOIN checking AS T2 ON T1.custid  =  T2.custid JOIN savings AS T3 ON T1.custid  =  T3.custid
SELECT T2.balance ,  T3.balance ,  T1.name, T3.balance + T2.balance FROM accounts AS T1 JOIN checking AS T2 ON T1.custid  =  T2.custid JOIN savings AS T3 ON T1.custid  =  T3.custid where T3.balance < T2.balance
SELECT T1.name,  T3.balance + T2.balance FROM accounts AS T1 JOIN checking AS T2 ON T1.custid  =  T2.custid JOIN savings AS T3 ON T1.custid  =  T3.custid WHERE T3.balance  <  T2.balance
Final question: Find the name and total checking and savings balance of the accounts whose savings balance is lower than corresponding checking balance.
Final SQL: SELECT T1.name,  T3.balance + T2.balance FROM accounts AS T1 JOIN checking AS T2 ON T1.custid  =  T2.custid JOIN savings AS T3 ON T1.custid  =  T3.custid WHERE T3.balance  <  T2.balance
Database: chinook_1
Question sequence:
Find the names of all artists whose names end with "b".
How about artists whose names contain "b"?
Now do the same for "a".
SQL query sequence:
SELECT Name FROM ARTIST WHERE Name LIKE "%b"
SELECT Name FROM ARTIST WHERE Name LIKE "%b%"
SELECT Name FROM ARTIST WHERE Name LIKE "%a%"
Final question: Find the names of all artists that have "a" in their names.
Final SQL: SELECT Name FROM ARTIST WHERE Name LIKE "%a%"
Database: chinook_1
Question sequence:
Find the ids of all albums of "AC/DC".
Show me the titles of those albums.
SQL query sequence:
SELECT AlbumId FROM ALBUM AS T1 JOIN ARTIST AS T2 ON T1.ArtistId  =  T2.ArtistId WHERE T2.Name  =  "AC/DC"
SELECT Title FROM ALBUM AS T1 JOIN ARTIST AS T2 ON T1.ArtistId  =  T2.ArtistId WHERE T2.Name  =  "AC/DC"
Final question: Find the title of all the albums of the artist "AC/DC".
Final SQL: SELECT Title FROM ALBUM AS T1 JOIN ARTIST AS T2 ON T1.ArtistId  =  T2.ArtistId WHERE T2.Name  =  "AC/DC"
Database: chinook_1
Question sequence:
Show me all the albums from "Metallica".
How many are there?
SQL query sequence:
SELECT * FROM ALBUM AS T1 JOIN ARTIST AS T2 ON T1.ArtistId  =  T2.ArtistId WHERE T2.Name  =  "Metallica"
SELECT Count(*) FROM ALBUM AS T1 JOIN ARTIST AS T2 ON T1.ArtistId  =  T2.ArtistId WHERE T2.Name  =  "Metallica"
Final question: How many albums does the artist "Metallica" have?
Final SQL: SELECT COUNT(*) FROM ALBUM AS T1 JOIN ARTIST AS T2 ON T1.ArtistId  =  T2.ArtistId WHERE T2.Name  =  "Metallica"
Database: chinook_1
Question sequence:
Is there an album called "Balls to the Wall"?
Who made it?
SQL query sequence:
SELECT * FROM ALBUM WHERE Title = "Balls to the Wall"
SELECT T2.Name FROM ALBUM AS T1 JOIN ARTIST AS T2 ON T1.ArtistId  =  T2.ArtistId WHERE T1.Title  =  "Balls to the Wall"
Final question: Which artist does the album "Balls to the Wall" belong to?
Final SQL: SELECT T2.Name FROM ALBUM AS T1 JOIN ARTIST AS T2 ON T1.ArtistId  =  T2.ArtistId WHERE T1.Title  =  "Balls to the Wall"
Database: chinook_1
Question sequence:
Which artist has the least albums?
How about the most albums?
SQL query sequence:
SELECT T2.Name FROM ALBUM AS T1 JOIN ARTIST AS T2 ON T1.ArtistId  =  T2.ArtistId GROUP BY T2.Name ORDER BY COUNT(*) ASC LIMIT 1
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
Final question: Which artist has the most albums?
Final SQL: 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
Database: chinook_1
Question sequence:
Find the names of all the albums that contain the word "you".
Oops, I meant tracks not albums.
SQL query sequence:
SELECT Title FROM ALBUM WHERE title LIKE '%you%'
SELECT Name FROM TRACK WHERE Name LIKE '%you%'
Final question: Find the names of all the tracks that contain the word "you".
Final SQL: SELECT Name FROM TRACK WHERE Name LIKE '%you%'
Database: chinook_1
Question sequence:
What is the longest track?
The shortest?
Show me both.
SQL query sequence:
SELECT max(Milliseconds) from TRACK
SELECT min(Milliseconds) from TRACK
SELECT max(Milliseconds) ,  min(Milliseconds) FROM TRACK
Final question: What are the durations of the longest and the shortest tracks in milliseconds?
Final SQL: SELECT max(Milliseconds) ,  min(Milliseconds) FROM TRACK
Database: chinook_1
Question sequence:
Show me the names and ids of each album.
Show me the number of tracks each album has as well.
SQL query sequence:
SELECT T1.Title ,  T2.AlbumID FROM ALBUM AS T1 JOIN TRACK AS T2 ON T1.AlbumId  =  T2.AlbumId GROUP BY T2.AlbumID
SELECT T1.Title ,  T2.AlbumID ,  COUNT(*) FROM ALBUM AS T1 JOIN TRACK AS T2 ON T1.AlbumId  =  T2.AlbumId GROUP BY T2.AlbumID
Final question: Show the album names, ids and the number of tracks for each album.
Final SQL: SELECT T1.Title ,  T2.AlbumID ,  COUNT(*) FROM ALBUM AS T1 JOIN TRACK AS T2 ON T1.AlbumId  =  T2.AlbumId GROUP BY T2.AlbumID
Database: chinook_1
Question sequence:
Show me the 10 most common genres in all tracks.
Show me the 10 least common genres.
Show me the most common one.
SQL query sequence:
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 10
SELECT T1.Name FROM GENRE AS T1 JOIN TRACK AS T2 ON T1.GenreId  =  T2.GenreId GROUP BY T2.GenreId ORDER BY COUNT(*) ASC LIMIT 10
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
Final question: What is the name of the most common genre in all tracks?
Final SQL: 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
Database: chinook_1
Question sequence:
Show me all the media types in tracks.
What is the most common one?
How about the least common one?
SQL query sequence:
SELECT T1.Name FROM MEDIATYPE AS T1 JOIN TRACK AS T2 ON T1.MediaTypeId  =  T2.MediaTypeId GROUP BY T2.MediaTypeId
SELECT T1.Name FROM MEDIATYPE AS T1 JOIN TRACK AS T2 ON T1.MediaTypeId  =  T2.MediaTypeId GROUP BY T2.MediaTypeId ORDER BY COUNT(*) DESC LIMIT 1
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
Final question: What is the least common media type in all tracks?
Final SQL: 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
Database: chinook_1
Question sequence:
Show me all the tracks with unit price bigger than 1.
Show me their album names and ids
SQL query sequence:
SELECT Name FROM TRACK WHERE UnitPrice  >  1
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
Final question: Show the album names and ids for albums that contain tracks with unit price bigger than 1.
Final SQL: 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
Database: chinook_1
Question sequence:
Show me tracks that belong to rock genre.
How many are there?
SQL query sequence:
SELECT T2.Name FROM GENRE AS T1 JOIN TRACK AS T2 ON T1.GenreId  =  T2.GenreId WHERE T1.Name  =  "Rock"
SELECT COUNT(*) FROM GENRE AS T1 JOIN TRACK AS T2 ON T1.GenreId  =  T2.GenreId WHERE T1.Name  =  "Rock"
Final question: How many tracks belong to rock genre?
Final SQL: SELECT COUNT(*) FROM GENRE AS T1 JOIN TRACK AS T2 ON T1.GenreId  =  T2.GenreId WHERE T1.Name  =  "Rock"
Database: chinook_1
Question sequence:
What is the most expensive track with Jazz genre?
Show me the average unit price of all Jazz genre tracks.
SQL query sequence:
SELECT max(UnitPrice) FROM GENRE AS T1 JOIN TRACK AS T2 ON T1.GenreId  =  T2.GenreId WHERE T1.Name  =  "Jazz"
SELECT AVG(UnitPrice) FROM GENRE AS T1 JOIN TRACK AS T2 ON T1.GenreId  =  T2.GenreId WHERE T1.Name  =  "Jazz"
Final question: What is the average unit price of tracks that belong to Jazz genre?
Final SQL: SELECT AVG(UnitPrice) FROM GENRE AS T1 JOIN TRACK AS T2 ON T1.GenreId  =  T2.GenreId WHERE T1.Name  =  "Jazz"
Database: chinook_1
Question sequence:
Show me first name of customers with emails that contain "gmail.com".
How many are there?
SQL query sequence:
SELECT FirstName FROM CUSTOMER WHERE Email LIKE "%gmail.com%"
SELECT COUNT(*) FROM CUSTOMER WHERE Email LIKE "%gmail.com%"
Final question: How many customers have email that contains "gmail.com"?
Final SQL: SELECT COUNT(*) FROM CUSTOMER WHERE Email LIKE "%gmail.com%"