CREATE TABLE personfriend (name CLOB, friend CLOB, year NUMBER)
CREATE TABLE person (name CLOB, age NUMBER, city CLOB, gender CLOB, job CLOB)

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