Database: ship_1
Question: Count the number of captains younger than 50 of each rank.
SQL:
SELECT count(*) ,  rank FROM captain WHERE age  <  50 GROUP BY rank