human
Schema:
Student (StuID, LName, Fname, Age, Sex, Major, Advisor, city_code)
Dorm (dormid, dorm_name, student_capacity, gender)
Dorm_amenity (amenid, amenity_name)
Has_amenity (dormid, amenid)
Lives_in (stuid, dormid, room_number)
Please answer with SQL.
assistant
Sure, I understand.
human
what are the different gender types of all dorms?
assistant
SELECT distinct gender FROM dorm;
human
show student capacity of the dorms with gender X.
assistant
SELECT student_capacity FROM dorm WHERE gender = 'X';
human
what is their average capacity?
assistant
SELECT AVG ( student_capacity ) FROM dorm WHERE gender = "X" ;