Hello,
I am completely new with InfluxDB. I have a database with one measurement
which has a tag key = station with 4 tag values and a tag key = typeof
with two tag values: real and forecast. I have values with a period of 1
minute for the tag value real and values with a period of 15 minute for the
tag value forecast.
The goal is:
- First to get series which is the sum on the 4 stations of the values at
one timestamp.
- Then for the tag value real do the average on 15 minutes to get 15
minutes values.
- Finally do the difference between tag with real and tag with forecast.
Can I do this in one query? If not what is the way to perform that in
InfluxDB.
I did the first 2 steps like that:
for the real tag:
select 4*mean("value") from "puissance.electricite" where station =~
/fmv.hydro.*/ and "typeof" = 'real' and time < now() and time > now() - 2w
group by time(15m)
for the forecast tag:
select sum("value") from "puissance.electricite" where station =~
/fmv.hydro.*/ and "typeof" = 'forecast' and time < now() and time > now() -
2w group by time(15m)
And I want to do the difference of this 2 queries.
I know that kapacitor or continues queries can do these kind of things. I
tried without success.
Thank you for your help,
wug
--
Remember to include the InfluxDB version number with all issue reports
---
You received this message because you are subscribed to the Google Groups
"InfluxDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/influxdb.
To view this discussion on the web visit
https://groups.google.com/d/msgid/influxdb/d3649745-e6f0-4c77-a4c9-8732bbc2e492%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.