Extending this Using InfluxDB difference function a bit further, I have
select difference("e") from Energy where time >= now() - 24h
or
select difference("e") from Energy where time >=
'2020-04-14T00:00:01Z' and time <= '2020-04-15T20:00:01Z'
both working where the time search only covers 2 datapoints for the subtraction.
But how do I achieve this in a python script? The best I have is
response = client.query(select difference("e") from Energy where time
>= now() - 24h)
but it returns an Invalid syntax error. Any clues to implement difference() in python?