T-SQL: Running Total or Replace Text with Running Variable in Groups


Running total in groups:

Running text replace in groups:

Get the result:

Keep it simple :-)