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)

Count the number of captains younger than 50 of each rank by a bar chart, and order from high to low by the X.
SELECT Rank, COUNT(*) FROM captain WHERE age < 50 GROUP BY Rank ORDER BY Rank DESC
SELECT "Rank", COUNT(*) FROM "captain" WHERE "age" < 50 GROUP BY "Rank" ORDER BY "Rank" DESC NULLS LAST