Find the average age of students living in each dorm and the name of dorm.
CREATE TABLE dorm (
    dormid number,
    dorm_name text,
    student_capacity number,
    gender text
)

CREATE TABLE has_amenity (
    dormid number,
    amenid number
)

CREATE TABLE lives_in (
    stuid number,
    dormid number,
    room_number number
)

CREATE TABLE dorm_amenity (
    amenid number,
    amenity_name text
)

CREATE TABLE student (
    stuid number,
    lname text,
    fname text,
    age number,
    sex text,
    major number,
    advisor number,
    city_code text
)
SELECT AVG(T1.age), T3.dorm_name FROM student AS T1 JOIN lives_in AS T2 ON T1.stuid = T2.stuid JOIN dorm AS T3 ON T3.dormid = T2.dormid GROUP BY T3.dorm_name
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Find the average age of students living in each dorm and the name of dorm. ### Input: CREATE TABLE dorm (
    dormid number,
    dorm_name text,
    student_capacity number,
    gender text
)

CREATE TABLE has_amenity (
    dormid number,
    amenid number
)

CREATE TABLE lives_in (
    stuid number,
    dormid number,
    room_number number
)

CREATE TABLE dorm_amenity (
    amenid number,
    amenity_name text
)

CREATE TABLE student (
    stuid number,
    lname text,
    fname text,
    age number,
    sex text,
    major number,
    advisor number,
    city_code text
) ### Response: SELECT AVG(T1.age), T3.dorm_name FROM student AS T1 JOIN lives_in AS T2 ON T1.stuid = T2.stuid JOIN dorm AS T3 ON T3.dormid = T2.dormid GROUP BY T3.dorm_name