Hi for all,
I have measurement with structure:
And tag variavel
My select:
SELECT "v1","v2" FROM (SELECT last("value") as "v1" FROM "industriaopc" WHERE "variavel" = 'a110_003_0_FY_DACA_PV'), (SELECT last("value") as "v2" FROM "industriaopc" WHERE "variavel" = 'a110_001_0_FIC_DACA_PV')
Produces two lines v1 and v2:
How to use sum or subtraction or multi in v1 and v2?
This select:
SELECT ("v1"+"v2") FROM (SELECT last("value") as "v1" FROM "industriaopc" WHERE "variavel" = 'a110_003_0_FY_DACA_PV'), (SELECT last("value") as "v2" FROM "industriaopc" WHERE "variavel" = 'a110_001_0_FIC_DACA_PV')
Reproduces: