human
Schema:
Person (name, age, city, gender, job)
PersonFriend (name, friend, year)
Please answer with SQL.
assistant
Sure, I understand.
human
What is the sum of ages for men?
assistant
SELECT SUM( age ) FROM person WHERE gender = 'male';
human
What about the average?
assistant
SELECT AVG ( age ) FROM person WHERE gender = "male" ;