how many female students are living in the city of code BAL?
select count(*) from student where sex = 'F' and city_code = 'BAL'
how many male students are less than 20 years old?
select count(*) from student where sex = 'M' and age < 20
what is the total number of students in these two groups?
select count(*) from (select * from student where sex = 'M' and age < 20 union select * from student where sex = 'F' and city_code = 'BAL')
what are their last names?
select lname from student where sex = 'F' and city_code = 'BAL' union select lname from student where sex = 'M' and age < 20