Using WITH OVER or by using other method, how to start new sequence number for another group of records?
It is SQL Server 2005.
E.g. how to get following ouput (I am talking about RowNum column in expected output)?
Table:
id name
100 A
200 B
300 C
200 B
200 B
Expected ouput:
RowNum id
1 100
1 200
2 200
3 200
1 300