Hi everyone,
I am working on sql and I have a running total newRT. I need help with whenever the newRT is > 0 then create new column and add 10 and add zeros unitll it has reached 1000. When newRT has reached 1001 add 10 and add 0 until it has reached 2000. It should repeat the process until newRT has 0 left. I have used case and window function for running total.
the original data