CREATE TABLE Ship (Ship_ID INT, Name TEXT, Type TEXT, Built_Year FLOAT, Class TEXT, Flag TEXT)
CREATE TABLE captain (Captain_ID INT, Name TEXT, Ship_ID INT, age TEXT, Class TEXT, Rank TEXT)

What is the average age of captains in different classes?, and could you order in descending by the mean age please?
SELECT Class, AVG(age) FROM captain GROUP BY Class ORDER BY AVG(age) DESC
SELECT "Class", AVG("age") FROM "captain" GROUP BY "Class" ORDER BY AVG("age") DESC NULLS LAST