3

Cannot find per the docs, and there is an old issue related to this.

It is possible to subtract the results of 2 queries?

Something like this in SQL:

(SELECT COUNT(*) FROM test - (SELECT COUNT(*) FROM test WHERE …)
double-beep
  • 5,031
  • 17
  • 33
  • 41
Eyal Cohen
  • 1,188
  • 2
  • 15
  • 27

1 Answers1

3

As far as I know, currently it is not possible (at least not with InfluxQL).

It should, however, be possible with their new query language called Flux (as of InfluxDB1.7)

https://docs.influxdata.com/flux/v0.24/introduction/getting-started/