How can I create a column with a sequence for every new id

I need to create a column that counts sequentially an ID column and re-starts the counting every time the column has a new ID. Something as shown in the image, do you know if there is a way to do that?

4df16dfa-a25f-46ec-933f-b3984c133a00.png
0 1 685
1 REPLY 1
Top Labels in this Space
Top Solution Authors