perf improvement to not use subqueries for the city avg.