3
Answers

calculate average consumption per area,it looks like it should work?

Ajay

Ajay

2y
621
1

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?

Answers (3)