I have results from a horse race and want to have the rolling win count for the start of each race. This is what I currently have:
| Horse | Position |
|---|---|
| A | 4 |
| A | 1 |
| A | 3 |
This is what I'm after
| Horse | Position | Wins |
|---|---|---|
| A | 4 | 0 |
| A | 1 | 0 |
| A | 3 | 1 |
So when horse A started the second race it had 0 wins but when it started the third race is had 1 win