Hello @franck102,
It’s good to see you back!
hmm its been so long since I’ve used InfluxQL lol. Most of our users use 2.x and Flux now.
are Infra_cumulus, Infra_rad, Infra_sdb all fields?
I think it would look like:
SELECT sum_1 + sum_2
(SELECT SUM("field1") AS sum_1, SUM("field2") AS sum_2 FROM iota_06.rt_energy.energy WHERE time >= now() - 24h and time <= now() fill(0))
But I’m not 100% sure…(yikes it’s been a while) Can you please give it a try and let me know?
Alternatively if you’re using 1.x, then you can try the following flux query (just fyi).
from(bucket: "energy ")
|> range(start:-24h)
|> filter(fn: (r) => r["_measurement"] == " iota_06.rt_energy")
|> filter(fn: (r) => r["_field"] == "field1" or r["_field"] == "field2")
|> group()
|> sum()