How to add previous value (Sum)

select *,sum(weight) over(order by turn) as name from table_name



Comments