I am new to InfluxDB and I am struggling with visualising energy consumption per month. I read that InfluxDB doesn’t support group by time(month) so I am trying to test another solution to get my consumption per month.
For now, I am doing this with group by time(30d) but it just returned dataset from 30days until now (which is normal). So it is not regular value…
So I read about writing a continuous query in order to retrieve each monthly consumption from counters in another table.
But I don’t know what is the correct request that I have to implement.
For example if I want all data from June, I can write :
SELECT max("value") - min("value") FROM "counters_table" WHERE ("machine" = 'counter1' AND "tag_name" = 'Index' AND time >= '2019-06-01' and time <= '2019-06-31')
But if I want to have a continous query that can exec this command for each month, I don’t know how to replace the
WHERE time condition
Do you have any idea ?