I want to give row number only to the combination when it appears in a consecutive manner like , Please guide on how to get this type of sequence numbering in Tsql
I have tried with
ROW_NUMBER() Over (Partition by name,Order_type Order by REC_TS)
where record REC_TS is the time of order.
Name: Order type: Seq Number:
AAA ONLINE 1
AAA ONLINE 2
AAA STORE 1
AAA SPOT 1
AAA STORE 1
AAA SPOT 1
AAA SPOT 2
AAA ONLINE 1