Accumulative total for the last day (From 00:00:00 to 23.:59:59) (InfluxDB 1.8)

I need the accumulative total per day in me time series graph, I believe the GROUP BY time(1d) should do this, the error I get is ‘InfluxDB Error: GROUP BY requires at least one aggregate function’

Help will be appreciated

My query:

SELECT sensor1 FROM counts WHERE dev='counter1' AND $timeFilter GROUP BY time(1d) fill(null)

Total sensor1 per day? so you might need count(sensor1) there or avg or sum

1 Like

Sum seems to be correct, if I use count it counts all the sensor1 and ignores the “WHERE dev=‘counter1’”, as I have ‘counter1’, ‘counter2’, ‘counter3’, ‘counter4’ (Hope my statement I make is correct :slight_smile: )

1 Like