on 02-08-2019 1:35 PM
I have a table with columns a and b
Column a contains values 1,2,3,4
Expected output in column b is
1,3,6,10
How to achieve this via hana sql
Hi Nagendra,
To calculate the running total, use an OVER clause and adds the column which you want to calculate the running total for..
Select a, sum(a) over (order by a) as b from tablename
Thanks
Dinesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
88 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.