blob: d9973182cc841dbcd8601d6b6b37c797b0fe89bb [file] [log] [blame]
create table mytable1 (
mytime timestamp,
string1 string);
create table t1_n44 as
select
sum(bound3) OVER (PARTITION BY string1 ORDER BY mytime) as bound1
from (
select
string1, mytime,
lag(mytime) over (partition by string1 order by mytime) as bound3
from mytable1
) sub;