【发布时间】:2021-11-26 19:19:40
【问题描述】:
create table boll as select
*, (avg(close) over win)-2*sqrt((avg(close*close) over win)-pow((avg(close) over win),2)) as BOLD,
(avg(close) over win)+2*sqrt((avg(close*close) over win)-pow((avg(close) over win),2)) as BOLU
from bhav
window win as (partition by isin order by timestamp rows 19 preceding);
使用上述查询,如果当前行之前的行数少于 19 行,是否可以通过窗口 win 的计算返回 NULL?
【问题讨论】:
标签: sql sqlite count average window-functions