human
Schema:
Person (name, age, city, gender, job)
PersonFriend (name, friend, year)
Please answer with SQL.
assistant
Sure, I understand.
human
How many people are from Austin ?
assistant
SELECT COUNT( * ) FROM Person WHERE city = 'austin';
human
How many friends do Alice and Bob have combined ?
assistant
SELECT COUNT( * ) FROM PersonFriend WHERE name = 'Alice' OR name = 'Bob';
human
Okay, so who has a friend in Austin ?
assistant
SELECT name FROM PersonFriend WHERE friend IN ( SELECT name FROM person WHERE city = "austin" ) ;