What is the average and total capacity for all dorms who are of gender X?
return dorms ;return gender of  #1 ;return #1 where #2 is  X ;return capacities of  #3 ;return average of  #4 ;return sum of  #4 ;return #5 ,  #6
['select', 'project', 'comparative', 'project', 'aggregate', 'aggregate', 'union']