msum is an aggregate function, it can not be used with '*'.
I have tried using msum with variable window according to the function as under but it always give me an error " window must be at least 2 "
please help me.
This is my stream table.
share streamTable(1:0, `ts`symbol`price`vol`time, [TIMESTAMP,SYMBOL,DOUBLE,DOUBLE,TIMESTAMP]) as ip1
This is my normal table.
t3 = select *,mod(minute(ts),5)+2 as v1 from ip1
This gives an error
select *,mod(minute(ts),5), msum(vol,int(mod(minute(ts),5)+2)) from ip1
select mod(minute(ts),5), msum(vol,int(mod(minute(ts),5)+2)) from ip1
This also gives error
select *, msum(vol,int(v1)) from t3
select msum(vol,int(v1)) from t3
Basically I want variable value of window based on mod with ts.