human
Schema:
artist (Artist_ID, Artist, Age, Famous_Title, Famous_Release_date)
volume (Volume_ID, Volume_Issue, Issue_Date, Weeks_on_Top, Song, Artist_ID)
music_festival (ID, Music_Festival, Date_of_ceremony, Category, Volume, Result)
Please answer with SQL.
assistant
Sure, I understand.
human
Please show the results of music festivals and the number of music festivals that have had each, ordered by this count.
assistant
SELECT RESULT , COUNT(*) FROM music_festival GROUP BY RESULT ORDER BY COUNT(*) DESC
human
Please show the categories of the music festivals with count more than 1.
assistant
SELECT Category FROM music_festival GROUP BY Category HAVING COUNT(*) > 1
human
Please show the categories of the music festivals and the count.
assistant
SELECT Category , COUNT(*) FROM music_festival GROUP BY Category
human
What are the date of ceremony of music festivals with category 'Best Song' and result 'Awarded'?
assistant
SELECT Date_of_ceremony FROM music_festival WHERE Category = 'Best Song' AND RESULT = 'Awarded'
human
What are the category of music festivals with result 'Awarded'?
assistant
SELECT Category FROM music_festival WHERE RESULT = 'Awarded'
human
Please show the songs that have result 'nominated' at music festivals.
assistant
SELECT T2.Song FROM music_festival AS T1 JOIN volume AS T2 ON T1.Volume = T2.Volume_ID WHERE T1.Result = "Nominated" ;