CREATE TABLE PersonFriend (friend VARCHAR, name VARCHAR, YEAR INT)

Who is the friend of Zach with longest year relationship?
SELECT friend FROM PersonFriend WHERE name = 'Zach' AND YEAR = (SELECT MAX(YEAR) FROM PersonFriend WHERE name = 'Zach')
SELECT "friend" FROM "PersonFriend" WHERE "YEAR" = (SELECT MAX("YEAR") FROM "PersonFriend" WHERE "name" = 'Zach') AND "name" = 'Zach'