cumsum_asc
relationalai.semantics.std.aggregates
cumsum_asc(*args: AggValue) -> AggregateCompute cumulative sum in ascending order.
All arguments except the last are ordering keys (sorted ascending). The last argument is the value to accumulate.
Parameters
(*argsAggValue, default:()) - One or more ordering keys followed by the value to accumulate. For example,cumsum_asc(key, value)computes a cumulative sum ofvalueordered ascending bykey.
Returns
Aggregate- AnAggregaterepresenting the cumulative sum computation.
Examples
Get running tally of points earned over rounds, grouped by player:
select( Player.name, Player.round, cumsum_asc(Player.round, Player.round.points).per(Player))Referenced By
RelationalAI Documentation └── Release Notes └── Python API Release Notes ├── What’s New in Version 1.0.13 │ └── New Features and Enhancements └── What’s New in Version 1.5.0 └── Bug Fixes