# cumsum\_asc

relationalai.semantics.std.aggregates

```python
cumsum_asc(*args: AggValue) -> Aggregate
```

Compute cumulative sum in ascending order.

All arguments except the last are ordering keys (sorted ascending).
The last argument is the value to accumulate.

## Parameters

- `*args` (`AggValue`, default: `()`) - One or more ordering keys followed by the value to accumulate. For example, `cumsum_asc(key, value)` computes a cumulative sum of `value` ordered ascending by `key`.

## Returns

- `Aggregate` - An `Aggregate` representing the cumulative sum computation.

## Examples

Get running tally of points earned over rounds, grouped by player:

```python
select(
    Player.name, Player.round, cumsum_asc(Player.round, Player.round.points).per(Player)
)
```
