Find the average age of students living in each dorm and the name of dorm Plot them as bar chart, rank by the bars in asc.
CREATE TABLE Has_amenity (
    dormid INTEGER,
    amenid INTEGER
)

CREATE TABLE Dorm_amenity (
    amenid INTEGER,
    amenity_name VARCHAR(25)
)

CREATE TABLE Lives_in (
    stuid INTEGER,
    dormid INTEGER,
    room_number INTEGER
)

CREATE TABLE Student (
    StuID INTEGER,
    LName VARCHAR(12),
    Fname VARCHAR(12),
    Age INTEGER,
    Sex VARCHAR(1),
    Major INTEGER,
    Advisor INTEGER,
    city_code VARCHAR(3)
)

CREATE TABLE Dorm (
    dormid INTEGER,
    dorm_name VARCHAR(20),
    student_capacity INTEGER,
    gender VARCHAR(1)
)
SELECT dorm_name, 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 GROUP BY T3.dorm_name ORDER BY 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 Plot them as bar chart, rank by the bars in asc. ### Input: CREATE TABLE Has_amenity (
    dormid INTEGER,
    amenid INTEGER
)

CREATE TABLE Dorm_amenity (
    amenid INTEGER,
    amenity_name VARCHAR(25)
)

CREATE TABLE Lives_in (
    stuid INTEGER,
    dormid INTEGER,
    room_number INTEGER
)

CREATE TABLE Student (
    StuID INTEGER,
    LName VARCHAR(12),
    Fname VARCHAR(12),
    Age INTEGER,
    Sex VARCHAR(1),
    Major INTEGER,
    Advisor INTEGER,
    city_code VARCHAR(3)
)

CREATE TABLE Dorm (
    dormid INTEGER,
    dorm_name VARCHAR(20),
    student_capacity INTEGER,
    gender VARCHAR(1)
) ### Response: SELECT dorm_name, 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 GROUP BY T3.dorm_name ORDER BY dorm_name