I am logging(every 1minute) the charging of an battery, and want to get a table of results where each result is just the max of each charging cycle. Is this possible with influxdb? If so can you give me some guidance?
Thanks.

I am logging(every 1minute) the charging of an battery, and want to get a
table of results where each result is just the max of each charging cycle.

Do you mean max, or do you mean sum?

In other words, are you looking for the maximum value of the measurement at
any point in the cycle, or do yu want to add up all the measurements during
one cycle?

Is this possible with influxdb?

Yes, I would think so.

If so can you give me some guidance?

How about select max(measurement) from datasource group by time(interval)

Replace “measurement” with whatever the field in your data source is named
Replace “datasource” with whatever the table containing the data is named
Replace “interval” with whatever the length of your charging cycle is (eg:
“1d”, judging from your example below)

Yes I would like the max. That mostly works, but could be better since the charge cycle is not regular. Here is an example of the current data:See that for a few times the times are the same so that is still the same saw wave data. So maybe there is a way to use a something like the difference between the points to determine to select or something?

select max(charge_energy_added) from charge_state group by time(12h) limit 100
name: charge_state
time max

See that for a few times the times are the same so that is still the same
saw wave data. So maybe there is a way to use a something like the difference
between the points to determine to select or something?

I cannot think of a way to do that - but maybe someone else here can.