Task: Text to Code
Input (English): find the average Total_Horses in farm table whose Sheep_and_Goats greater than 5000
Output (English): SELECT Avg ( Total_Horses ) FROM farm WHERE Sheep_and_Goats > 5000