Visualize a bar chart showing the average age of captains in each class, I want to rank in asc by the x axis.
CREATE TABLE captain (
    Captain_ID int,
    Name text,
    Ship_ID int,
    age text,
    Class text,
    Rank text
)

CREATE TABLE Ship (
    Ship_ID int,
    Name text,
    Type text,
    Built_Year real,
    Class text,
    Flag text
)
SELECT Class, AVG(age) FROM captain GROUP BY Class ORDER BY Class
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: Visualize a bar chart showing the average age of captains in each class, I want to rank in asc by the x axis. ### Input: CREATE TABLE captain (
    Captain_ID int,
    Name text,
    Ship_ID int,
    age text,
    Class text,
    Rank text
)

CREATE TABLE Ship (
    Ship_ID int,
    Name text,
    Type text,
    Built_Year real,
    Class text,
    Flag text
) ### Response: SELECT Class, AVG(age) FROM captain GROUP BY Class ORDER BY Class