What are the captains names and ages?
select name, age from captain
What is the average age for each rank?
select rank, avg(age) from captain group by rank
Per rank, how many are older than 50?
select count(*), rank from captain where age < 50 group by rank