How many females are under age 40?
select count ( * ) from person where gender = 'female' and age < 40
How many males do we have data for?
select count ( * ) from person where gender = 'male'
And how many of them are under age 40?
select count ( * ) from person where age < 40 and gender = 'male'