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 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
What is the famous release date of the artist with the oldest age?
assistant
SELECT Famous_Release_date FROM artist ORDER BY Age DESC LIMIT 1
human
How many artists are there?
assistant
SELECT count(*) FROM artist
human
List the age of all music artists.
assistant
SELECT Age FROM artist
human
What is the average weeks on top of volumes associated with the artist aged 25 or younger?
assistant
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
human
What is the average age of all artists?
assistant
SELECT avg ( Age ) FROM artist ;