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 total number of captains in each rank and class? Let class as X-axis, and categorize by rank with a stacked bar chart, show names from high to low order please.
SELECT Class, COUNT(Class) FROM captain GROUP BY Rank, Class ORDER BY Class DESC
SELECT "Class", COUNT("Class") FROM "captain" GROUP BY "Rank", "Class" ORDER BY "Class" DESC NULLS LAST