What is the maximum length of friendships with Alice?
select max(year) from personfriend where friend = 'Alice'
Who holds a relationship of that length?
select t1.name from person as t1 join personfriend as t2 on t1.name = t2.name where t2.friend = 'Alice' and t2.year = (select max(year) from personfriend where friend = 'Alice')
Also show age and job title.
select t1.name, t1.age, t1.job from person as t1 join personfriend as t2 on t1.name = t2.name where t2.friend = 'Alice' and t2.year = (select max(year) from personfriend where friend = 'Alice')