CREATE TABLE PersonFriend (name VARCHAR, friend VARCHAR)
CREATE TABLE Person (name VARCHAR, city VARCHAR)

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" AS "T1" JOIN "PersonFriend" AS "T2" ON "T1"."name" = "T2"."friend" WHERE "T1"."city" = 'new york city'