I’m in need of a query that returns data points or the interpolation of two points at specified time intervals within a time range. Is something like this already possible using existing InfluxQL, or would a new selector function need to be created?
Example Data Set:
time ...... value
----------------------------
10 ........ 2.5
15 ........ 2.7
20 ........ 2.9
25 ........ 2.4
Possible query:
SELECT INTERP(value,linear) FROM dataset WHERE time>=11 AND time <=21 GROUP BY time(5s,1s)
Desired Result:
time ...... interp
------------------------------
11 ........ 2.54
16 ........ 2.74
21 ........ 2.80
Another query:
SELECT INTERP(value,previous) FROM dataset WHERE time>=11 AND time<=21 GROUP BY time(5s,1s)
Desired Result:
time ...... interp
------------------------------
11 ........ 2.5
16 ........ 2.7
21 ........ 2.9
I’m pretty sure my second example could already be accomplished through the use of LAST and fill(previous).
Thanks!