Add stdddev samplinig

This commit is contained in:
Ryan Voots 2025-05-10 09:43:44 -04:00
parent 13f6c94fd0
commit dfd2238dfa

View file

@ -43,5 +43,9 @@ SELECT time, smoothval, absvalue,
FROM firstorder) FROM firstorder)
SELECT *, SELECT *,
ema(delta1st, 0.25) OVER (ORDER BY time ASC) as smoothdelta1st, ema(delta1st, 0.25) OVER (ORDER BY time ASC) as smoothdelta1st,
ema(delta2nd, 0.25) OVER (ORDER BY time ASC) as smoothdelta2nd ema(delta2nd, 0.25) OVER (ORDER BY time ASC) as smoothdelta2nd,
STDDEV(delta1st) OVER (
ORDER BY time
RANGE BETWEEN INTERVAL '6 hours' PRECEDING AND CURRENT ROW
) AS std_dev_delta1st
FROM secondorder; FROM secondorder;