INFLUXDB 1.8
I would like the average value of electricity consumption over the last 7 days without the current day (today).
What I have:
SELECT difference(last(“Default”)) FROM “Zaehler180Bezug” WHERE $timeFilter GROUP BY time(1d,-1h) fill(null)
(and I divide this value by 7)
However, this distorts the result because the value for today is included in the calculation.
In the evening at 11:30 p.m. this is no longer so dramatic, but in the morning at 7:00 a.m. it distorts the result considerably.
Ask:
What should the query look like so that the current day is not taken into account and the difference between (current day - 8 days) and (current day - 1 day) is formed.