I would like to script a running count or cumulative sum of repeated values within a column.
For example, first appearance should equal 1, max value of count by value specified should equal the cumulative sum of the value within the column.
| color | count_color |
|---|
| RED | 1 |
| RED | 2 |
| BLUE | 1 |
| YELLOW | 1 |
| RED | 3 |
Ideally, the output for :count_color would not need the data table to be sorted by :color
Thanks.