hi all,
I’m facing a strang behaviour when downsampling in a continuous query.
I don’t have the same results if run a query with the CQ or with the command line…
I have 10 minutes data :
|2020-09-22T18:30:00|0,00|
|2020-09-22T18:40:00|0,00|
|2020-09-22T18:50:00|0,00|
|2020-09-22T19:00:00|2,40|
|2020-09-22T19:10:00|1,80|
|2020-09-22T19:20:00|3,00|
|2020-09-22T19:30:00|2,40|
|2020-09-22T19:40:00|0,60|
which I have to average in quarter data with the CQ.
so I tried with the cq
- cq_my_eau_mean_15min CREATE CONTINUOUS QUERY cq_my_eau_mean_15min ON eau
BEGIN SELECT mean() INTO eau.“15m”.:MEASUREMENT FROM eau.“1s”././ GROUP BY
time(15m) END
and with the query :
- SELECT mean(“precipitation”) FROM “eau”.“1s”.“meteorologie” GROUP BY time(15m)
And results are different
In the following data, the 1st column is the cq result and the second is the mean query:
|2020-09-22T18:30:00|0,00|0,00|
|2020-09-22T18:45:00|0,00|0,00|
|2020-09-22T19:00:00|1,20|2,10|
|2020-09-22T19:15:00|2,40|3,00|
|2020-09-22T19:30:00|3,00|1,50|
|2020-09-22T19:45:00|0,60|0,00|
|2020-09-22T20:00:00|0,00|0,00|
the mean query is as expect and not the cq.
at 19:15 I get the data from 19:00 and 19:10 => 1.8 + 2.4 = 4.2 / 2 => 2.1 saved at 19:00
at 19:30 I get only data from 19:20 => 3.0 saved at 19:30
it’s look like the cq did :
at 19:15, get data from 18:50 and 19:00 => 0.0 + 2.4 = 2.4 / 2 => 1.2 saved at 19:00
at 19:30, get data from 19:10 and 19:20 => 1.8 + + 3 = 4.8/2 => 2.4 saved at 19:15
Any idea why this difference ?