human
Schema:
journal (Journal_ID, Date, Theme, Sales)
editor (Editor_ID, Name, Age)
journal_committee (Editor_ID, Journal_ID, Work_Type)
Please answer with SQL.
assistant
Sure, I understand.
human
What is the name of the youngest editor?
assistant
SELECT Name FROM editor ORDER BY Age ASC LIMIT 1
human
What are the names and ages of editors?
assistant
SELECT Name , Age FROM editor
human
What are the different ages of editors? Show each age along with the number of editors of that age.
assistant
SELECT Age , COUNT(*) FROM editor GROUP BY Age
human
Show the names of editors of age either 24 or 25.
assistant
SELECT Name FROM editor WHERE Age = 24 OR Age = 25
human
List the names of editors who are older than 25.
assistant
SELECT Name FROM editor WHERE Age > 25
human
List the names of editors in ascending order of age.
assistant
SELECT Name FROM editor ORDER BY Age ASC ;