Task: Text to Code
Input (English): Step 1: find rows in Person table whose gender equals male.
Step 2: find each value of city the results of step 1 along with the average age of the corresponding rows to each value
Output (English): SELECT Avg ( age ) , city FROM Person WHERE gender = "male" GROUP BY city