I have a table that looks like this
| id |
|---|
| 1 |
| 2 |
| 4 |
| 5 |
| 6 |
| 10 |
| 11 |
So a bunch of consecutive values, an unknown number of absent fields and then other consecutive values. What I am trying to achieve is to get
| id | stint |
|---|---|
| 1 | 0 |
| 2 | 0 |
| 4 | 1 |
| 5 | 1 |
| 6 | 1 |
| 10 | 2 |
| 11 | 2 |
By incrementing every time the number of the stint, which I can later use for summing over other columns. Is it possible? Thanks