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

What is the name of the person who has the oldest average age for their friends, and what is that average age?
SELECT T2.name, AVG(T1.age) FROM person AS T1 JOIN personfriend AS T2 ON T1.name = T2.friend GROUP BY T2.name ORDER BY AVG(T1.age) DESC LIMIT 1
SELECT "T2"."name", AVG("T1"."age") FROM "person" AS "T1" JOIN "personfriend" AS "T2" ON "T1"."name" = "T2"."friend" GROUP BY "T2"."name" ORDER BY AVG("T1"."age") DESC NULLS LAST LIMIT 1