How many type codes are there?
select count(distinct apt_type_code) from apartments
For each one, show how many apartments.
select apt_type_code, count(*) from apartments group by apt_type_code
How many apartments have the type code "Studio"?
select count(*) from apartments where apt_type_code = "Studio"
Among those apartments, what is the average number of rooms?
select avg(room_count) from apartments where apt_type_code = "Studio"