human
Schema:
Person (name, age, city, gender, job)
PersonFriend (name, friend, year)
Please answer with SQL.
assistant
Sure, I understand.
human
Hi can you tell me in witch city does Alice live?
assistant
SELECT city FROM person WHERE name = 'Alice';
human
Great, how many males friends does she have?
assistant
SELECT COUNT( * ) FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.friend WHERE T2.name = "Alice" AND T1.gender = "male" ;