Question: How many captains are there younger than 50 in each rank?
SQL: SELECT count ( * )  ,  rank FROM captain WHERE age  <  50 GROUP BY rank