cumulative_sum(count(“Name”)) but count by different content

In Grafana i use a database called test

there is a field called name

and in the name are differnts name like Joe, jane, jack usw. with other information about

i would like to count and get the sum how many time there is a joe, jane and jack int the database

i am able to count

SELECT cumulative_sum(count(“Name”)) FROM “test” WHERE $timeFilter GROUP BY time($__interval) fill(null)

but it just count all!
(count(“Name”)) is there a way to count theme separate

InfluxDB shell version: 1.8.6
have a nice day

Try changing “group by time($__interval)” to “group by name,time($__interval)”

Incidentally, is there a reason why you use “cumulative_sum(count(…))”
instead of just “count(…)”? I’m not sure that I see what the sum() is


Hello Antony
thanks for the fast feedback.

in Grafana
i can only choose

group by +

Go into the Query Editor and you can make the query say whatever you want it
to :slight_smile:

Just don’t switch back to the “standard mode” or it’ll throw away your manual


only to use count it count by day if i use the cumulative_sum it add to max sume in the selected time periode.
and to put the name in front of the time, makes no difference

no it is not working, the graph stay empty!
maybe i should not put different node Red output into the same MEASUREMENTS- maybe each output should be put in his own MEASUREMENTS and only in the Graph combined