select id, grp_factor, sum (id) over( partition by grp_factor order by id rows between unbounded preceding and current row ) running_sum from NUMBERS where ID <1000;
连续聚合在财务报表中应该再常见不过了。
时间: 2024-10-15 05:16:02
select id, grp_factor, sum (id) over( partition by grp_factor order by id rows between unbounded preceding and current row ) running_sum from NUMBERS where ID <1000;
连续聚合在财务报表中应该再常见不过了。