aherntech/sparc huggingface dataset:
Database: entertainment_awards
Question sequence:
Tell me everything about all the artworks.
List only the names of all these artworks.
Which of these were nominated?
Which of those weren't?
SQL query sequence:
SELECT * FROM artwork
SELECT name FROM artwork
SELECT t1.name FROM artwork as t1 JOIN nomination AS t2 ON t1.artwork_id = t2.artwork_id JOIN festival_detail AS t3 ON t2.festival_id = t3.festival_id
SELECT Name FROM Artwork WHERE Artwork_ID NOT IN (SELECT Artwork_ID FROM nomination)
Final question: List the name of artworks that are not nominated.
Final SQL: SELECT Name FROM Artwork WHERE Artwork_ID NOT IN (SELECT Artwork_ID FROM nomination)
Database: entertainment_awards
Question sequence:
Show me the names of all the festivals.
Show the year for each of them.
Can you only show the audience size for year 2008?
Can you only show the audience sizes for year 2008 and 2010?
SQL query sequence:
SELECT festival_name FROM festival_detail
SELECT festival_name, year FROM festival_detail
SELECT Num_of_Audience FROM festival_detail WHERE YEAR  =  2008
SELECT Num_of_Audience FROM festival_detail WHERE YEAR  =  2008 OR YEAR  =  2010
Final question: Show the number of audience in year 2008 or 2010.
Final SQL: SELECT Num_of_Audience FROM festival_detail WHERE YEAR  =  2008 OR YEAR  =  2010
Database: behavior_monitoring
Question sequence:
Show me the mobile number of the student Emma Rohan.
What about her email?
SQL query sequence:
SELECT cell_mobile_number FROM Students WHERE first_name  =  "Emma" AND last_name  =  "Rohan"
SELECT email_address FROM Students WHERE first_name  =  "Emma" AND last_name  =  "Rohan"
Final question: What is the email of the student with first name "Emma" and last name "Rohan"?
Final SQL: SELECT email_address FROM Students WHERE first_name  =  "Emma" AND last_name  =  "Rohan"
Database: behavior_monitoring
Question sequence:
Show me the names of all students.
What are their monthly rentals?
Show me the maximum and minimum of them.
SQL query sequence:
SELECT first_name, last_name FROM Students
SELECT t1.first_name, t1.last_name, t2.monthly_rental FROM Students as t1 JOIN Student_Addresses as t2 on t1.student_id = t2.student_id
SELECT max(monthly_rental) ,  min(monthly_rental) FROM Student_Addresses
Final question: Find the maximum and minimum monthly rental for all student addresses.
Final SQL: SELECT max(monthly_rental) ,  min(monthly_rental) FROM Student_Addresses
Database: behavior_monitoring
Question sequence:
Show me the name of all teachers.
What are their mobile numbers?
What about email addresses?
Which ones contain the word "man"?
Show me the first name only.
SQL query sequence:
SELECT first_name, last_name FROM Teachers
SELECT first_name,last_name,cell_mobile_number FROM Teachers
SELECT first_name,last_name,email_address FROM Teachers
SELECT first_name,last_name,email_address FROM Teachers WHERE email_address LIKE '%man%'
SELECT first_name FROM Teachers WHERE email_address LIKE '%man%'
Final question: Find the first names of teachers whose email address contains the word "man".
Final SQL: SELECT first_name FROM Teachers WHERE email_address LIKE '%man%'
Database: behavior_monitoring
Question sequence:
How many assessment notes are there?
How many does each student have?
Give me the id and first name of the student with the largest number of them.
SQL query sequence:
SELECT count(*) FROM Assessment_Notes
SELECT student_id, count(*) FROM Assessment_Notes GROUP BY student_id
SELECT T1.student_id ,  T2.first_name FROM Assessment_Notes AS T1 JOIN Students AS T2 ON T1.student_id  =  T2.student_id GROUP BY T1.student_id ORDER BY count(*) DESC LIMIT 1
Final question: Find the id and first name of the student that has the most number of assessment notes?
Final SQL: SELECT T1.student_id ,  T2.first_name FROM Assessment_Notes AS T1 JOIN Students AS T2 ON T1.student_id  =  T2.student_id GROUP BY T1.student_id ORDER BY count(*) DESC LIMIT 1
Database: behavior_monitoring
Question sequence:
How many assessment notes are there?
How many does each teacher have?
List them in the descending order of number of assessment notes.
Show me the ids and first name of the top 3 teachers.
SQL query sequence:
SELECT count(*) FROM Assessment_Notes
SELECT teacher_id, count(*) FROM Assessment_Notes GROUP BY teacher_id
SELECT teacher_id, count(*) FROM Assessment_Notes GROUP BY teacher_id ORDER BY count(*) DESC
SELECT T1.teacher_id ,  T2.first_name FROM Assessment_Notes AS T1 JOIN Teachers AS T2 ON T1.teacher_id  =  T2.teacher_id GROUP BY T1.teacher_id ORDER BY count(*) DESC LIMIT 3
Final question: Find the ids and first names of the 3 teachers that have the most number of assessment notes?
Final SQL: SELECT T1.teacher_id ,  T2.first_name FROM Assessment_Notes AS T1 JOIN Teachers AS T2 ON T1.teacher_id  =  T2.teacher_id GROUP BY T1.teacher_id ORDER BY count(*) DESC LIMIT 3
Database: behavior_monitoring
Question sequence:
What behavior incident types are there?
How many behavior incidents are there?
How many does each student have?
Show me the id and last name of the one with the largest number.
SQL query sequence:
SELECT incident_type_code FROM Behavior_Incident GROUP BY incident_type_code
SELECT count(*) FROM Behavior_Incident
SELECT student_id, count(*) FROM Behavior_Incident GROUP BY student_id
SELECT T1.student_id ,  T2.last_name FROM Behavior_Incident AS T1 JOIN Students AS T2 ON T1.student_id  =  T2.student_id GROUP BY T1.student_id ORDER BY count(*) DESC LIMIT 1
Final question: Find the id and last name of the student that has the most behavior incidents?
Final SQL: SELECT T1.student_id ,  T2.last_name FROM Behavior_Incident AS T1 JOIN Students AS T2 ON T1.student_id  =  T2.student_id GROUP BY T1.student_id ORDER BY count(*) DESC LIMIT 1
Database: behavior_monitoring
Question sequence:
How many detentions are there?
What about detentions with type code "AFTER"?
How many does each teacher have?
Give me the id and last name of the teacher with the largest number.
SQL query sequence:
SELECT count(*) FROM Detention
SELECT count(*) FROM Detention WHERE detention_type_code  =  "AFTER"
SELECT T1.teacher_id ,  T2.last_name, count(*) FROM Detention AS T1 JOIN Teachers AS T2 ON T1.teacher_id  =  T2.teacher_id WHERE T1.detention_type_code  =  "AFTER" GROUP BY T1.teacher_id
SELECT T1.teacher_id ,  T2.last_name FROM Detention AS T1 JOIN Teachers AS T2 ON T1.teacher_id  =  T2.teacher_id WHERE T1.detention_type_code  =  "AFTER" GROUP BY T1.teacher_id ORDER BY count(*) DESC LIMIT 1
Final question: Find the id and last name of the teacher that has the most detentions with detention type code "AFTER"?
Final SQL: SELECT T1.teacher_id ,  T2.last_name FROM Detention AS T1 JOIN Teachers AS T2 ON T1.teacher_id  =  T2.teacher_id WHERE T1.detention_type_code  =  "AFTER" GROUP BY T1.teacher_id ORDER BY count(*) DESC LIMIT 1
Database: behavior_monitoring
Question sequence:
Show me the first name of all students.
What are their monthly rentals?
What about each student's average rentals across different address?
Give me the id and first name of the student with the highest of them.
SQL query sequence:
SELECT first_name FROM Students
SELECT t1.first_name, t2.monthly_rental FROM Students as t1 JOIN Student_Addresses as t2 on t1.student_id = t2.student_id
SELECT T2.first_name ,  AVG(T1.monthly_rental) FROM Student_Addresses AS T1 JOIN Students AS T2 ON T1.student_id  =  T2.student_id GROUP BY T2.first_name
SELECT T1.student_id ,  T2.first_name FROM Student_Addresses AS T1 JOIN Students AS T2 ON T1.student_id  =  T2.student_id GROUP BY T1.student_id ORDER BY AVG(monthly_rental) DESC LIMIT 1
Final question: What are the id and first name of the student whose addresses have the highest average monthly rental?
Final SQL: SELECT T1.student_id ,  T2.first_name FROM Student_Addresses AS T1 JOIN Students AS T2 ON T1.student_id  =  T2.student_id GROUP BY T1.student_id ORDER BY AVG(monthly_rental) DESC LIMIT 1
Database: behavior_monitoring
Question sequence:
Show me all the monthly rentals from student addresses.
Give me the average monthly rental in terms of each address.
Show me their cities.
Give me the id and city of the one with largest average monthly rental.
SQL query sequence:
SELECT monthly_rental FROM Student_Addresses
SELECT address_id, AVG(monthly_rental) FROM Student_Addresses GROUP BY address_id
SELECT   T1.city,T2.address_id , AVG(T2.monthly_rental) FROM Addresses AS T1 JOIN Student_Addresses AS T2 ON T1.address_id  =  T2.address_id GROUP BY T2.address_id
SELECT T2.address_id ,  T1.city FROM Addresses AS T1 JOIN Student_Addresses AS T2 ON T1.address_id  =  T2.address_id GROUP BY T2.address_id ORDER BY AVG(monthly_rental) DESC LIMIT 1
Final question: Find the id and city of the student address with the highest average monthly rental.
Final SQL: SELECT T2.address_id ,  T1.city FROM Addresses AS T1 JOIN Student_Addresses AS T2 ON T1.address_id  =  T2.address_id GROUP BY T2.address_id ORDER BY AVG(monthly_rental) DESC LIMIT 1
Database: behavior_monitoring
Question sequence:
What behavior incident types are there?
How many behavior incidents are there in terms of each type?
Show me the code and description of the most frequent one of them.
SQL query sequence:
SELECT incident_type_code FROM Behavior_Incident GROUP BY incident_type_code
SELECT incident_type_code,count(*) FROM Behavior_Incident GROUP BY incident_type_code
SELECT T1.incident_type_code ,  T2.incident_type_description FROM Behavior_Incident AS T1 JOIN Ref_Incident_Type AS T2 ON T1.incident_type_code  =  T2.incident_type_code GROUP BY T1.incident_type_code ORDER BY count(*) DESC LIMIT 1
Final question: What are the code and description of the most frequent behavior incident type?
Final SQL: SELECT T1.incident_type_code ,  T2.incident_type_description FROM Behavior_Incident AS T1 JOIN Ref_Incident_Type AS T2 ON T1.incident_type_code  =  T2.incident_type_code GROUP BY T1.incident_type_code ORDER BY count(*) DESC LIMIT 1
Database: behavior_monitoring
Question sequence:
What detention types are there?
How many detentions are there in terms of each type?
Show me the code and description of the least frequent one of them.
SQL query sequence:
SELECT detention_type_code FROM Detention GROUP BY detention_type_code
SELECT detention_type_code, count(*) FROM Detention GROUP BY detention_type_code
SELECT T1.detention_type_code ,  T2.detention_type_description FROM Detention AS T1 JOIN Ref_Detention_Type AS T2 ON T1.detention_type_code  =  T2.detention_type_code GROUP BY T1.detention_type_code ORDER BY count(*) ASC LIMIT 1
Final question: What are the code and description of the least frequent detention type ?
Final SQL: SELECT T1.detention_type_code ,  T2.detention_type_description FROM Detention AS T1 JOIN Ref_Detention_Type AS T2 ON T1.detention_type_code  =  T2.detention_type_code GROUP BY T1.detention_type_code ORDER BY count(*) ASC LIMIT 1
Database: behavior_monitoring
Question sequence:
How many assessment notes are there?
Show me the first name of students that had assessment notes in record.
When did Fanny have assessment nodes?
SQL query sequence:
SELECT count(*) FROM Assessment_Notes
SELECT T2.first_name FROM Assessment_Notes AS T1 JOIN Students AS T2 ON T1.student_id  =  T2.student_id
SELECT T1.date_of_notes FROM Assessment_Notes AS T1 JOIN Students AS T2 ON T1.student_id  =  T2.student_id WHERE T2.first_name  =  "Fanny"
Final question: Find the dates of assessment notes for students with first name "Fanny".
Final SQL: SELECT T1.date_of_notes FROM Assessment_Notes AS T1 JOIN Students AS T2 ON T1.student_id  =  T2.student_id WHERE T2.first_name  =  "Fanny"
Database: behavior_monitoring
Question sequence:
How many assessment notes are there?
Show me the last name of teachers that had assessment notes in record.
Give me the texts of assessment notes that Schuster had.
SQL query sequence:
SELECT count(*) FROM Assessment_Notes
SELECT T2.last_name FROM Assessment_Notes AS T1 JOIN Teachers AS T2 ON T1.teacher_id  =  T2.teacher_id
SELECT T1.text_of_notes FROM Assessment_Notes AS T1 JOIN Teachers AS T2 ON T1.teacher_id  =  T2.teacher_id WHERE T2.last_name  =  "Schuster"
Final question: Find the texts of assessment notes for teachers with last name "Schuster".
Final SQL: SELECT T1.text_of_notes FROM Assessment_Notes AS T1 JOIN Teachers AS T2 ON T1.teacher_id  =  T2.teacher_id WHERE T2.last_name  =  "Schuster"
Database: behavior_monitoring
Question sequence:
How many behavior incidents are there in record?
Show me the last name of students that were in any incidents.
Give me the start and end dates of Fahey's ones.
SQL query sequence:
SELECT count(*) FROM Behavior_Incident
SELECT T2.last_name FROM Behavior_Incident AS T1 JOIN Students AS T2 ON T1.student_id  =  T2.student_id
SELECT T1.date_incident_start ,  date_incident_end FROM Behavior_Incident AS T1 JOIN Students AS T2 ON T1.student_id  =  T2.student_id WHERE T2.last_name  =  "Fahey"
Final question: Find the start and end dates of behavior incidents of students with last name "Fahey".
Final SQL: SELECT T1.date_incident_start ,  date_incident_end FROM Behavior_Incident AS T1 JOIN Students AS T2 ON T1.student_id  =  T2.student_id WHERE T2.last_name  =  "Fahey"
Database: behavior_monitoring
Question sequence:
How many detentions are there in record?
Show me the last name of teachers that were in any detentions.
Give me the start and end dates of Schultz's ones.
SQL query sequence:
SELECT count(*) FROM Detention
SELECT T2.last_name FROM Detention AS T1 JOIN Teachers AS T2 ON T1.teacher_id  =  T2.teacher_id
SELECT T1.datetime_detention_start ,  datetime_detention_end FROM Detention AS T1 JOIN Teachers AS T2 ON T1.teacher_id  =  T2.teacher_id WHERE T2.last_name  =  "Schultz"
Final question: Find the start and end dates of detentions of teachers with last name "Schultz".
Final SQL: SELECT T1.datetime_detention_start ,  datetime_detention_end FROM Detention AS T1 JOIN Teachers AS T2 ON T1.teacher_id  =  T2.teacher_id WHERE T2.last_name  =  "Schultz"
Database: behavior_monitoring
Question sequence:
Show me the monthly rentals for all student addresses.
Give me the id of address with highest monthly rental.
What about its zip code?
SQL query sequence:
SELECT address_id, monthly_rental FROM Student_Addresses
SELECT address_id FROM Student_Addresses ORDER BY monthly_rental DESC LIMIT 1
SELECT T2.address_id ,  T1.zip_postcode FROM Addresses AS T1 JOIN Student_Addresses AS T2 ON T1.address_id  =  T2.address_id ORDER BY monthly_rental DESC LIMIT 1
Final question: What are the id and zip code of the address with the highest monthly rental?
Final SQL: SELECT T2.address_id ,  T1.zip_postcode FROM Addresses AS T1 JOIN Student_Addresses AS T2 ON T1.address_id  =  T2.address_id ORDER BY monthly_rental DESC LIMIT 1
Database: behavior_monitoring
Question sequence:
Show me the monthly rentals for all student addresses.
Give me the id of student with the lowest of them.
What about that student's cell phone number?
SQL query sequence:
SELECT address_id, monthly_rental FROM Student_Addresses
SELECT student_id FROM Student_Addresses ORDER BY monthly_rental ASC LIMIT 1
SELECT T2.cell_mobile_number FROM Student_Addresses AS T1 JOIN Students AS T2 ON T1.student_id  =  T2.student_id ORDER BY T1.monthly_rental ASC LIMIT 1
Final question: What is the cell phone number of the student whose address has the lowest monthly rental?
Final SQL: SELECT T2.cell_mobile_number FROM Student_Addresses AS T1 JOIN Students AS T2 ON T1.student_id  =  T2.student_id ORDER BY T1.monthly_rental ASC LIMIT 1
Database: behavior_monitoring
Question sequence:
Show me the monthly rentals for all student addresses.
What are their corresponding state, province, or county?
Show me the monthly rentals from Texas.
SQL query sequence:
SELECT address_id, monthly_rental FROM Student_Addresses
SELECT T2.address_id, T2.monthly_rental,T1.state_province_county FROM Addresses AS T1 JOIN Student_Addresses AS T2 ON T1.address_id  =  T2.address_id
SELECT T2.monthly_rental FROM Addresses AS T1 JOIN Student_Addresses AS T2 ON T1.address_id  =  T2.address_id WHERE T1.state_province_county  =  "Texas"
Final question: What are the monthly rentals of student addresses in Texas state?
Final SQL: SELECT T2.monthly_rental FROM Addresses AS T1 JOIN Student_Addresses AS T2 ON T1.address_id  =  T2.address_id WHERE T1.state_province_county  =  "Texas"
Database: behavior_monitoring
Question sequence:
How many students are there in the record?
What about those with address in Wisconsin?
Show me the first and last names of those students.
SQL query sequence:
SELECT count(*) FROM Students
SELECT count(*) FROM Addresses AS T1 JOIN Students AS T2 ON T1.address_id  =  T2.address_id WHERE T1.state_province_county  =  "Wisconsin"
SELECT T2.first_name ,  T2.last_name FROM Addresses AS T1 JOIN Students AS T2 ON T1.address_id  =  T2.address_id WHERE T1.state_province_county  =  "Wisconsin"
Final question: What are the first names and last names of students with address in Wisconsin state?
Final SQL: SELECT T2.first_name ,  T2.last_name FROM Addresses AS T1 JOIN Students AS T2 ON T1.address_id  =  T2.address_id WHERE T1.state_province_county  =  "Wisconsin"
Database: behavior_monitoring
Question sequence:
How many students are there in file?
What about student addresses?
Show me the line 1 and average montly rentals of those addresses.
SQL query sequence:
SELECT count(*) FROM Students
SELECT count(*) FROM Student_Addresses
SELECT T1.line_1 ,  avg(T2.monthly_rental) FROM Addresses AS T1 JOIN Student_Addresses AS T2 ON T1.address_id  =  T2.address_id GROUP BY T2.address_id
Final question: What are the line 1 and average monthly rentals of all student addresses?
Final SQL: SELECT T1.line_1 ,  avg(T2.monthly_rental) FROM Addresses AS T1 JOIN Student_Addresses AS T2 ON T1.address_id  =  T2.address_id GROUP BY T2.address_id
Database: behavior_monitoring
Question sequence:
Show me the first name of all teachers.
Which city does Lyla live?
What about the zip code?
SQL query sequence:
SELECT first_name FROM Teachers
SELECT T1.city FROM Addresses AS T1 JOIN Teachers AS T2 ON T1.address_id  =  T2.address_id WHERE T2.first_name  =  "Lyla"
SELECT T1.zip_postcode FROM Addresses AS T1 JOIN Teachers AS T2 ON T1.address_id  =  T2.address_id WHERE T2.first_name  =  "Lyla"
Final question: What is the zip code of the address where the teacher with first name "Lyla" lives?
Final SQL: SELECT T1.zip_postcode FROM Addresses AS T1 JOIN Teachers AS T2 ON T1.address_id  =  T2.address_id WHERE T2.first_name  =  "Lyla"
Database: behavior_monitoring
Question sequence:
Show me the first name of all teachers.
Who live in addresses with zip code 918?
What about their email addresses?
SQL query sequence:
SELECT first_name FROM Teachers
SELECT T2.first_name FROM Addresses AS T1 JOIN Teachers AS T2 ON T1.address_id  =  T2.address_id WHERE T1.zip_postcode  =  "918"
SELECT T2.email_address FROM Addresses AS T1 JOIN Teachers AS T2 ON T1.address_id  =  T2.address_id WHERE T1.zip_postcode  =  "918"
Final question: What are the email addresses of teachers whose address has zip code "918"?
Final SQL: SELECT T2.email_address FROM Addresses AS T1 JOIN Teachers AS T2 ON T1.address_id  =  T2.address_id WHERE T1.zip_postcode  =  "918"
Database: behavior_monitoring
Question sequence:
How many students are there in file?
Give me the id of the students involved in any behavior incident.
How many students are not among those?
SQL query sequence:
SELECT count(*) FROM STUDENTS
SELECT distinct student_id FROM Behavior_Incident
SELECT count(*) FROM STUDENTS WHERE student_id NOT IN ( SELECT student_id FROM Behavior_Incident )
Final question: How many students are not involved in any behavior incident?
Final SQL: SELECT count(*) FROM STUDENTS WHERE student_id NOT IN ( SELECT student_id FROM Behavior_Incident )
Database: behavior_monitoring
Question sequence:
Show me the last name of all teachers in file.
How many teachers are involved in any detention?
Give me the last name of teachers who are not one of those.
SQL query sequence:
SELECT last_name FROM Teachers
SELECT count(*) FROM Teachers AS T1 JOIN Detention AS T2 ON T1.teacher_id  =  T2.teacher_id
SELECT last_name FROM Teachers EXCEPT SELECT T1.last_name FROM Teachers AS T1 JOIN Detention AS T2 ON T1.teacher_id  =  T2.teacher_id
Final question: Find the last names of teachers who are not involved in any detention.
Final SQL: SELECT last_name FROM Teachers EXCEPT SELECT T1.last_name FROM Teachers AS T1 JOIN Detention AS T2 ON T1.teacher_id  =  T2.teacher_id
Database: e_government
Question sequence:
Show information for all individuals.
What are their first names, middle names and last names?
Order the results by the last name.
SQL query sequence:
SELECT * FROM individuals
SELECT individual_first_name ,  individual_middle_name ,  individual_last_name FROM individuals ORDER BY individual_last_name
SELECT individual_first_name ,  individual_middle_name ,  individual_last_name FROM individuals ORDER BY individual_last_name
Final question: List every individual's first name, middle name and last name in alphabetical order by last name.
Final SQL: SELECT individual_first_name ,  individual_middle_name ,  individual_last_name FROM individuals ORDER BY individual_last_name
Database: e_government
Question sequence:
Show all the forms.
What are the distinct type codes of forms?
SQL query sequence:
SELECT * FROM forms
SELECT DISTINCT form_type_code FROM forms
Final question: List all the types of forms.
Final SQL: SELECT DISTINCT form_type_code FROM forms
Database: e_government
Question sequence:
Show all the party forms.
Show the form name of each party form.
Which one is the most popular party form?
SQL query sequence:
SELECT * FROM party_forms
SELECT t1.form_name FROM forms AS t1 JOIN party_forms AS t2 ON t1.form_id  =  t2.form_id
SELECT t1.form_name FROM forms AS t1 JOIN party_forms AS t2 ON t1.form_id  =  t2.form_id GROUP BY t2.form_id ORDER BY count(*) DESC LIMIT 1
Final question: Find the name of the most popular party form.
Final SQL: SELECT t1.form_name FROM forms AS t1 JOIN party_forms AS t2 ON t1.form_id  =  t2.form_id GROUP BY t2.form_id ORDER BY count(*) DESC LIMIT 1
Database: e_government
Question sequence:
Return all the information for each party.
Show me the information for the one with email "enrico09@example.com".
What are their payment method and phone number?
SQL query sequence:
SELECT * FROM parties
SELECT * FROM parties WHERE party_email  =  "enrico09@example.com"
SELECT payment_method_code ,  party_phone FROM parties WHERE party_email  =  "enrico09@example.com"
Final question: Find the payment method and phone of the party with email "enrico09@example.com".
Final SQL: SELECT payment_method_code ,  party_phone FROM parties WHERE party_email  =  "enrico09@example.com"
Database: e_government
Question sequence:
What is the most popular party form?
Find the emails of parties using this form.
SQL query sequence:
SELECT * FROM party_forms GROUP BY form_id ORDER BY count(*) DESC LIMIT 1
SELECT t1.party_email FROM parties AS t1 JOIN party_forms AS t2 ON t1.party_id  =  t2.party_id WHERE t2.form_id  =  (SELECT form_id FROM party_forms GROUP BY form_id ORDER BY count(*) DESC LIMIT 1)
Final question: Find the emails of parties with the most popular party form.
Final SQL: SELECT t1.party_email FROM parties AS t1 JOIN party_forms AS t2 ON t1.party_id  =  t2.party_id WHERE t2.form_id  =  (SELECT form_id FROM party_forms GROUP BY form_id ORDER BY count(*) DESC LIMIT 1)
Database: e_government
Question sequence:
Show all the organizations.
Sort them in order of the date formed.
Just show the organization names.
SQL query sequence:
SELECT * FROM organizations
SELECT * FROM organizations ORDER BY date_formed ASC
SELECT organization_name FROM organizations ORDER BY date_formed ASC
Final question: List all the name of organizations in order of the date formed.
Final SQL: SELECT organization_name FROM organizations ORDER BY date_formed ASC
Database: e_government
Question sequence:
When was each organization formed?
Find the name of the organization formed most recently.
SQL query sequence:
SELECT date_formed FROM organizations
SELECT organization_name FROM organizations ORDER BY date_formed DESC LIMIT 1
Final question: Find the name of the youngest organization.
Final SQL: SELECT organization_name FROM organizations ORDER BY date_formed DESC LIMIT 1