How long is the longest relationship?
select max ( year ) from personfriend
What is the name of that person?
select name from personfriend where year = ( select max ( year ) from personfriend )
Who is his friend?
select friend from personfriend where name = "Zach" and year = 12