How to "reset" running SUM after it reaches a threshold?

Viewed 8562

I wrote a query that creates two columns: the_day, and the amount_raised on that day. Here is what I have:

enter image description here

And I would like to add a column that has a running sum of amount_raised:

enter image description here

Ultimately, I would like the sum column to reset after it reaches 1 million.

The recursive approach is above my pay grade, so if anyone knows a way to reset the sum without creating an entirely new table, please comment (maybe with a RESET function?). Thank you

2 Answers
Related