// I'm using sequences for insreting in FluxDB:
'sever1,submeas=XXX AAA=899265',
'sever1,submeas=XXX BBB=2281289',
'sever2,submeas=XXX BBB=2672',
'sever2,submeas=XXX AAA=0',
'sever3,submeas=XXX AAA=947439',
'sever3,submeas=XXX BBB=897226'
// Flux query
from(bucket: "llc")
|> range(start: v.timeRangeStart, stop: v.timeRangeStop)
|> filter(fn: (r) => r["_measurement"] == "server1" or r["_measurement"] == "server2" or r["_measurement"] == "server3")
|> filter(fn: (r) => r["_field"] == "AAA" or r["_field"] == "BBB")
|> filter(fn: (r) => r["submeas"] == "XXX")
|> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)
|> yield(name: "mean")
// What should I do for AAA+BBB? I've tried just added this last condition, but It's not helped.
|> map(fn: (r) => ({r with _value: r.AAA + r.BBB}))
I've found solution in docs for https://docs.influxdata.com/