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
What is the average age of all artists?
assistant
SELECT avg(Age) FROM artist
human
Please list the age and famous title of artists in descending order of age.
assistant
SELECT Famous_Title , Age FROM artist ORDER BY Age DESC
human
List the age of all music artists.
assistant
SELECT Age FROM artist
human
Find the famous titles of artists that do not have any volume.
assistant
SELECT Famous_Title FROM artist WHERE Artist_ID NOT IN(SELECT Artist_ID FROM volume)
human
How many distinct artists do the volumes associate to?
assistant
SELECT COUNT(DISTINCT Artist_ID) FROM volume
human
Count the number of artists.
assistant
SELECT COUNT( * ) FROM artist ;