Hi
I need help with mysql query
select city, sum(sub.area_consumption) from (
select city, sum(amount_streetlight) / consumption as area_consumption
from MuniLEIMS.statisticalreport
group by city, area
) as sub
group by sub.city
I'm trying to calculate average consumption per area (every city has many areas)
it looks like it should work?