new ema function
This commit is contained in:
parent
ae32fe61ac
commit
05de094429
1 changed files with 3 additions and 1 deletions
|
@ -27,5 +27,7 @@ FROM generate_series($__timeFrom(), $__timeTo(), '1 minute'::interval) AS ts
|
||||||
) AS gi_next ON true
|
) AS gi_next ON true
|
||||||
WHERE gi_prev.time IS NOT NULL and gi_next.time IS NOT NULL AND gi_next.time <> gi_prev.time
|
WHERE gi_prev.time IS NOT NULL and gi_next.time IS NOT NULL AND gi_next.time <> gi_prev.time
|
||||||
)
|
)
|
||||||
SELECT ts as time, samp_value as value
|
SELECT ts as time,
|
||||||
|
public.ema(samp_value ::real, 0.33) over (order by ts asc) as smoothval,
|
||||||
|
samp_value as absvalue
|
||||||
FROM coallated;
|
FROM coallated;
|
||||||
|
|
Loading…
Add table
Reference in a new issue