Find the number of dorms and total capacity for each gender.
return genders ;return dorms of #1 ;return number of  #2 for each #1 ;return capacities of #2 ;return sum of #4 for each #1 ;return #3 ,  #5
['select', 'project', 'group', 'project', 'group', 'union']