Average hourly values from time series data

Is there any simple way how to create from time series data (electricity consumption) hourly averages over longer period of time (i.e. average consumption in last month for 0-1 am, 1-2 am, 2-3 am, … covering whole day).
Thanks for any hint how to tackle this…

I would post that question to https://community.influxdata.com/ and include the exact version of InfluxDB that you are using and which language (InfluxQL or Flux). Am pretty sure it will be possible to write a query to do what you want.