dbr.running_total - Calculate running total for a column
select 'dbr.running_total', ColumnRef [, SourceColumnRef ]
A running total is the sum of any given column that is incremented/decremented row by row.
The command has two options. When only one parameter is given, the running total is calculated over the column given. If the second parameter is given, the column in the first parameter gets the running total of the second column's value. The running total can be used both in tabular reports and in charts.
A 'Running total' is a column that is calculated from the column itself and 'Running total 2' is a column that is calculated from 'Revenue'-column
select 'dbr.running_total', 'Running total'; select 'dbr.running_total', 'Running total 2', 'Revenue'; select revenue_month as 'Month', revenue as 'Revenue', revenue as 'Running total', null as 'Running total 2' from mydb.data;