aherntech/sparc huggingface dataset:
Database: chinook_1
Question sequence:
Show me the customer with first name Leonie.
What is the first and last name of the employee assigned to this customer?
SQL query sequence:
SELECT * FROM CUSTOMER WHERE FirstName  =  "Leonie"
SELECT T2.FirstName ,  T2.LastName FROM CUSTOMER AS T1 JOIN EMPLOYEE AS T2 ON T1.SupportRepId  =  T2.EmployeeId WHERE T1.FirstName  =  "Leonie"
Final question: What is the first name and last name employee helps the customer with first name Leonie?
Final SQL: SELECT T2.FirstName ,  T2.LastName FROM CUSTOMER AS T1 JOIN EMPLOYEE AS T2 ON T1.SupportRepId  =  T2.EmployeeId WHERE T1.FirstName  =  "Leonie"
Database: chinook_1
Question sequence:
Find me a customer with postal code 70174.
Which employee was assigned to this customer? Give me the first and last names.
Which city does he/she live?
SQL query sequence:
SELECT * FROM CUSTOMER WHERE PostalCode = 70174
SELECT T2.FirstName, T2.LastName FROM CUSTOMER AS T1 JOIN EMPLOYEE AS T2 ON T1.SupportRepId  =  T2.EmployeeId WHERE T1.PostalCode  =  "70174"
SELECT T2.City FROM CUSTOMER AS T1 JOIN EMPLOYEE AS T2 ON T1.SupportRepId  =  T2.EmployeeId WHERE T1.PostalCode  =  "70174"
Final question: What city does the employee who helps the customer with postal code 70174 live in?
Final SQL: SELECT T2.City FROM CUSTOMER AS T1 JOIN EMPLOYEE AS T2 ON T1.SupportRepId  =  T2.EmployeeId WHERE T1.PostalCode  =  "70174"
Database: chinook_1
Question sequence:
Find all invoice dates of customer named Astrid.
Hm, find them for Astrids with last name Gruber.
SQL query sequence:
SELECT T2.InvoiceDate FROM CUSTOMER AS T1 JOIN INVOICE AS T2 ON T1.CustomerId  =  T2.CustomerId WHERE T1.FirstName  =  "Astrid"
SELECT T2.InvoiceDate FROM CUSTOMER AS T1 JOIN INVOICE AS T2 ON T1.CustomerId  =  T2.CustomerId WHERE T1.FirstName  =  "Astrid" AND LastName  =  "Gruber"
Final question: Find all invoice dates corresponding to customers with first name Astrid and last name Gruber.
Final SQL: SELECT T2.InvoiceDate FROM CUSTOMER AS T1 JOIN INVOICE AS T2 ON T1.CustomerId  =  T2.CustomerId WHERE T1.FirstName  =  "Astrid" AND LastName  =  "Gruber"
Database: chinook_1
Question sequence:
Show me first names of all customers that have invoice totals less than 20.
I meant last names.
Oh I meant invoice totals larger than 20, not less than.
SQL query sequence:
SELECT FirstName FROM CUSTOMER EXCEPT SELECT T1.LastName FROM CUSTOMER AS T1 JOIN Invoice AS T2 ON T1.CustomerId  =  T2.CustomerId WHERE T2.total  <  20
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
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
Final question: Find all the customer last names that do not have invoice totals larger than 20.
Final SQL: 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
Database: chinook_1
Question sequence:
Find the first names of all customers that live in Brazil
Among them, find ones who have an invoice.
SQL query sequence:
SELECT DISTINCT FirstName FROM CUSTOMER WHERE country  =  "Brazil"
SELECT DISTINCT T1.FirstName FROM CUSTOMER AS T1 JOIN INVOICE AS T2 ON T1.CustomerId  =  T2.CustomerId WHERE T1.country  =  "Brazil"
Final question: Find the first names of all customers that live in Brazil and have an invoice.
Final SQL: SELECT DISTINCT T1.FirstName FROM CUSTOMER AS T1 JOIN INVOICE AS T2 ON T1.CustomerId  =  T2.CustomerId WHERE T1.country  =  "Brazil"
Database: chinook_1
Question sequence:
Find the address of all customers who live in Germany.
Among those, find the ones who have invoice.
SQL query sequence:
SELECT DISTINCT Address FROM CUSTOMER WHERE country  =  "Germany"
SELECT DISTINCT T1.Address FROM CUSTOMER AS T1 JOIN INVOICE AS T2 ON T1.CustomerId  =  T2.CustomerId WHERE T1.country  =  "Germany"
Final question: Find the address of all customers that live in Germany and have invoice.
Final SQL: SELECT DISTINCT T1.Address FROM CUSTOMER AS T1 JOIN INVOICE AS T2 ON T1.CustomerId  =  T2.CustomerId WHERE T1.country  =  "Germany"
Database: chinook_1
Question sequence:
Show me the tracks that are in AAC audio file media type
How many are there?
SQL query sequence:
SELECT * FROM MEDIATYPE AS T1 JOIN TRACK AS T2 ON T1.MediaTypeId  =  T2.MediaTypeId WHERE T1.Name  =  "AAC audio file"
SELECT COUNT(*) FROM MEDIATYPE AS T1 JOIN TRACK AS T2 ON T1.MediaTypeId  =  T2.MediaTypeId WHERE T1.Name  =  "AAC audio file"
Final question: How many tracks are in the AAC audio file media type?
Final SQL: SELECT COUNT(*) FROM MEDIATYPE AS T1 JOIN TRACK AS T2 ON T1.MediaTypeId  =  T2.MediaTypeId WHERE T1.Name  =  "AAC audio file"
Database: chinook_1
Question sequence:
What is the average duration of tracks that belong to Latin genre?
How about Pop?
Show me the average for both genres.
SQL query sequence:
SELECT AVG(Milliseconds) FROM GENRE AS T1 JOIN TRACK AS T2 ON T1.GenreId  =  T2.GenreId WHERE T1.Name  =  "Latin"
SELECT AVG(Milliseconds) FROM GENRE AS T1 JOIN TRACK AS T2 ON T1.GenreId  =  T2.GenreId WHERE T1.Name  =  "Pop"
SELECT AVG(Milliseconds) FROM GENRE AS T1 JOIN TRACK AS T2 ON T1.GenreId  =  T2.GenreId WHERE T1.Name  =  "Latin" OR T1.Name  =  "Pop"
Final question: What is the average duration in milliseconds of tracks that belong to Latin or Pop genre?
Final SQL: SELECT AVG(Milliseconds) FROM GENRE AS T1 JOIN TRACK AS T2 ON T1.GenreId  =  T2.GenreId WHERE T1.Name  =  "Latin" OR T1.Name  =  "Pop"
Database: chinook_1
Question sequence:
Show the first names and ids of employees serving 10 customers.
Show me those serving at least 10 customers.
SQL query sequence:
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
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
Final question: Please show the employee first names and ids of employees who serve at least 10 customers.
Final SQL: 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
Database: chinook_1
Question sequence:
Show me first names for employees serving 20 customers.
Show me their last names.
Show me the same for employees serving no more than 20 customers.
SQL query sequence:
SELECT T1.FirstName FROM CUSTOMER AS T1 JOIN EMPLOYEE AS T2 ON T1.SupportRepId  =  T2.EmployeeId GROUP BY T1.SupportRepId HAVING COUNT(*)  =  20
SELECT T1.LastName FROM CUSTOMER AS T1 JOIN EMPLOYEE AS T2 ON T1.SupportRepId  =  T2.EmployeeId GROUP BY T1.SupportRepId HAVING COUNT(*)  =  20
SELECT T1.LastName FROM CUSTOMER AS T1 JOIN EMPLOYEE AS T2 ON T1.SupportRepId  =  T2.EmployeeId GROUP BY T1.SupportRepId HAVING COUNT(*)  <=  20
Final question: Please show the employee last names that serves no more than 20 customers.
Final SQL: SELECT T1.LastName FROM CUSTOMER AS T1 JOIN EMPLOYEE AS T2 ON T1.SupportRepId  =  T2.EmployeeId GROUP BY T1.SupportRepId HAVING COUNT(*)  <=  20
Database: chinook_1
Question sequence:
Show me all artists with at least 3 albums.
Show me their names and ids.
Sort them in alphabetical order.
SQL query sequence:
SELECT * FROM ALBUM AS T1 JOIN ARTIST AS T2 ON T1.ArtistId  =  T2.ArtistID GROUP BY T1.ArtistId HAVING COUNT(*)  >=  3
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
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
Final question: Please list the name and id of all artists that have at least 3 albums in alphabetical order.
Final SQL: 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
Database: chinook_1
Question sequence:
How many artists don't have any albums?
Find me their names.
SQL query sequence:
SELECT Count(*) FROM ARTIST EXCEPT SELECT T2.Name FROM ALBUM AS T1 JOIN ARTIST AS T2 ON T1.ArtistId  =  T2.ArtistId
SELECT Name FROM ARTIST EXCEPT SELECT T2.Name FROM ALBUM AS T1 JOIN ARTIST AS T2 ON T1.ArtistId  =  T2.ArtistId
Final question: Find the names of artists that do not have any albums.
Final SQL: SELECT Name FROM ARTIST EXCEPT SELECT T2.Name FROM ALBUM AS T1 JOIN ARTIST AS T2 ON T1.ArtistId  =  T2.ArtistId
Database: chinook_1
Question sequence:
What is the max unit price of rock tracks?
What is the average?
SQL query sequence:
SELECT max(T2.UnitPrice) FROM GENRE AS T1 JOIN TRACK AS T2 ON T1.GenreId  =  T2.GenreId WHERE T1.Name  =  "Rock"
SELECT AVG(T2.UnitPrice) FROM GENRE AS T1 JOIN TRACK AS T2 ON T1.GenreId  =  T2.GenreId WHERE T1.Name  =  "Rock"
Final question: What is the average unit price of rock tracks?
Final SQL: SELECT AVG(T2.UnitPrice) FROM GENRE AS T1 JOIN TRACK AS T2 ON T1.GenreId  =  T2.GenreId WHERE T1.Name  =  "Rock"
Database: chinook_1
Question sequence:
How long is the longest pop track?
How about the shortest one?
Show me durations for both of those pop tracks.
SQL query sequence:
SELECT max(Milliseconds) FROM GENRE AS T1 JOIN TRACK AS T2 ON T1.GenreId  =  T2.GenreId WHERE T1.Name  =  "Pop"
SELECT min(Milliseconds) FROM GENRE AS T1 JOIN TRACK AS T2 ON T1.GenreId  =  T2.GenreId WHERE T1.Name  =  "Pop"
SELECT max(Milliseconds) ,  min(Milliseconds) FROM GENRE AS T1 JOIN TRACK AS T2 ON T1.GenreId  =  T2.GenreId WHERE T1.Name  =  "Pop"
Final question: What are the duration of the longest and shortest pop tracks in milliseconds?
Final SQL: SELECT max(Milliseconds) ,  min(Milliseconds) FROM GENRE AS T1 JOIN TRACK AS T2 ON T1.GenreId  =  T2.GenreId WHERE T1.Name  =  "Pop"
Database: chinook_1
Question sequence:
Show me the names of artists with no album.
How many are there?
SQL query sequence:
SELECT Name FROM ARTIST EXCEPT SELECT T2.Name FROM ALBUM AS T1 JOIN ARTIST AS T2 ON T1.ArtistId  =  T2.ArtistId
SELECT count(*) FROM ARTIST WHERE artistid NOT IN(SELECT artistid FROM ALBUM)
Final question: How many artists do not have any album?
Final SQL: SELECT count(*) FROM ARTIST WHERE artistid NOT IN(SELECT artistid FROM ALBUM)
Database: entrepreneur
Question sequence:
Show me the names of all entrepreneurs.
Whose investor is not Rachel Elnaugh?
SQL query sequence:
SELECT T2.Name FROM entrepreneur AS T1 JOIN people AS T2 ON T1.People_ID  =  T2.People_ID
SELECT T2.Name FROM entrepreneur AS T1 JOIN people AS T2 ON T1.People_ID  =  T2.People_ID WHERE T1.Investor != "Rachel Elnaugh"
Final question: What are the names of entrepreneurs whose investor is not "Rachel Elnaugh"?
Final SQL: SELECT T2.Name FROM entrepreneur AS T1 JOIN people AS T2 ON T1.People_ID  =  T2.People_ID WHERE T1.Investor != "Rachel Elnaugh"
Database: entrepreneur
Question sequence:
Show me the names of all people.
Who has the shortest height?
What is this people's weight?
SQL query sequence:
SELECT Name FROM people
SELECT Name FROM people ORDER BY Height ASC LIMIT 1
SELECT Weight FROM people ORDER BY Height ASC LIMIT 1
Final question: What is the weight of the shortest person?
Final SQL: SELECT Weight FROM people ORDER BY Height ASC LIMIT 1
Database: entrepreneur
Question sequence:
Show me the names of all entrepreneurs.
Who has the greatest weight?
SQL query sequence:
SELECT T2.Name FROM entrepreneur AS T1 JOIN people AS T2 ON T1.People_ID  =  T2.People_ID
SELECT T2.Name FROM entrepreneur AS T1 JOIN people AS T2 ON T1.People_ID  =  T2.People_ID ORDER BY T2.Weight DESC LIMIT 1
Final question: What is the name of the entrepreneur with the greatest weight?
Final SQL: SELECT T2.Name FROM entrepreneur AS T1 JOIN people AS T2 ON T1.People_ID  =  T2.People_ID ORDER BY T2.Weight DESC LIMIT 1
Database: entrepreneur
Question sequence:
Show me the names of all entrepreneurs.
Show me those with height taller than 1.85.
What is the total money requested by them?
SQL query sequence:
SELECT T2.Name FROM entrepreneur AS T1 JOIN people AS T2 ON T1.People_ID  =  T2.People_ID
SELECT T2.Name FROM entrepreneur AS T1 JOIN people AS T2 ON T1.People_ID  =  T2.People_ID WHERE T2.Height > 1.85
SELECT sum(T1.Money_Requested) FROM entrepreneur AS T1 JOIN people AS T2 ON T1.People_ID  =  T2.People_ID WHERE T2.Height  >  1.85
Final question: What is the total money requested by entrepreneurs with height more than 1.85?
Final SQL: SELECT sum(T1.Money_Requested) FROM entrepreneur AS T1 JOIN people AS T2 ON T1.People_ID  =  T2.People_ID WHERE T2.Height  >  1.85
Database: entrepreneur
Question sequence:
Show me the names of all entrepreneurs.
Whose investor is Simon Woodroffe or Peter Jones?
Show me their dates of birth.
SQL query sequence:
SELECT T2.Name FROM entrepreneur AS T1 JOIN people AS T2 ON T1.People_ID  =  T2.People_ID
SELECT T2.Name FROM entrepreneur AS T1 JOIN people AS T2 ON T1.People_ID  =  T2.People_ID WHERE T1.Investor  =  "Simon Woodroffe" OR T1.Investor  =  "Peter Jones"
SELECT T2.Date_of_Birth FROM entrepreneur AS T1 JOIN people AS T2 ON T1.People_ID  =  T2.People_ID WHERE T1.Investor  =  "Simon Woodroffe" OR T1.Investor  =  "Peter Jones"
Final question: What are the dates of birth of entrepreneurs with investor "Simon Woodroffe" or "Peter Jones"?
Final SQL: SELECT T2.Date_of_Birth FROM entrepreneur AS T1 JOIN people AS T2 ON T1.People_ID  =  T2.People_ID WHERE T1.Investor  =  "Simon Woodroffe" OR T1.Investor  =  "Peter Jones"
Database: entrepreneur
Question sequence:
Show me the names of all entrepreneurs.
How much money did they each request?
Give me the weights of them only, in descending order of money requested.
SQL query sequence:
SELECT T2.Name FROM entrepreneur AS T1 JOIN people AS T2 ON T1.People_ID  =  T2.People_ID
SELECT T2.Name,T1.Money_Requested FROM entrepreneur AS T1 JOIN people AS T2 ON T1.People_ID  =  T2.People_ID
SELECT T2.Weight FROM entrepreneur AS T1 JOIN people AS T2 ON T1.People_ID  =  T2.People_ID ORDER BY T1.Money_Requested DESC
Final question: What are the weights of entrepreneurs in descending order of money requested?
Final SQL: SELECT T2.Weight FROM entrepreneur AS T1 JOIN people AS T2 ON T1.People_ID  =  T2.People_ID ORDER BY T1.Money_Requested DESC
Database: entrepreneur
Question sequence:
Show me the name of all investors.
Who has invested in the most number of entrepreneurs?
SQL query sequence:
SELECT Investor FROM entrepreneur GROUP BY Investor
SELECT Investor FROM entrepreneur GROUP BY Investor ORDER BY COUNT(*) DESC LIMIT 1
Final question: Who is the investor that has invested in the most number of entrepreneurs?
Final SQL: SELECT Investor FROM entrepreneur GROUP BY Investor ORDER BY COUNT(*) DESC LIMIT 1
Database: entrepreneur
Question sequence:
Show me the name of all investors.
Who have invested in at least two entrepreneurs?
SQL query sequence:
SELECT Investor FROM entrepreneur GROUP BY Investor
SELECT Investor FROM entrepreneur GROUP BY Investor HAVING COUNT(*)  >=  2
Final question: Who are the investors that have invested in at least two entrepreneurs?
Final SQL: SELECT Investor FROM entrepreneur GROUP BY Investor HAVING COUNT(*)  >=  2
Database: entrepreneur
Question sequence:
Show me the names of all entrepreneurs.
What are their companies?
List them in descending order of money requested.
SQL query sequence:
SELECT T2.Name FROM entrepreneur AS T1 JOIN people AS T2 ON T1.People_ID  =  T2.People_ID
SELECT T2.Name,T1.Company FROM entrepreneur AS T1 JOIN people AS T2 ON T1.People_ID  =  T2.People_ID
SELECT T2.Name ,  T1.Company FROM entrepreneur AS T1 JOIN people AS T2 ON T1.People_ID  =  T2.People_ID ORDER BY T1.Money_Requested
Final question: List the names of entrepreneurs and their companies in descending order of money requested?
Final SQL: SELECT T2.Name ,  T1.Company FROM entrepreneur AS T1 JOIN people AS T2 ON T1.People_ID  =  T2.People_ID ORDER BY T1.Money_Requested
Database: entrepreneur
Question sequence:
What are the name of all the people?
Show me those who are not entrepreneurs.
SQL query sequence:
SELECT Name FROM people
SELECT Name FROM people WHERE People_ID NOT IN (SELECT People_ID FROM entrepreneur)
Final question: List the names of people that are not entrepreneurs.
Final SQL: SELECT Name FROM people WHERE People_ID NOT IN (SELECT People_ID FROM entrepreneur)
Database: entrepreneur
Question sequence:
Show me the name of all investors.
Who have been requested more than 140000 by any entrepreneurs?
Among them, who have been requested less than 120000 by any entrepreneurs?
SQL query sequence:
SELECT Investor FROM entrepreneur GROUP BY Investor
SELECT Investor FROM entrepreneur WHERE Money_Requested  >  140000
SELECT Investor FROM entrepreneur WHERE Money_Requested  >  140000 INTERSECT SELECT Investor FROM entrepreneur WHERE Money_Requested  <  120000
Final question: Show the investors shared by entrepreneurs that requested more than 140000 and entrepreneurs that requested less than 120000.
Final SQL: SELECT Investor FROM entrepreneur WHERE Money_Requested  >  140000 INTERSECT SELECT Investor FROM entrepreneur WHERE Money_Requested  <  120000
Database: farm
Question sequence:
Tell me everything about the farms.
Show me the bulls produced by all the farms.
What about the cows?
Tell me the maximum and minimum number of cows.
SQL query sequence:
SELECT * FROM farm
SELECT bulls FROM farm
SELECT cows FROM farm
SELECT max(Cows) ,  min(Cows) FROM farm
Final question: What are the maximum and minimum number of cows across all farms.
Final SQL: SELECT max(Cows) ,  min(Cows) FROM farm
Database: farm
Question sequence:
Show me the official names of all the cities.
Which of these cities has the largest population?
What is its population?
Can you only show the official name and status of this city?
SQL query sequence:
SELECT official_name FROM city
SELECT official_name FROM city ORDER BY population DESC LIMIT 1
SELECT official_name, population FROM city ORDER BY population DESC LIMIT 1
SELECT Official_Name ,  Status FROM city ORDER BY Population DESC LIMIT 1
Final question: List the official name and status of the city with the largest population.
Final SQL: SELECT Official_Name ,  Status FROM city ORDER BY Population DESC LIMIT 1
Database: farm
Question sequence:
List all the city names.
Can you also show me the competition id of these cities?
How about the themes of these competitions?
Which of these cities hosted more than one competition?
SQL query sequence:
SELECT official_name FROM city
SELECT t1.official_name, t2.competition_id FROM city as t1 join farm_competition AS t2 ON t1.city_id = t2.host_city_id
SELECT t1.official_name, t2.theme FROM city as t1 join farm_competition AS t2 ON t1.city_id = t2.host_city_id
SELECT T1.Official_Name FROM city AS T1 JOIN farm_competition AS T2 ON T1.City_ID  =  T2.Host_city_ID GROUP BY T2.Host_city_ID HAVING COUNT(*)  >  1
Final question: Show the official names of the cities that have hosted more than one competition.
Final SQL: SELECT T1.Official_Name FROM city AS T1 JOIN farm_competition AS T2 ON T1.City_ID  =  T2.Host_city_ID GROUP BY T2.Host_city_ID HAVING COUNT(*)  >  1
Database: farm
Question sequence:
Show me the names of all cities
How many competitions did these cities host?
Which of these cities hosted the most competitions?
Can you only show me its status?
SQL query sequence:
SELECT official_name FROM city
SELECT t1.official_name, count(*) FROM city as t1 join farm_competition AS t2 ON t1.city_id = t2.host_city_id GROUP BY city_id
SELECT T1.official_name FROM city AS T1 JOIN farm_competition AS T2 ON T1.City_ID  =  T2.Host_city_ID GROUP BY T2.Host_city_ID ORDER BY COUNT(*) DESC LIMIT 1
SELECT T1.Status FROM city AS T1 JOIN farm_competition AS T2 ON T1.City_ID  =  T2.Host_city_ID GROUP BY T2.Host_city_ID ORDER BY COUNT(*) DESC LIMIT 1
Final question: Show the status of the city that has hosted the greatest number of competitions.
Final SQL: SELECT T1.Status FROM city AS T1 JOIN farm_competition AS T2 ON T1.City_ID  =  T2.Host_city_ID GROUP BY T2.Host_city_ID ORDER BY COUNT(*) DESC LIMIT 1
Database: farm
Question sequence:
Show me the information for all of the cities.
Which of these cities have a population greater than 1000?
Show me all the years when a competition was held in these cities.
What about the themes of these competitions?
SQL query sequence:
SELECT * FROM city
SELECT * FROM city WHERE population > 1000
SELECT t2.year FROM city AS t1 JOIN farm_competition AS t2 ON t1.city_id  = t2.host_city_id WHERE population > 1000
SELECT T2.Theme FROM city AS T1 JOIN farm_competition AS T2 ON T1.City_ID  =  T2.Host_city_ID WHERE T1.Population  >  1000
Final question: Please show the themes of competitions with host cities having populations larger than 1000.
Final SQL: SELECT T2.Theme FROM city AS T1 JOIN farm_competition AS T2 ON T1.City_ID  =  T2.Host_city_ID WHERE T1.Population  >  1000
Database: farm
Question sequence:
List the official names of all the cities.
Show me all the status of these cities.
What is the number of cities with each status?
Can you show them in increasing order?
SQL query sequence:
SELECT DISTINCT official_name FROM city
SELECT DISTINCT status FROM city
SELECT status, count(*) FROM city GROUP BY status
SELECT Status FROM city GROUP BY Status ORDER BY COUNT(*) ASC
Final question: Please show the different statuses, ordered by the number of cities that have each.
Final SQL: SELECT Status FROM city GROUP BY Status ORDER BY COUNT(*) ASC
Database: farm
Question sequence:
Tell me the names of all the cities.
Tell me the city status of "Grand Falls/Grand-Sault".
Which of the cities are not towns?
Which city status is the most common?
SQL query sequence:
SELECT official_name FROM city
SELECT status FROM city WHERE official_name = "Grand Falls/Grand-Sault"
SELECT official_name FROM city WHERE status != "Town"
SELECT Status FROM city GROUP BY Status ORDER BY COUNT(*) DESC LIMIT 1
Final question: List the most common type of Status across cities.
Final SQL: SELECT Status FROM city GROUP BY Status ORDER BY COUNT(*) DESC LIMIT 1
Database: farm
Question sequence:
Show me all the cities.
Show me the official names of all the cities.
Which of these cities have hosted competitions before?
Which of them have not?
SQL query sequence:
SELECT * FROM city
SELECT official_name FROM city
SELECT DISTINCT official_name FROM city AS t1 JOIN farm_competition AS t2 ON t1.city_id  = t2.host_city_id
SELECT Official_Name FROM city WHERE City_ID NOT IN (SELECT Host_city_ID FROM farm_competition)
Final question: List the official names of cities that have not held any competition.
Final SQL: SELECT Official_Name FROM city WHERE City_ID NOT IN (SELECT Host_city_ID FROM farm_competition)
Database: farm
Question sequence:
List the names of all the cities.
Which of these cities have a population bigger than 1500?
Which cities have a population smaller than 500?
Show all statuses that are common between these two types of cities.
SQL query sequence:
SELECT official_name FROM city
SELECT official_name FROM city WHERE population > 1500
SELECT official_name FROM city WHERE population < 500
SELECT Status FROM city WHERE Population  >  1500 INTERSECT SELECT Status FROM city WHERE Population  <  500
Final question: Show the status shared by cities with population bigger than 1500 and smaller than 500.
Final SQL: SELECT Status FROM city WHERE Population  >  1500 INTERSECT SELECT Status FROM city WHERE Population  <  500
Database: gymnast
Question sequence:
Can I see the names of the gymnasts?
How old is the gymnast from Bonao?
Who is from Miami?
How about gymnasts not from "Santo Domingo"?
SQL query sequence:
SELECT T2.Name FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID  =  T2.People_ID
SELECT T2.age FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID  =  T2.People_ID WHERE Hometown = "Bonao"
SELECT T2.Name FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID  =  T2.People_ID WHERE Hometown = "Miami"
SELECT T2.Name FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID  =  T2.People_ID WHERE T2.Hometown != "Santo Domingo"
Final question: What are the names of gymnasts whose hometown is not "Santo Domingo"?
Final SQL: SELECT T2.Name FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID  =  T2.People_ID WHERE T2.Hometown != "Santo Domingo"