CREATE TABLE personfriend (name TEXT, friend TEXT, year DECIMAL)
CREATE TABLE person (name TEXT, age DECIMAL, city TEXT, gender TEXT, job TEXT)

What are the names of everybody 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