Run Code  | API  | Code Wall  | Misc  | Feedback  | Login  | Theme  | Privacy  | Patreon 

Running total/ID groups based on specific value in TSQL

Language: Layout:
View schema
Execution time: 0,02 sec, rows selected: 10, rows affected: 10, absolute service time: 0,17 sec 
edit mode |  history
   ID Col1 GroupTotal Grp GroupID GrpID
1 1 1 1 1 1 1
2 2 2 1 1 2 2
3 3 2 1 1 3 3
4 4 1 2 2 1 1
5 5 2 2 2 2 2
6 6 3 2 2 3 3
7 7 3 2 2 4 4
8 8 1 3 3 1 1
9 9 3 3 3 2 2
10 10 1 4 4 1 1

    
                
λ
.NET NoSQL database for rapid development