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
Could you give me the number of dorms for each gender?
assistant
SELECT COUNT( * ) , gender FROM dorm GROUP BY gender;
human
What are the names of those dorms?
assistant
SELECT dorm_name FROM dorm;
human
What is the dorm name of the dorm with the smallest capacity?
assistant
SELECT dorm_name FROM dorm ORDER by student_capacity desc LIMIT 1 ;