CREATE TABLE competition_record (competition_id DECIMAL, farm_id DECIMAL, rank DECIMAL)
CREATE TABLE city (city_id DECIMAL, official_name TEXT, status TEXT, area_km_2 DECIMAL, population DECIMAL, census_ranking TEXT)
CREATE TABLE farm_competition (competition_id DECIMAL, year DECIMAL, theme TEXT, host_city_id DECIMAL, hosts TEXT)
CREATE TABLE farm (farm_id DECIMAL, year DECIMAL, total_horses DECIMAL, working_horses DECIMAL, total_cattle DECIMAL, oxen DECIMAL, bulls DECIMAL, cows DECIMAL, pigs DECIMAL, sheep_and_goats DECIMAL)

Give the average number of working horses on farms with more than 5000 total horses.
SELECT AVG(working_horses) FROM farm WHERE total_horses > 5000
SELECT AVG("working_horses") FROM "farm" WHERE "total_horses" > 5000