Rolling Sums in SQL - A Practical Example

Thursday Jun 21st 2007 by DatabaseJournal.com Staff
Share:

Rolling sums (or averages) are a way to include a running, or rolling, aggregate of certain columns in the output of your SQL. Read on to learn a quick SQL solution to get those numbers out of the database.

[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

Share:
Home
Mobile Site | Full Site
Copyright 2017 © QuinStreet Inc. All Rights Reserved