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 is the student_capacity of Smith Hall? | Are you asking about the student capacity of the dorm named Smith Hall? | Yes
assistant
SELECT student_capacity FROM dorm WHERE dorm_name = 'Smith Hall';
human
How May female Dorm are there?
assistant
SELECT COUNT( * ) FROM dorm WHERE gender = 'F';
human
What is the amenity_name of Dorm_amenity? | Did you want all amenity names for dorms? | Yes
assistant
SELECT amenity_name FROM dorm_amenity;
human
List name of all amenities which Anonymous Donor Hall has, and sort the result in alphabetic order.
assistant
SELECT T1.amenity_name FROM dorm_amenity AS T1 JOIN has_amenity AS T2 ON T2.amenid = T1.amenid JOIN dorm AS T3 ON T2.dormid = T3.dormid WHERE T3.dorm_name = "Anonymous Donor Hall" ORDER BY T1.amenity_name ;