aherntech/sparc huggingface dataset:
Database: local_govt_and_lot
Question sequence:
What is the earliest status record date?
Which things have a status record before the date '2017-06-19 02:59:21'?
Also show the things that have the status 'Close'.
Show the distinct ids and also the type of thing.
SQL query sequence:
SELECT min(Date_and_Date) FROM Timed_Status_of_Things
SELECT * FROM Timed_Status_of_Things WHERE Date_and_Date < '2017-06-19 02:59:21'
SELECT * FROM Timed_Status_of_Things WHERE Status_of_Thing_Code = 'Close' OR Date_and_Date < '2017-06-19 02:59:21'
SELECT DISTINCT t2.thing_id ,  t2.Type_of_Thing_Code FROM Timed_Status_of_Things AS t1 JOIN Things AS t2 ON t1.thing_id  =  t2.thing_id WHERE t1.Status_of_Thing_Code  =  'Close' OR t1.Date_and_Date  <  '2017-06-19 02:59:21'
Final question: What are the distinct id and type of the thing that has the status 'Close' or has a status record before the date '2017-06-19 02:59:21'
Final SQL: SELECT DISTINCT T2.thing_id ,  T2.Type_of_Thing_Code FROM Timed_Status_of_Things AS T1 JOIN Things AS T2 ON T1.thing_id  =  T2.thing_id WHERE T1.Status_of_Thing_Code  =  'Close' OR T1.Date_and_Date  <  '2017-06-19 02:59:21'
Database: local_govt_and_lot
Question sequence:
What are all the different types of service details for things?
How many of each?
Show only the things with the detail being 'Unsatisfied'.
At how many distinct locations have they been located?
SQL query sequence:
SELECT DISTINCT service_details FROM things
SELECT count(*), service_details FROM things GROUP BY service_details
SELECT * FROM things WHERE service_details = 'Unsatisfied'
SELECT count(DISTINCT T2.Location_Code) FROM Things AS T1 JOIN Timed_Locations_of_Things AS T2 ON T1.thing_id  =  T2.thing_id WHERE T1.service_details  =  'Unsatisfied'
Final question: How many distinct locations have the things with service detail 'Unsatisfied' been located in?
Final SQL: SELECT count(DISTINCT T2.Location_Code) FROM Things AS T1 JOIN Timed_Locations_of_Things AS T2 ON T1.thing_id  =  T2.thing_id WHERE T1.service_details  =  'Unsatisfied'
Database: local_govt_and_lot
Question sequence:
What are all the different parent organization ids?
How many organizations are their own parent?
Which organizations are not a parent to any others?
SQL query sequence:
SELECT DISTINCT parent_organization_id FROM organizations
SELECT count(*) FROM organizations WHERE parent_organization_id = organization_id
SELECT organization_id FROM organizations EXCEPT SELECT parent_organization_id FROM organizations
Final question: Which organizations are not a parent organization of others? List the organization id.
Final SQL: SELECT organization_id FROM organizations EXCEPT SELECT parent_organization_id FROM organizations
Database: local_govt_and_lot
Question sequence:
Order the resident list alphabetically by other details.
How many residents have the title of 'Prof'?
Alright, what about 'Miss'?
SQL query sequence:
SELECT * FROM residents ORDER BY other_details
SELECT count(*) FROM residents WHERE other_details LIKE '%Prof.%'
SELECT other_details FROM residents WHERE other_details LIKE '%Miss%'
Final question: What are the resident details containing the substring 'Miss'?
Final SQL: SELECT other_details FROM Residents WHERE other_details LIKE '%Miss%'
Database: product_catalog
Question sequence:
What are the different attribute data types?
How many attributes are of each type?
What datatypes have more than 1?
How about more than 3?
SQL query sequence:
SELECT distinct attribute_data_type FROM Attribute_Definitions
SELECT attribute_data_type, count(*) FROM Attribute_Definitions GROUP BY attribute_data_type
SELECT attribute_data_type FROM Attribute_Definitions GROUP BY attribute_data_type HAVING count(*)  >  1
SELECT attribute_data_type FROM Attribute_Definitions GROUP BY attribute_data_type HAVING count(*)  >  3
Final question: Find the list of attribute data types possessed by more than 3 attribute definitions.
Final SQL: SELECT attribute_data_type FROM Attribute_Definitions GROUP BY attribute_data_type HAVING count(*)  >  3
Database: product_catalog
Question sequence:
How many different catalog publishers are there?
How many have a name that contaSELECT count(distinct(catalog_publisher)) FROM catalogs WHERE catalog_publisher LIKE "%Murray%"ins "Murray"
Which ones?
SQL query sequence:
SELECT count(distinct catalog_publisher) FROM catalogs
SELECT count(distinct catalog_publisher) FROM catalogs WHERE catalog_publisher LIKE "%Murray%"
SELECT distinct(catalog_publisher) FROM catalogs WHERE catalog_publisher LIKE "%Murray%"
Final question: Find all the catalog publishers whose name contains "Murray"
Final SQL: SELECT distinct(catalog_publisher) FROM catalogs WHERE catalog_publisher LIKE "%Murray%"
Database: product_catalog
Question sequence:
List all the catalog ids and their respective catalog publisher?
How many catalogs have each publisher published?
Which publisher has the least?
How about the most?
SQL query sequence:
SELECT catalog_id, catalog_publisher FROM catalogs
SELECT catalog_publisher, count(*) FROM catalogs GROUP BY catalog_publisher
SELECT catalog_publisher FROM catalogs GROUP BY catalog_publisher ORDER BY count(*) ASC LIMIT 1
SELECT catalog_publisher FROM catalogs GROUP BY catalog_publisher ORDER BY count(*) DESC LIMIT 1
Final question: Which catalog publisher has published the most catalogs?
Final SQL: SELECT catalog_publisher FROM catalogs GROUP BY catalog_publisher ORDER BY count(*) DESC LIMIT 1
Database: product_catalog
Question sequence:
Show all the catalog information and their respective levels numbers!
Show me only those with a level number greater than five.
Show me just the names of these catalogs?
Also show their publication dates.
SQL query sequence:
SELECT * FROM catalogs AS t1 JOIN catalog_structure AS t2 ON t1.catalog_id  =  t2.catalog_id
SELECT * FROM catalogs AS t1 JOIN catalog_structure AS t2 ON t1.catalog_id  =  t2.catalog_id WHERE catalog_level_number  >  5
SELECT t1.catalog_name FROM catalogs AS t1 JOIN catalog_structure AS t2 ON t1.catalog_id  =  t2.catalog_id WHERE catalog_level_number  >  5
SELECT t1.catalog_name ,  t1.date_of_publication FROM catalogs AS t1 JOIN catalog_structure AS t2 ON t1.catalog_id  =  t2.catalog_id WHERE catalog_level_number  >  5
Final question: Find the names and publication dates of all catalogs that have catalog level number greater than 5.
Final SQL: SELECT t1.catalog_name ,  t1.date_of_publication FROM catalogs AS t1 JOIN catalog_structure AS t2 ON t1.catalog_id  =  t2.catalog_id WHERE catalog_level_number  >  5
Database: product_catalog
Question sequence:
How many different attributes are there?
What is the id of the one that is used in the most catalog content entries?
Which catalog content entries use this attribute value?
Show me just their catalog entry names?
SQL query sequence:
SELECT count(*) FROM attribute_definitions
SELECT attribute_id FROM Catalog_Contents_Additional_Attributes GROUP BY attribute_id ORDER BY count(*) DESC LIMIT 1
SELECT * FROM Catalog_Contents AS t1 JOIN Catalog_Contents_Additional_Attributes AS t2 ON t1.catalog_entry_id  =  t2.catalog_entry_id WHERE t2.attribute_id  =  (SELECT attribute_id FROM Catalog_Contents_Additional_Attributes GROUP BY attribute_id ORDER BY count(*) DESC LIMIT 1)
SELECT t1.catalog_entry_name FROM Catalog_Contents AS t1 JOIN Catalog_Contents_Additional_Attributes AS t2 ON t1.catalog_entry_id  =  t2.catalog_entry_id WHERE t2.attribute_id  =  (SELECT attribute_id FROM Catalog_Contents_Additional_Attributes GROUP BY attribute_id ORDER BY count(*) DESC LIMIT 1)
Final question: What are the entry names of catalog with the attribute possessed by most entries.
Final SQL: SELECT t1.catalog_entry_name FROM Catalog_Contents AS t1 JOIN Catalog_Contents_Additional_Attributes AS t2 ON t1.catalog_entry_id  =  t2.catalog_entry_id WHERE t2.attribute_value  =  (SELECT attribute_value FROM Catalog_Contents_Additional_Attributes GROUP BY attribute_value ORDER BY count(*) DESC LIMIT 1)
Database: product_catalog
Question sequence:
What are prices of each catalog entry id?
Show me only the prices in USD!
Which are the contents of the catalog with the highest one?
What is its entry name?
SQL query sequence:
SELECT catalog_entry_id, price_in_dollars, price_in_euros, price_in_pounds FROM catalog_contents
SELECT catalog_entry_id, price_in_dollars FROM catalog_contents
SELECT * FROM catalog_contents  ORDER BY price_in_dollars DESC LIMIT 1
SELECT catalog_entry_name FROM catalog_contents ORDER BY price_in_dollars DESC LIMIT 1
Final question: What is the entry name of the most expensive catalog (in USD)?
Final SQL: SELECT catalog_entry_name FROM catalog_contents ORDER BY price_in_dollars DESC LIMIT 1
Database: product_catalog
Question sequence:
What are the prices of each catalog in USD?
What is the one with the highest price?
How about the lowest?
What is its catalog level name?
SQL query sequence:
SELECT catalog_entry_id, price_in_dollars FROM catalog_contents
SELECT * FROM catalog_contents AS t1 JOIN catalog_structure AS t2 ON t1.catalog_level_number  =  t2.catalog_level_number ORDER BY t1.price_in_dollars DESC LIMIT 1
SELECT * FROM catalog_contents AS t1 JOIN catalog_structure AS t2 ON t1.catalog_level_number  =  t2.catalog_level_number ORDER BY t1.price_in_dollars LIMIT 1
SELECT t2.catalog_level_name FROM catalog_contents AS t1 JOIN catalog_structure AS t2 ON t1.catalog_level_number  =  t2.catalog_level_number ORDER BY t1.price_in_dollars LIMIT 1
Final question: What is the level name of the cheapest catalog (in USD)?
Final SQL: SELECT t2.catalog_level_name FROM catalog_contents AS t1 JOIN catalog_structure AS t2 ON t1.catalog_level_number  =  t2.catalog_level_number ORDER BY t1.price_in_dollars LIMIT 1
Database: product_catalog
Question sequence:
What are all the catalog entry names?
What are the prices in euros of each?
Show me the average price in euros!
Also provide the lowest price!
SQL query sequence:
SELECT catalog_entry_name FROM catalog_contents
SELECT catalog_entry_name, price_in_euros FROM catalog_contents
SELECT avg(price_in_euros) FROM catalog_contents
SELECT avg(price_in_euros) ,  min(price_in_euros) FROM catalog_contents
Final question: What are the average and minimum price (in Euro) of all products?
Final SQL: SELECT avg(price_in_euros) ,  min(price_in_euros) FROM catalog_contents
Database: product_catalog
Question sequence:
Show the name, length, height, and width of every catalog product.
Can you show me the list sorted on width FROM greatest to least!
How about based on height!
Show me the entry_name of just the first row!
SQL query sequence:
SELECT catalog_entry_name, height, width, length FROM catalog_contents
SELECT catalog_entry_name, height, width, length FROM catalog_contents ORDER BY width DESC
SELECT catalog_entry_name, height, width, length FROM catalog_contents ORDER BY height DESC
SELECT catalog_entry_name FROM catalog_contents ORDER BY height DESC LIMIT 1
Final question: What is the product with the highest height? Give me the catalog entry name.
Final SQL: SELECT catalog_entry_name FROM catalog_contents ORDER BY height DESC LIMIT 1
Database: product_catalog
Question sequence:
What are the distinct capacity each catalog can have?
Which one is the most common?
Which one is the smallest?
What is the name of a catalog product that has this?
SQL query sequence:
SELECT distinct capacity FROM catalog_contents
SELECT capacity FROM catalog_contents group by capacity order by count(*) DESC LIMIT 1
SELECT capacity FROM catalog_contents ORDER BY capacity ASC LIMIT 1
SELECT catalog_entry_name FROM catalog_contents ORDER BY capacity ASC LIMIT 1
Final question: Find the name of the product that has the smallest capacity.
Final SQL: SELECT catalog_entry_name FROM catalog_contents ORDER BY capacity ASC LIMIT 1
Database: product_catalog
Question sequence:
What are all the names of all the catalog products?
Could you also show me their product stock numbers?!
How many have stock number that starts with "2"?
What are their names?
SQL query sequence:
SELECT catalog_entry_name FROM catalog_contents
SELECT catalog_entry_name, product_stock_number FROM catalog_contents
SELECT count(*) FROM catalog_contents WHERE product_stock_number LIKE "2%"
SELECT catalog_entry_name FROM catalog_contents WHERE product_stock_number LIKE "2%"
Final question: Find the names of all the products whose stock number starts with "2".
Final SQL: SELECT catalog_entry_name FROM catalog_contents WHERE product_stock_number LIKE "2%"
Database: product_catalog
Question sequence:
Show me each catalog entry id and their catalog level numbers.
Which ones have more than one catalog level number?
Which ones have a catalog level number of 8?
Show me the entry names of each!
SQL query sequence:
SELECT catalog_entry_id, catalog_level_number FROM Catalog_Contents_Additional_Attributes
SELECT catalog_entry_id, catalog_level_number FROM Catalog_Contents_Additional_Attributes group by catalog_entry_id having count (distinct catalog_level_number) > 1
SELECT catalog_entry_id, catalog_level_number FROM Catalog_Contents_Additional_Attributes WHERE catalog_level_number  =  "8"
SELECT t1.catalog_entry_name FROM Catalog_Contents AS t1 JOIN Catalog_Contents_Additional_Attributes AS t2 ON t1.catalog_entry_id  =  t2.catalog_entry_id WHERE t2.catalog_level_number  =  "8"
Final question: Find the names of catalog entries with level number 8.
Final SQL: SELECT t1.catalog_entry_name FROM Catalog_Contents AS t1 JOIN Catalog_Contents_Additional_Attributes AS t2 ON t1.catalog_entry_id  =  t2.catalog_entry_id WHERE t2.catalog_level_number  =  "8"
Database: product_catalog
Question sequence:
What catalog products have a length smaller than 3?
Show me their names!
Also include those with a height that are greater than 5!
SQL query sequence:
SELECT * FROM catalog_contents WHERE LENGTH  <  3
SELECT catalog_entry_name FROM catalog_contents WHERE LENGTH  <  3
SELECT catalog_entry_name FROM catalog_contents WHERE LENGTH  <  3 OR height  >  5
Final question: Find the names of the products with length smaller than 3 or height greater than 5.
Final SQL: SELECT catalog_entry_name FROM catalog_contents WHERE LENGTH  <  3 OR width  >  5
Database: product_catalog
Question sequence:
For each catalog id, show the attribute ids and values!!
Show me just those that a value of 1!
Actually, how about those with a value of 0?
What are the just the names and attribute IDs of each?
SQL query sequence:
SELECT attribute_id,  attribute_value FROM Catalog_Contents_Additional_Attributes
SELECT attribute_id,  attribute_value FROM Catalog_Contents_Additional_Attributes WHERE attribute_value  =  1
SELECT attribute_id,  attribute_value FROM Catalog_Contents_Additional_Attributes WHERE attribute_value  =  0
SELECT t1.attribute_name ,  t1.attribute_id FROM Attribute_Definitions AS t1 JOIN Catalog_Contents_Additional_Attributes AS t2 ON t1.attribute_id  =  t2.attribute_id WHERE t2.attribute_value  =  0
Final question: Find the name and attribute ID of the attribute definitions with attribute value 0.
Final SQL: SELECT t1.attribute_name ,  t1.attribute_id FROM Attribute_Definitions AS t1 JOIN Catalog_Contents_Additional_Attributes AS t2 ON t1.attribute_id  =  t2.attribute_id WHERE t2.attribute_value  =  0
Database: entertainment_awards
Question sequence:
What festivals are there?
What is the audience size for each of these festivals?
Which of these festivals has the largest audience?
Where is this festival located?
SQL query sequence:
SELECT festival_name FROM festival_detail
SELECT festival_name, num_of_audience FROM festival_detail
SELECT festival_name FROM festival_detail WHERE num_of_audience = (SELECT max(num_of_audience)from festival_detail)
SELECT LOCATION FROM festival_detail ORDER BY Num_of_Audience DESC LIMIT 1
Final question: What is the location of the festival with the largest number of audience?
Final SQL: SELECT LOCATION FROM festival_detail ORDER BY Num_of_Audience DESC LIMIT 1
Database: entertainment_awards
Question sequence:
Tell me the names of all the festivals available.
When did these festivals occur?
Which one of these festivals occurred most recently?
Ok, what about the top three most recent ones?
SQL query sequence:
SELECT festival_name FROM festival_detail
SELECT festival_name, year FROM festival_detail
SELECT festival_name FROM festival_detail ORDER BY year DESC LIMIT 1
SELECT Festival_Name FROM festival_detail ORDER BY YEAR DESC LIMIT 3
Final question: Show the names of the three most recent festivals.
Final SQL: SELECT Festival_Name FROM festival_detail ORDER BY YEAR DESC LIMIT 3
Database: entertainment_awards
Question sequence:
Show me the names of the artworks.
Can you also tell me the types of these artworks?
Which of these artworks were nominated in some festival?
What were the names of these festivals?
SQL query sequence:
SELECT name FROM artwork
SELECT name, type 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 T2.Name ,  T3.Festival_Name FROM nomination AS T1 JOIN artwork AS T2 ON T1.Artwork_ID  =  T2.Artwork_ID JOIN festival_detail AS T3 ON T1.Festival_ID  =  T3.Festival_ID
Final question: For each nomination, show the name of the artwork and name of the festival where it is nominated.
Final SQL: SELECT T2.Name ,  T3.Festival_Name FROM nomination AS T1 JOIN artwork AS T2 ON T1.Artwork_ID  =  T2.Artwork_ID JOIN festival_detail AS T3 ON T1.Festival_ID  =  T3.Festival_ID
Database: entertainment_awards
Question sequence:
Tell me about the names of all the artworks.
What are the types of all these artworks?
Which of these were nominated?
Which of these were nominated in 2007?
SQL query sequence:
SELECT name FROM artwork
SELECT DISTINCT type FROM artwork
SELECT DISTINCT t1.type 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 DISTINCT T2.Type FROM nomination AS T1 JOIN artwork AS T2 ON T1.Artwork_ID  =  T2.Artwork_ID JOIN festival_detail AS T3 ON T1.Festival_ID  =  T3.Festival_ID WHERE T3.Year  =  2007
Final question: Show distinct types of artworks that are nominated in festivals in 2007.
Final SQL: SELECT DISTINCT T2.Type FROM nomination AS T1 JOIN artwork AS T2 ON T1.Artwork_ID  =  T2.Artwork_ID JOIN festival_detail AS T3 ON T1.Festival_ID  =  T3.Festival_ID WHERE T3.Year  =  2007
Database: entertainment_awards
Question sequence:
List the names of all the artworks.
At which festivals were these artworks nominated?
What year were these artworks nominated?
Can you list them in ascending order?
SQL query sequence:
SELECT name FROM artwork
SELECT t1.name, t3.festival_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 t1.name, t3.year 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 T2.Name FROM nomination AS T1 JOIN artwork AS T2 ON T1.Artwork_ID  =  T2.Artwork_ID JOIN festival_detail AS T3 ON T1.Festival_ID  =  T3.Festival_ID ORDER BY T3.Year
Final question: Show the names of artworks in ascending order of the year they are nominated in.
Final SQL: SELECT T2.Name FROM nomination AS T1 JOIN artwork AS T2 ON T1.Artwork_ID  =  T2.Artwork_ID JOIN festival_detail AS T3 ON T1.Festival_ID  =  T3.Festival_ID ORDER BY T3.Year
Database: entertainment_awards
Question sequence:
What are the names of all the festivals?
What are the nominated artworks of these festivals?
Show the types of these artworks given these festivals.
Which of these festivals have type "Program Talent Show"?
SQL query sequence:
SELECT festival_name FROM festival_detail
SELECT t3.festival_name, 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 t3.festival_name, t1.type 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 T3.Festival_Name FROM nomination AS T1 JOIN artwork AS T2 ON T1.Artwork_ID  =  T2.Artwork_ID JOIN festival_detail AS T3 ON T1.Festival_ID  =  T3.Festival_ID WHERE T2.Type  =  "Program Talent Show"
Final question: Show the names of festivals that have nominated artworks of type "Program Talent Show".
Final SQL: SELECT T3.Festival_Name FROM nomination AS T1 JOIN artwork AS T2 ON T1.Artwork_ID  =  T2.Artwork_ID JOIN festival_detail AS T3 ON T1.Festival_ID  =  T3.Festival_ID WHERE T2.Type  =  "Program Talent Show"
Database: entertainment_awards
Question sequence:
List the names of the festivals.
Show me the names of the nominated artworks for the festivals listed.
Which of these festivals have at least two nominations for artworks?
Show me their ids as well.
SQL query sequence:
SELECT festival_name FROM festival_detail
SELECT t3.festival_name, 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 t3.festival_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 GROUP BY t3.festival_id HAVING  count(*)  >= 2
SELECT T1.Festival_ID ,  T3.Festival_Name FROM nomination AS T1 JOIN artwork AS T2 ON T1.Artwork_ID  =  T2.Artwork_ID JOIN festival_detail AS T3 ON T1.Festival_ID  =  T3.Festival_ID GROUP BY T1.Festival_ID HAVING COUNT(*)  >=  2
Final question: Show the ids and names of festivals that have at least two nominations for artworks.
Final SQL: SELECT T1.Festival_ID ,  T3.Festival_Name FROM nomination AS T1 JOIN artwork AS T2 ON T1.Artwork_ID  =  T2.Artwork_ID JOIN festival_detail AS T3 ON T1.Festival_ID  =  T3.Festival_ID GROUP BY T1.Festival_ID HAVING COUNT(*)  >=  2
Database: entertainment_awards
Question sequence:
Show me the ids of the festivals.
Show me the names as well.
Add in the artworks nominated as well.
Instead of showing the artworks nominated, show me the number of nominated artworks for each of these festivals.
SQL query sequence:
SELECT festival_id FROM festival_detail
SELECT festival_id, festival_name FROM festival_detail
SELECT t3.festival_id, t3.festival_name, 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 T1.Festival_ID ,  T3.Festival_Name ,  COUNT(*) FROM nomination AS T1 JOIN artwork AS T2 ON T1.Artwork_ID  =  T2.Artwork_ID JOIN festival_detail AS T3 ON T1.Festival_ID  =  T3.Festival_ID GROUP BY T1.Festival_ID
Final question: Show the id, name of each festival and the number of artworks it has nominated.
Final SQL: SELECT T1.Festival_ID ,  T3.Festival_Name ,  COUNT(*) FROM nomination AS T1 JOIN artwork AS T2 ON T1.Artwork_ID  =  T2.Artwork_ID JOIN festival_detail AS T3 ON T1.Festival_ID  =  T3.Festival_ID GROUP BY T1.Festival_ID
Database: entertainment_awards
Question sequence:
Show me the names of all the artworks.
Show me their types as well.
What is the number of artworks for each type?
Which of these types is the most common?
SQL query sequence:
SELECT name FROM artwork
SELECT name, type FROM artwork
SELECT type, count(*) FROM artwork GROUP BY type
SELECT TYPE FROM artwork GROUP BY TYPE ORDER BY COUNT(*) DESC LIMIT 1
Final question: List the most common type of artworks.
Final SQL: SELECT TYPE FROM artwork GROUP BY TYPE ORDER BY COUNT(*) DESC LIMIT 1
Database: entertainment_awards
Question sequence:
Show all the names of all the festivals.
Show me the corresponding year for these festivals.
What were the amount of festivals for each of these years?
Which of these years has more than one festival?
SQL query sequence:
SELECT festival_name FROM festival_detail
SELECT festival_name, year FROM festival_detail
SELECT year, count(*) FROM festival_detail GROUP BY Year
SELECT YEAR FROM festival_detail GROUP BY YEAR HAVING COUNT(*)  >  1
Final question: List the year in which there are more than one festivals.
Final SQL: SELECT YEAR FROM festival_detail GROUP BY YEAR HAVING COUNT(*)  >  1