human
Schema:
Person (name, age, city, gender, job)
PersonFriend (name, friend, year)
Please answer with SQL.
assistant
Sure, I understand.
human
What is the name that only has one friend pairing?
assistant
SELECT name FROM PersonFriend GROUP BY name HAVING COUNT( * ) = 1;
human
How many times does Alice show up in the friend column?
assistant
SELECT COUNT( * ) FROM PersonFriend WHERE friend = 'Alice';
human
How many times does Bob show up in the friend column?
assistant
SELECT COUNT( * ) FROM PersonFriend WHERE friend = "Bob" ;