A running total is a cumulative sum.
Example:
Day Sales 1 100 2 200 3 50
Running total:
100 300 350
SQL:
SUM(sales) OVER (
ORDER BY sale_date
ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW
)The important part is:
ORDER BY sale_date
because SQL needs to know the sequence.