CREATE TABLE person (name TEXT, age DECIMAL, city TEXT, gender TEXT, job TEXT)
CREATE TABLE personfriend (name TEXT, friend TEXT, year DECIMAL)

Whare the names, friends, and ages of all people who are older than the average age of a person?
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)
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")