CREATE TABLE captain (rank VARCHAR2, age NUMBER)

How many captains with younger than 50 are in each rank?
SELECT COUNT(*), rank FROM captain WHERE age < 50 GROUP BY rank
SELECT COUNT(*), "rank" FROM "captain" WHERE "age" < 50 GROUP BY "rank"