CREATE TABLE dorm_amenity (amenid NUMBER, amenity_name CLOB)
CREATE TABLE lives_in (stuid NUMBER, dormid NUMBER, room_number NUMBER)
CREATE TABLE dorm (dormid NUMBER, dorm_name CLOB, student_capacity NUMBER, gender CLOB)
CREATE TABLE has_amenity (dormid NUMBER, amenid NUMBER)
CREATE TABLE student (stuid NUMBER, lname CLOB, fname CLOB, age NUMBER, sex CLOB, major NUMBER, advisor NUMBER, city_code CLOB)

What is the average age of students who are living in the dorm with the largest capacity?
SELECT AVG(T1.age) FROM student AS T1 JOIN lives_in AS T2 ON T1.stuid = T2.stuid JOIN dorm AS T3 ON T3.dormid = T2.dormid WHERE T3.student_capacity = (SELECT MAX(student_capacity) FROM dorm)
SELECT AVG("T1"."age") FROM "student" "T1" JOIN "lives_in" "T2" ON "T1"."stuid" = "T2"."stuid" JOIN "dorm" "T3" ON "T2"."dormid" = "T3"."dormid" AND "T3"."student_capacity" = (SELECT MAX("student_capacity") FROM "dorm")