Task: Text to Code
Input (English): Find the average and total capacity of dorms for the students with gender X.
Output (English): SELECT avg(student_capacity) ,  sum(student_capacity) FROM dorm WHERE gender  =  'X'