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 and names of musicals they are in.
assistant
SELECT T1.Name , T2.Name FROM actor AS T1 JOIN musical AS T2 ON T1.Musical_ID = T2.Musical_ID
human
What are the characters and duration of actors?
assistant
SELECT Character , Duration FROM actor
human
Show names of actors in descending order of the year their musical is awarded.
assistant
SELECT T1.Name FROM actor AS T1 JOIN musical AS T2 ON T1.Musical_ID = T2.Musical_ID ORDER BY T2.Year DESC
human
How many actors are there?
assistant
SELECT count(*) FROM actor
human
What are the characters of actors in descending order of age?
assistant
SELECT Character FROM actor ORDER BY age DESC
human
What are the names of actors, ordered alphabetically?
assistant
SELECT Name FROM actor ORDER BY Name ASC ;