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

Who has a friend that is from new york city?
SELECT T2.name FROM person AS T1 JOIN personfriend AS T2 ON T1.name = T2.friend WHERE T1.city = 'new york city'
SELECT "T2"."name" FROM "person" "T1" JOIN "personfriend" "T2" ON "T1"."name" = "T2"."friend" WHERE "T1"."city" = 'new york city'