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

Compare the total number of different ranks using a bar graph, and sort from low to high by the Y.
SELECT Rank, COUNT(Rank) FROM captain GROUP BY Rank ORDER BY COUNT(Rank)
SELECT "Rank", COUNT("Rank") FROM "captain" GROUP BY "Rank" ORDER BY COUNT("Rank") NULLS FIRST