CREATE TABLE personfriend (name CLOB, friend CLOB, year NUMBER)
CREATE TABLE person (name CLOB, age NUMBER, city CLOB, gender CLOB, job CLOB)

Who has friends that are younger than the average age?
SELECT DISTINCT T2.name 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" FROM "person" "T1" JOIN "personfriend" "T2" ON "T1"."name" = "T2"."friend" WHERE "T1"."age" < (SELECT AVG("age") FROM "person")