aherntech/sparc huggingface dataset:
Database: driving_school
Question sequence:
List the lessons taken by each customer first and last name.
Just show that information for the completed status lessons.
How many lessons taken by customer with first name as Rylan and last name as Goodwin were completed?
SQL query sequence:
SELECT T2.first_name, T2.last_name, count(*) FROM Lessons AS T1 JOIN Customers AS T2 ON T1.customer_id  = T2.customer_id GROUP by T2.customer_id
SELECT T2.first_name, T2.last_name, count(*) FROM Lessons AS T1 JOIN Customers AS T2 ON T1.customer_id  = T2.customer_id GROUP by T2.customer_id where t1.lesson_status_code = 'Completed'
SELECT count(*) FROM Lessons AS T1 JOIN Customers AS T2 ON T1.customer_id  = T2.customer_id WHERE T2.first_name = "Rylan" AND T2.last_name = "Goodwin" AND T1.lesson_status_code = "Completed";
Final question: How many lessons taken by customer with first name as Rylan and last name as Goodwin were completed?
Final SQL: SELECT count(*) FROM Lessons AS T1 JOIN Customers AS T2 ON T1.customer_id  = T2.customer_id WHERE T2.first_name = "Rylan" AND T2.last_name = "Goodwin" AND T1.lesson_status_code = "Completed";
Database: driving_school
Question sequence:
List names of customers with their amount outstanding.
What is maximum, minimum and average amount of outstanding of customer?
SQL query sequence:
SELECT first_name, last_name, amount_outstanding from customers
SELECT max(amount_outstanding) ,  min(amount_outstanding) ,  avg(amount_outstanding) FROM Customers;
Final question: What is maximum, minimum and average amount of outstanding of customer?
Final SQL: SELECT max(amount_outstanding) ,  min(amount_outstanding) ,  avg(amount_outstanding) FROM Customers;
Database: driving_school
Question sequence:
List records of customers living in city Lockmanfurt.
Just show the first and last name.
SQL query sequence:
SELECT  FROM Customers AS T1 JOIN Addresses AS T2 ON T1.customer_address_id = T2.address_id WHERE T2.city = "Lockmanfurt";
SELECT T1.first_name ,  T1.last_name FROM Customers AS T1 JOIN Addresses AS T2 ON T1.customer_address_id = T2.address_id WHERE T2.city = "Lockmanfurt";
Final question: List first name and last name of customers living in city Lockmanfurt.
Final SQL: SELECT T1.first_name ,  T1.last_name FROM Customers AS T1 JOIN Addresses AS T2 ON T1.customer_address_id = T2.address_id WHERE T2.city = "Lockmanfurt";
Database: driving_school
Question sequence:
Join customer names with their lived-in countries.
Which country does customer with first name as Carole and last name as Bernhard live in?
SQL query sequence:
SELECT T1.first_name, T1.last_name, T2.country FROM Customers AS T1 JOIN Addresses AS T2 ON T1.customer_address_id = T2.address_id
SELECT T2.country FROM Customers AS T1 JOIN Addresses AS T2 ON T1.customer_address_id = T2.address_id WHERE T1.first_name = "Carole" AND T1.last_name = "Bernhard"
Final question: Which country does customer with first name as Carole and last name as Bernhard live in?
Final SQL: SELECT T2.country FROM Customers AS T1 JOIN Addresses AS T2 ON T1.customer_address_id = T2.address_id WHERE T1.first_name = "Carole" AND T1.last_name = "Bernhard"
Database: driving_school
Question sequence:
What are the customers zip codes?
What is zip code of customer with first name as Carole and last name as Bernhard?
SQL query sequence:
SELECT T1.first_name, T1.last_name, T2.zip_postcode FROM Customers AS T1 JOIN Addresses AS T2 ON T1.customer_address_id = T2.address_id
SELECT T2.zip_postcode FROM Customers AS T1 JOIN Addresses AS T2 ON T1.customer_address_id = T2.address_id WHERE T1.first_name = "Carole" AND T1.last_name = "Bernhard"
Final question: What is zip code of customer with first name as Carole and last name as Bernhard?
Final SQL: SELECT T2.zip_postcode FROM Customers AS T1 JOIN Addresses AS T2 ON T1.customer_address_id = T2.address_id WHERE T1.first_name = "Carole" AND T1.last_name = "Bernhard"
Database: driving_school
Question sequence:
Give counts of cities customers live in.
Which city has most number of customers?
SQL query sequence:
SELECT T2.city, count(*) FROM Customers AS T1 JOIN Addresses AS T2 ON T1.customer_address_id = T2.address_id GROUP BY T2.city
SELECT T2.city FROM Customers AS T1 JOIN Addresses AS T2 ON T1.customer_address_id = T2.address_id GROUP BY T2.city ORDER BY count(*) DESC LIMIT 1;
Final question: Which city has most number of customers?
Final SQL: SELECT T2.city FROM Customers AS T1 JOIN Addresses AS T2 ON T1.customer_address_id = T2.address_id GROUP BY T2.city ORDER BY count(*) DESC LIMIT 1;
Database: driving_school
Question sequence:
List a sum of all the payments for all the customers.
How much in total has customer with first name as Carole and last name as Bernhard paid?
SQL query sequence:
SELECT T2.first_name, T2.last_name, sum(T1.amount_payment) FROM Customer_Payments AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id GROUP by T2.customer_id
SELECT sum(T1.amount_payment) FROM Customer_Payments AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T2.first_name = "Carole" AND T2.last_name = "Bernhard"
Final question: How much in total has customer with first name as Carole and last name as Bernhard paid?
Final SQL: SELECT sum(T1.amount_payment) FROM Customer_Payments AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T2.first_name = "Carole" AND T2.last_name = "Bernhard"
Database: driving_school
Question sequence:
Which customer ids have no payment history?
Count those.
SQL query sequence:
SELECT customer_id from customers EXCEPT SELECT customer_id from Customer_Payments
SELECT count(*) FROM Customers WHERE customer_id NOT IN ( SELECT customer_id FROM Customer_Payments );
Final question: List the number of customers that did not have any payment history.
Final SQL: SELECT count(*) FROM Customers WHERE customer_id NOT IN ( SELECT customer_id FROM Customer_Payments );
Database: driving_school
Question sequence:
Count the payments per customer.
Just for those with more than 2 payments.
SQL query sequence:
SELECT T2.first_name, T2.last_name, count(T1.amount_payment) FROM Customer_Payments AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id GROUP by T2.customer_id
SELECT T2.first_name ,  T2.last_name FROM Customer_Payments AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id HAVING count(*)  >  2;
Final question: List first name and last name of customers that have more than 2 payments.
Final SQL: SELECT T2.first_name ,  T2.last_name FROM Customer_Payments AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id HAVING count(*)  >  2;
Database: driving_school
Question sequence:
List lesson id of all lessons taught by staff with first name as Janessa
Intersect that with last name Sawayn and nickname containing letter 's'.
SQL query sequence:
SELECT T1.lesson_id FROM Lessons AS T1 JOIN Staff AS T2 ON T1.staff_id = T2.staff_id WHERE T2.first_name = "Janessa"
SELECT T1.lesson_id FROM Lessons AS T1 JOIN Staff AS T2 ON T1.staff_id = T2.staff_id WHERE T2.first_name = "Janessa" AND T2.last_name = "Sawayn" AND nickname LIKE "%s%";
Final question: List lesson id of all lessons taught by staff with first name as Janessa, last name as Sawayn and nickname containing letter 's'.
Final SQL: SELECT T1.lesson_id FROM Lessons AS T1 JOIN Staff AS T2 ON T1.staff_id = T2.staff_id WHERE T2.first_name = "Janessa" AND T2.last_name = "Sawayn" AND nickname LIKE "%s%";
Database: driving_school
Question sequence:
Count the lessons grouped by staff first name.
How many lessons taught by staff whose first name has letter 'a' in it?
SQL query sequence:
SELECT T2.first_name, count(*) FROM Lessons AS T1 JOIN Staff AS T2 ON T1.staff_id = T2.staff_id GROUP by T2.first_name
SELECT count(*) FROM Lessons AS T1 JOIN Staff AS T2 ON T1.staff_id = T2.staff_id WHERE T2.first_name LIKE "%a%"
Final question: How many lessons taught by staff whose first name has letter 'a' in it?
Final SQL: SELECT count(*) FROM Lessons AS T1 JOIN Staff AS T2 ON T1.staff_id = T2.staff_id WHERE T2.first_name LIKE "%a%"
Database: driving_school
Question sequence:
Count the lesson time grouped by staff id.
Join that sum on the staff with first name Janess and last name Sawayn.
SQL query sequence:
SELECT T2.staff_id, sum(lesson_time) FROM Lessons AS T1 JOIN Staff AS T2 ON T1.staff_id = T2.staff_id GROUP by T2.staff_id
SELECT sum(lesson_time) FROM Lessons AS T1 JOIN Staff AS T2 ON T1.staff_id = T2.staff_id WHERE T2.first_name = "Janessa" AND T2.last_name = "Sawayn";
Final question: How long is the total lesson time taught by staff with first name as Janessa and last name as Sawayn?
Final SQL: SELECT sum(lesson_time) FROM Lessons AS T1 JOIN Staff AS T2 ON T1.staff_id = T2.staff_id WHERE T2.first_name = "Janessa" AND T2.last_name = "Sawayn";
Database: driving_school
Question sequence:
Show the sum of lesson prices per staff.
Give the average.
Just for first name as Janessa and last name as Sawayn?
SQL query sequence:
SELECT T2.first_name, T2.last_name, sum(T1.price) FROM Lessons AS T1 JOIN Staff AS T2 ON T1.staff_id = T2.staff_id GROUP by T2.staff_id
SELECT T2.first_name, T2.last_name, avg(T1.price) FROM Lessons AS T1 JOIN Staff AS T2 ON T1.staff_id = T2.staff_id GROUP by T2.staff_id
SELECT avg(price) FROM Lessons AS T1 JOIN Staff AS T2 ON T1.staff_id = T2.staff_id WHERE T2.first_name = "Janessa" AND T2.last_name = "Sawayn";
Final question: What is average lesson price taught by staff with first name as Janessa and last name as Sawayn?
Final SQL: SELECT avg(price) FROM Lessons AS T1 JOIN Staff AS T2 ON T1.staff_id = T2.staff_id WHERE T2.first_name = "Janessa" AND T2.last_name = "Sawayn";
Database: driving_school
Question sequence:
count the lessons taken per customer first name.
How many lessons did customer with first name Ray take?
SQL query sequence:
SELECT T2.first_name, count(*) FROM Lessons AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id GROUP by T2.first_name
SELECT count(*) FROM Lessons AS T1 JOIN Customers AS T2 ON T1.customer_id  = T2.customer_id WHERE T2.first_name = "Ray"
Final question: How many lessons did customer with first name Ray take?
Final SQL: SELECT count(*) FROM Lessons AS T1 JOIN Customers AS T2 ON T1.customer_id  = T2.customer_id WHERE T2.first_name = "Ray"
Database: driving_school
Question sequence:
What are the distinct last names of staff?
Of customers?
Intersect that.
SQL query sequence:
SELECT DISTINCT last_name FROM Staff
SELECT DISTINCT last_name FROM Customers
SELECT last_name FROM Customers INTERSECT SELECT last_name FROM Staff
Final question: Which last names are both used by customers and by staff?
Final SQL: SELECT last_name FROM Customers INTERSECT SELECT last_name FROM Staff
Database: driving_school
Question sequence:
Which staff gave lessons? Give their first names.
Which staff first names did not?
SQL query sequence:
SELECT DISTINCT T2.first_name FROM Lessons AS T1 JOIN Staff AS T2 ON T1.staff_id  =  T2.staff_id
SELECT first_name FROM Staff EXCEPT SELECT T2.first_name FROM Lessons AS T1 JOIN Staff AS T2 ON T1.staff_id  =  T2.staff_id
Final question: What are the first names of staff who did not give any lesson?
Final SQL: SELECT first_name FROM Staff EXCEPT SELECT T2.first_name FROM Lessons AS T1 JOIN Staff AS T2 ON T1.staff_id  =  T2.staff_id
Database: driving_school
Question sequence:
List the distinct vehicle ids used in lessons.
For those, give the detail as well.
What is the id and detail of the vehicle used in lessons for most of the times?
SQL query sequence:
SELECT DISTINCT vehicle_id from Lessons
SELECT T1.vehicle_id ,  T1.vehicle_details FROM Vehicles AS T1 JOIN Lessons AS T2 ON T1.vehicle_id  =  T2.vehicle_id GROUP BY T1.vehicle_id
SELECT T1.vehicle_id ,  T1.vehicle_details FROM Vehicles AS T1 JOIN Lessons AS T2 ON T1.vehicle_id  =  T2.vehicle_id GROUP BY T1.vehicle_id ORDER BY count(*) DESC LIMIT 1
Final question: What is the id and detail of the vehicle used in lessons for most of the times?
Final SQL: SELECT T1.vehicle_id ,  T1.vehicle_details FROM Vehicles AS T1 JOIN Lessons AS T2 ON T1.vehicle_id  =  T2.vehicle_id GROUP BY T1.vehicle_id ORDER BY count(*) DESC LIMIT 1
Database: driving_school
Question sequence:
List records of customers living in city Lockmanfurt.
Just show the first and last name.
SQL query sequence:
SELECT * FROM Customers AS T1 JOIN Addresses AS T2 ON T1.customer_address_id = T2.address_id WHERE T2.city = "Lockmanfurt";
SELECT T1.first_name ,  T1.last_name FROM Customers AS T1 JOIN Addresses AS T2 ON T1.customer_address_id = T2.address_id WHERE T2.city = "Lockmanfurt";
Final question: List first name and last name of customers living in city Lockmanfurt.
Final SQL: SELECT T1.first_name ,  T1.last_name FROM Customers AS T1 JOIN Addresses AS T2 ON T1.customer_address_id = T2.address_id WHERE T2.city = "Lockmanfurt";
Database: decoration_competition
Question sequence:
What are the names of all the members?
What countries are they each from?
Now show those from the United States.
Can you also include those from Canada?
SQL query sequence:
SELECT Name FROM member
SELECT Name, Country FROM member
SELECT Name, Country FROM member WHERE Country = "United States"
SELECT Name FROM member WHERE Country  =  "United States" OR Country  =  "Canada"
Final question: Show the names of members whose country is "United States" or "Canada".
Final SQL: SELECT Name FROM member WHERE Country  =  "United States" OR Country  =  "Canada"
Database: decoration_competition
Question sequence:
What are all the distinct countries the members belong to?
How many members belong to each one?
Which one has the least number of members?
How about the most?
SQL query sequence:
SELECT distinct Country FROM member
SELECT Country, count(*) FROM member GROUP BY  Country
SELECT Country FROM member GROUP BY Country ORDER BY COUNT(*) ASC LIMIT 1
SELECT Country FROM member GROUP BY Country ORDER BY COUNT(*) DESC LIMIT 1
Final question: Show the most common country across members.
Final SQL: SELECT Country FROM member GROUP BY Country ORDER BY COUNT(*) DESC LIMIT 1
Database: decoration_competition
Question sequence:
Can you show me all the member names and their countries?
List all the different countries.
Which of these have more than one member?
How about more than two?
SQL query sequence:
SELECT Name, Country FROM member
SELECT distinct Country FROM member
SELECT Country FROM member GROUP BY Country HAVING COUNT(*)  >  1
SELECT Country FROM member GROUP BY Country HAVING COUNT(*)  >  2
Final question: Which countries have more than two members?
Final SQL: SELECT Country FROM member GROUP BY Country HAVING COUNT(*)  >  2
Database: decoration_competition
Question sequence:
What are the names of all the members in alphabetical order?
Also provide their college names.
and their college locations!
actually, show just the names and locations.
SQL query sequence:
SELECT Name FROM member ORDER BY Name ASC
SELECT T2.Name ,  T1.Name FROM college AS T1 JOIN member AS T2 ON T1.College_ID  =  T2.College_ID ORDER BY T2.Name ASC
SELECT T2.Name ,  T1.Name, T1.College_Location FROM college AS T1 JOIN member AS T2 ON T1.College_ID  =  T2.College_ID ORDER BY T2.Name ASC
SELECT T2.Name ,  T1.College_Location FROM college AS T1 JOIN member AS T2 ON T1.College_ID  =  T2.College_ID ORDER BY T2.Name ASC
Final question: Show the names of members and the locations of colleges they go to in ascending alphabetical order of member names.
Final SQL: SELECT T2.Name ,  T1.College_Location FROM college AS T1 JOIN member AS T2 ON T1.College_ID  =  T2.College_ID ORDER BY T2.Name ASC
Database: decoration_competition
Question sequence:
Who are all the members from the country Canada?
What are the names of the colleges they go to?
Who are the team leaders of these colleges?
Show me a list of all the different leaders!
SQL query sequence:
SELECT Member_ID FROM member WHERE Country = "Canada"
SELECT T2.Member_ID,  T1.Name FROM college AS T1 JOIN member AS T2 ON T1.College_ID  =  T2.College_ID WHERE T2.Country  =  "Canada"
SELECT T2.Member_ID, T1.Name, T1.leader_name FROM college AS T1 JOIN member AS T2 ON T1.College_ID  =  T2.College_ID WHERE T2.Country  =  "Canada"
SELECT DISTINCT T1.Leader_Name FROM college AS T1 JOIN member AS T2 ON T1.College_ID  =  T2.College_ID WHERE T2.Country  =  "Canada"
Final question: Show the distinct leader names of colleges associated with members from country "Canada".
Final SQL: SELECT DISTINCT T1.Leader_Name FROM college AS T1 JOIN member AS T2 ON T1.College_ID  =  T2.College_ID WHERE T2.Country  =  "Canada"
Database: decoration_competition
Question sequence:
How many different rounds are there?
What are they?
For each, who are the names of the members with ranks in rounds lower than 3?
How about greater than 3?
SQL query sequence:
SELECT count(DISTINCT round_id) FROM round
SELECT DISTINCT round_id FROM round
SELECT T1.Name FROM member AS T1 JOIN round AS T2 ON T1.Member_ID  =  T2.Member_ID WHERE T2.Rank_in_Round  <  3
SELECT T1.Name FROM member AS T1 JOIN round AS T2 ON T1.Member_ID  =  T2.Member_ID WHERE T2.Rank_in_Round  >  3
Final question: Show the names of members that have a rank in round higher than 3.
Final SQL: SELECT T1.Name FROM member AS T1 JOIN round AS T2 ON T1.Member_ID  =  T2.Member_ID WHERE T2.Rank_in_Round  >  3
Database: decoration_competition
Question sequence:
What are the names of the member that did not made it to any round?
Now show me the other members!
Show just the names ordered from greatest to least on their ranks.
Actually, sort least to greatest!
SQL query sequence:
SELECT Name FROM member where Name NOT IN (SELECT T1.Name FROM member AS T1 JOIN round AS T2 ON T1.Member_ID  =  T2.Member_ID ORDER BY Rank_in_Round)
SELECT T1.Name FROM member AS T1 JOIN round AS T2 ON T1.Member_ID  =  T2.Member_ID
SELECT T1.Name FROM member AS T1 JOIN round AS T2 ON T1.Member_ID  =  T2.Member_ID ORDER BY Rank_in_Round DESC
SELECT T1.Name FROM member AS T1 JOIN round AS T2 ON T1.Member_ID  =  T2.Member_ID ORDER BY Rank_in_Round ASC
Final question: Show the names of members in ascending order of their rank in rounds.
Final SQL: SELECT T1.Name FROM member AS T1 JOIN round AS T2 ON T1.Member_ID  =  T2.Member_ID ORDER BY Rank_in_Round ASC
Database: music_4
Question sequence:
List the information for all volumes.
Order them by weeks on top from the most to the least.
What is the maximum weeks on top for a volume?
Include the minimum as well.
SQL query sequence:
SELECT * FROM volume
SELECT * FROM volume ORDER BY weeks_on_top DESC
SELECT max(Weeks_on_Top) FROM volume
SELECT max(Weeks_on_Top) ,  min(Weeks_on_Top) FROM volume
Final question: What are the maximum and minimum week on top of all volumes?
Final SQL: SELECT max(Weeks_on_Top) ,  min(Weeks_on_Top) FROM volume
Database: music_4
Question sequence:
Order volumes by weeks on top in increasing order.
Which volumes lasted no more than 2 weeks on top?
Which ones lasted more than 2 weeks on top?
What are the ceremony dates for these volumes?
SQL query sequence:
SELECT * FROM volume ORDER BY weeks_on_top
SELECT volume_ID FROM volume WHERE weeks_on_top <= 2
SELECT volume_ID FROM volume WHERE weeks_on_top > 2
SELECT DISTINCT T1.Date_of_ceremony FROM music_festival AS T1 JOIN volume AS T2 ON T1.Volume  =  T2.Volume_ID WHERE T2.Weeks_on_Top  >  2
Final question: Please show the date of ceremony of the volumes that last more than 2 weeks on top.
Final SQL: SELECT T1.Date_of_ceremony FROM music_festival AS T1 JOIN volume AS T2 ON T1.Volume  =  T2.Volume_ID WHERE T2.Weeks_on_Top  >  2
Database: music_4
Question sequence:
List the names of all songs.
Which songs were featured at music festivals?
Which ones have the result “nominated”?
SQL query sequence:
SELECT song FROM volume
SELECT T2.Song FROM music_festival AS T1 JOIN volume AS T2 ON T1.Volume  =  T2.Volume_ID
SELECT T2.Song FROM music_festival AS T1 JOIN volume AS T2 ON T1.Volume  =  T2.Volume_ID WHERE T1.Result  =  "Nominated"
Final question: Please show the songs that have result "nominated" at music festivals.
Final SQL: SELECT T2.Song FROM music_festival AS T1 JOIN volume AS T2 ON T1.Volume  =  T2.Volume_ID WHERE T1.Result  =  "Nominated"
Database: music_4
Question sequence:
List the names of artists who have released volumes.
List the information of volumes released by Gorgoroth.
What are their issue dates?
SQL query sequence:
SELECT DISTINCT T1.artist FROM artist AS T1 JOIN volume AS T2 ON T1.Artist_ID  =  T2.Artist_ID
SELECT * FROM artist AS T1 JOIN volume AS T2 ON T1.Artist_ID  =  T2.Artist_ID WHERE T1.Artist  =  "Gorgoroth"
SELECT T2.Issue_Date FROM artist AS T1 JOIN volume AS T2 ON T1.Artist_ID  =  T2.Artist_ID WHERE T1.Artist  =  "Gorgoroth"
Final question: What are the issue dates of volumes associated with the artist "Gorgoroth"?
Final SQL: SELECT T2.Issue_Date FROM artist AS T1 JOIN volume AS T2 ON T1.Artist_ID  =  T2.Artist_ID WHERE T1.Artist  =  "Gorgoroth"
Database: music_4
Question sequence:
List all artists.
Only list those aged 32 or older.
Show the information for volumes associated with these artists.
Only show song names.
SQL query sequence:
SELECT DISTINCT artist FROM Artist
SELECT DISTINCT artist FROM Artist WHERE age >= 32
SELECT * FROM artist AS T1 JOIN volume AS T2 ON T1.Artist_ID  =  T2.Artist_ID WHERE T1.age  >=  32
SELECT T2.Song FROM artist AS T1 JOIN volume AS T2 ON T1.Artist_ID  =  T2.Artist_ID WHERE T1.age  >=  32
Final question: What are the songs in volumes associated with the artist aged 32 or older?
Final SQL: SELECT T2.Song FROM artist AS T1 JOIN volume AS T2 ON T1.Artist_ID  =  T2.Artist_ID WHERE T1.age  >=  32
Database: music_4
Question sequence:
List all volumes.
Only show information for volumes associated with artists aged 25 or younger.
What is the average weeks on top for these volumes?
SQL query sequence:
SELECT * FROM volume
SELECT * FROM artist AS T1 JOIN volume AS T2 ON T1.Artist_ID  =  T2.Artist_ID WHERE T1.age  <=  25
SELECT avg(T2.Weeks_on_Top) FROM artist AS T1 JOIN volume AS T2 ON T1.Artist_ID  =  T2.Artist_ID WHERE T1.age  <=  25
Final question: What is the average weeks on top of volumes associated with the artist aged 25 or younger?
Final SQL: SELECT avg(T2.Weeks_on_Top) FROM artist AS T1 JOIN volume AS T2 ON T1.Artist_ID  =  T2.Artist_ID WHERE T1.age  <=  25
Database: music_4
Question sequence:
What are the names of all artists?
Which of them have released volumes?
Only show those whose volumes spent more than 2 weeks on top.
List the famous titles of these artists.
SQL query sequence:
SELECT DISTINCT artist FROM Artist
SELECT DISTINCT T1.artist FROM artist AS T1 JOIN volume AS T2 ON T1.Artist_ID  =  T2.Artist_ID
SELECT DISTINCT T1.artist FROM artist AS T1 JOIN volume AS T2 ON T1.Artist_ID  =  T2.Artist_ID WHERE T2.Weeks_on_Top  >  2
SELECT T1.Famous_Title FROM artist AS T1 JOIN volume AS T2 ON T1.Artist_ID  =  T2.Artist_ID WHERE T2.Weeks_on_Top  >  2
Final question: What are the famous title of the artists associated with volumes with more than 2 weeks on top?
Final SQL: SELECT T1.Famous_Title FROM artist AS T1 JOIN volume AS T2 ON T1.Artist_ID  =  T2.Artist_ID WHERE T2.Weeks_on_Top  >  2
Database: music_4
Question sequence:
Show the names of all artists.
Order them by decreasing age.
Who is the oldest artist?
What is his famous release date?
SQL query sequence:
SELECT DISTINCT artist FROM Artist
SELECT DISTINCT artist FROM Artist ORDER BY Age DESC
SELECT DISTINCT artist FROM Artist ORDER BY Age DESC LIMIT 1
SELECT Famous_Release_date FROM artist ORDER BY Age DESC LIMIT 1
Final question: What is the famous release date of the artist with the oldest age?
Final SQL: SELECT Famous_Release_date FROM artist ORDER BY Age DESC LIMIT 1
Database: music_4
Question sequence:
List the names of all music festivals.
Include the ID of the volume featured at each music festival.
Also include the result of each volume.
What was the most common result?
SQL query sequence:
SELECT music_festival FROM music_festival
SELECT music_festival, volume FROM music_festival
SELECT music_festival, volume, result FROM music_festival
SELECT RESULT FROM music_festival GROUP BY RESULT ORDER BY COUNT(*) DESC LIMIT 1
Final question: What is the most common result of the music festival?
Final SQL: SELECT RESULT FROM music_festival GROUP BY RESULT ORDER BY COUNT(*) DESC LIMIT 1