Hi all, i need migrate my query from influxql to flux. I need to generate histogram to calculate Power consuption grouped by day.
Actually (i don’t know if is the best way) i’m using this query in influxql language.
SELECT mean("mean")*24 FROM (SELECT mean("pdc_pt_in_w") FROM "KWh" WHERE ("pdc_pt_prod_acs" = 0 AND "pdc_pt_defrosting" = 0) AND $timeFilter GROUP BY time(10s) fill(0) tz('Europe/Rome') ) GROUP BY time(1d) fill(0) tz('Europe/Rome')
who helps me to generate the exact same query in Flux language format?
Hello @TheMiloNet,
I had to make some assumptions primarily that the following are all fields:
pdc_pt_defrosting, pdc_pt_prod_acs, and pdc_pt_in_w
The translation of:
SELECT mean("mean")*24 FROM (SELECT mean("pdc_pt_in_w") FROM "KWh" WHERE ("pdc_pt_prod_acs" = 0 AND "pdc_pt_defrosting" = 0) AND $timeFilter GROUP BY time(10s) fill(0) tz('Europe/Rome') ) GROUP BY time(1d) fill(0) tz('Europe/Rome')