human
Schema:
musical (Musical_ID, Name, Year, Award, Category, Nominee, Result)
actor (Actor_ID, Name, Musical_ID, Character, Duration, age)
Please answer with SQL.
assistant
Sure, I understand.
human
Show names of actors that have appeared in musical with name 'The Phantom of the Opera'.
assistant
SELECT T1.Name FROM actor AS T1 JOIN musical AS T2 ON T1.Musical_ID = T2.Musical_ID WHERE T2.Name = 'The Phantom of the Opera'
human
What are the characters of actors in descending order of age?
assistant
SELECT Character FROM actor ORDER BY age DESC
human
What is the duration of the oldest actor?
assistant
SELECT Duration FROM actor ORDER BY Age DESC LIMIT 1
human
How many actors are there?
assistant
SELECT count(*) FROM actor
human
List the name of actors in ascending alphabetical order.
assistant
SELECT Name FROM actor ORDER BY Name ASC
human
Return the characters and durations for each actor.
assistant
SELECT Character , Duration FROM actor ;