What is the average age for each gender Visualize by bar chart, I want to list by the mean age in descending.
CREATE TABLE Person (
    name varchar(20),
    age INTEGER,
    city TEXT,
    gender TEXT,
    job TEXT
)

CREATE TABLE PersonFriend (
    name varchar(20),
    friend varchar(20),
    year INTEGER
)
SELECT gender, AVG(age) FROM Person GROUP BY gender ORDER BY AVG(age) DESC
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: What is the average age for each gender Visualize by bar chart, I want to list by the mean age in descending. ### Input: CREATE TABLE Person (
    name varchar(20),
    age INTEGER,
    city TEXT,
    gender TEXT,
    job TEXT
)

CREATE TABLE PersonFriend (
    name varchar(20),
    friend varchar(20),
    year INTEGER
) ### Response: SELECT gender, AVG(age) FROM Person GROUP BY gender ORDER BY AVG(age) DESC