Database: entertainment_awards

Question: What is the location of the festival with the largest number of audience?
SQL: SELECT LOCATION FROM festival_detail ORDER BY Num_of_Audience DESC LIMIT 1

Question: Show the names of the three most recent festivals.
SQL: SELECT Festival_Name FROM festival_detail ORDER BY YEAR DESC LIMIT 3

Question: For each nomination, show the name of the artwork and name of the festival where it is nominated.
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

Question: Show distinct types of artworks that are nominated in festivals in 2007.
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

Question: Show the names of artworks in ascending order of the year they are nominated in.
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

Question: Show the names of festivals that have nominated artworks of type "Program Talent Show".
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"

Question: Show the ids and names of festivals that have at least two nominations for artworks.
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

Question: Show the id, name of each festival and the number of artworks it has nominated.
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

Question: List the most common type of artworks.
SQL: SELECT TYPE FROM artwork GROUP BY TYPE ORDER BY COUNT(*) DESC LIMIT 1

Question: List the year in which there are more than one festivals.
SQL: SELECT YEAR FROM festival_detail GROUP BY YEAR HAVING COUNT(*)  >  1

Question: List the name of artworks that are not nominated.
SQL: SELECT Name FROM Artwork WHERE Artwork_ID NOT IN (SELECT Artwork_ID FROM nomination)

Question: Show the number of audience in year 2008 or 2010.
SQL: SELECT Num_of_Audience FROM festival_detail WHERE YEAR  =  2008 OR YEAR  =  2010