CREATE TABLE PersonFriend (name VARCHAR)

Find the person who has exactly one friend.
SELECT name FROM PersonFriend GROUP BY name HAVING COUNT(*) = 1
SELECT "name" FROM "PersonFriend" GROUP BY "name" HAVING COUNT(*) = 1