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);
With the above query, is there a way to return NULL from calculations over window win if there are less than 19 rows preceding the current?