How many captains with younger than 50 are in each rank?
select count(*), rank from captain where age < 50 group by rank