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
Please show the most common age of editors.
assistant
SELECT Age FROM editor GROUP BY Age ORDER BY COUNT(*) DESC 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
List the names of editors in ascending order of age.
assistant
SELECT Name FROM editor ORDER BY Age ASC
human
List the names of editors who are older than 25.
assistant
SELECT Name FROM editor WHERE Age > 25
human
Show the names of editors of age either 24 or 25.
assistant
SELECT Name FROM editor WHERE Age = 24 OR Age = 25 ;