I have the next table:

[![enter image description here](https://i.stack.imgur.com/IGbYT.png)](https://i.stack.imgur.com/IGbYT.png) 

Supposing these users are sort in descending order based on their inserted date.

Now, what I want to do, is to change their sorting numbers in that way that for each user, the sorting number has to start from 1 up to the number of appearances of each user. The result should look something like:

[![enter image description here](https://i.stack.imgur.com/aF5Kj.png)](https://i.stack.imgur.com/aF5Kj.png)

Can someone provide me some clues of how to do it in sql server ? Thanks.