Who has friends that are older than the average age? Print their friends and their ages as well
CREATE TABLE personfriend (
    name text,
    friend text,
    year number
)

CREATE TABLE person (
    name text,
    age number,
    city text,
    gender text,
    job text
)
SELECT DISTINCT T2.name, T2.friend, T1.age FROM person AS T1 JOIN personfriend AS T2 ON T1.name = T2.friend WHERE T1.age > (SELECT AVG(age) FROM person)
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: Who has friends that are older than the average age? Print their friends and their ages as well ### Input: CREATE TABLE personfriend (
    name text,
    friend text,
    year number
)

CREATE TABLE person (
    name text,
    age number,
    city text,
    gender text,
    job text
) ### Response: SELECT DISTINCT T2.name, T2.friend, T1.age FROM person AS T1 JOIN personfriend AS T2 ON T1.name = T2.friend WHERE T1.age > (SELECT AVG(age) FROM person)