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
What is the duration of the oldest actor?
assistant
SELECT Duration FROM actor ORDER BY Age DESC LIMIT 1
human
Show names of musicals and the number of actors who have appeared in the musicals.
assistant
SELECT T2.Name , COUNT(*) FROM actor AS T1 JOIN musical AS T2 ON T1.Musical_ID = T2.Musical_ID GROUP BY T1.Musical_ID
human
List the name of actors whose age is not 20.
assistant
SELECT Name FROM actor WHERE Age != 20
human
What are the characters and duration of actors?
assistant
SELECT Character , Duration FROM actor
human
List the name of actors in ascending alphabetical order.
assistant
SELECT Name FROM actor ORDER BY Name ASC
human
Count the number of actors.
assistant
SELECT COUNT( * ) FROM actor ;