human
Schema:
Person (name, age, city, gender, job)
PersonFriend (name, friend, year)
Please answer with SQL.
assistant
Sure, I understand.
human
Can you please tell me who the friends of Alice's friends are?
assistant
SELECT DISTINCT T4.name FROM PersonFriend AS T1 JOIN Person AS T2 ON T1.name = T2.name JOIN PersonFriend AS T3 ON T1.friend = T3.name JOIN PersonFriend AS T4 ON T3.friend = T4.name WHERE T2.name = 'Alice' AND T4.name ! = 'Alice';
human
What city does Zach live in?
assistant
SELECT city FROM person WHERE name = 'Zach';
human
What are the names of everyone else who lives in Austin?
assistant
SELECT name FROM person WHERE city = "austin" ;