Who has the longest-running friend?
select name from personfriend order by year desc limit 1
Who has more than 1 friend?
select name from personfriend group by name having count(*) > 1
Who has no friends?
select name from person where name not in (select name from personfriend)
Who has exactly 1?
select name from personfriend group by name having count(*) = 1