Task: Text to Code
Input (English): Step 1: find the average Height of each value of Sex in people table.
Step 2: find Sex of people table with largest value in the results of step 1
Output (English): SELECT Sex FROM people GROUP BY Sex ORDER BY Avg ( Height ) Desc LIMIT 1