SCHEMA:
CREATE TABLE captain (rank VARCHAR, age INTEGER)
USER:
How many captains with younger than 50 are in each rank?

QUERY:
SELECT COUNT(*), rank FROM captain WHERE age < 50 GROUP BY rank