CREATE TABLE ship (ship_id NUMBER, name CLOB, type CLOB, built_year NUMBER, class CLOB, flag CLOB)
CREATE TABLE captain (captain_id NUMBER, name CLOB, ship_id NUMBER, age CLOB, class CLOB, rank CLOB)

How many captains are in each rank?
SELECT COUNT(*), rank FROM captain GROUP BY rank
SELECT COUNT(*), "rank" FROM "captain" GROUP BY "rank"