I have this case: I'm interested in SQL Server 2008, to be able to assign a row to the records but to reset it to 1 every time a date changes in the query.
For example I have these data:
And I am interested in generating a consecutive one that behaves in the following way:
It should be noted that the dates will always be ordered ascending. I do not know if you can use ROW_NUMBER () for this. I hope you can help me.
Thank you in advance!