Influx: doing math the same fields in different groups
问题 I have InfluxDB measurement currently set up with following "schema": +----+-------------+-----------+ | ts | cost(field) | type(tag) | +----+-------------+-----------+ | 1 | 10 | 'a' | | 1 | 20 | 'b' | | 2 | 12 | 'a' | | 2 | 18 | 'b' | | 2 | 22 | 'c' | +------------------+-----------+ I am trying to write a query that will group my table by timestamp and get a delta between field values of two different tags. If I want to get delta between tag 'a' and tag 'b', it will give me following