List:MySQL++« Previous MessageNext Message »
From:Kerry Frater Date:November 21 2006 7:30am
Subject:Running Totals with MySQL
View as plain text  
I need to keep a running total (not an aggregate) based on data in two
columns e.g.
a   b   calculated_col
100    -10   90
50     10    150
-10    -20   120

the rows are selected on certain WHERE criteria and so the running total is
not fixed data. The running total is for display on the screen.
Doing this work in the language interfacing with MySQL is causing some odd
side effects so I was hoping to do the work on the MySQL side instead.


Exception of type std::length_errorMathieu Pagé13 Nov
  • Re: Exception of type std::length_errorWarren Young14 Nov
    • Re: Exception of type std::length_errorMathieu Pagé14 Nov
Re: Exception of type std::length_errorMathieu Pagé19 Nov
  • Re: Exception of type std::length_errorWarren Young20 Nov
    • Running Totals with MySQLKerry Frater21 Nov
      • RE: Running Totals with MySQLKerry Frater21 Nov
      • Re: Running Totals with MySQLWarren Young22 Nov
        • RE: Running Totals with MySQLKerry Frater28 Nov