The implementation of Oracle row result total is mainly applied to the collection of date results. The following is the specific implementation code.
With AA as (
select ‘A’ tNo , 10 B from dual
select ‘B’ , 20 from dual
select ‘A’ , 30 from dual
select tNo , sum(B) over (partition by B order by B rows unbounded preceding) sumsal from AA
You can also write rows 2 preceding, that is, count to the fifth line.