[
From MySQL Developer Zone]
Today, Lenz was putting together some stats on PlanetMySQL feeds added since January this year, and asked in an email whether he should include totals in the stats. I responded yes, and offered a quick SQL solution to get those numbers out of the database. I thought it might be useful for others, so here goes...
The article continues at
http://dev.mysql.com/tech-resources/articles/rolling_sums_in_mysql.html