On Wed, 29 Jul 2009, Adler, Eliedaat wrote:

> SQL/sqlite challenge  for all:

   No challenge for anyone who knows SQL.

> I need a running sum of size that works regardless of what order the objects 
> are in.
> User Function/Aggregates welcome!

   _All_ implementations of SQL include a suite of aggregate functions, and
SUM() is among those. Take a look at the SQLite Web site, Mike Owens's book,
Rick van der Lans's book, or any introduction to SQL.

   You will write, "SELECT filename, date, owner, size, SUM(size) AS total
                        FROM mytable;"

Rich

-- 
Richard B. Shepard, Ph.D.               |  Integrity            Credibility
Applied Ecosystem Services, Inc.        |            Innovation
<http://www.appl-ecosys.com>     Voice: 503-667-4517      Fax: 503-667-8863
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to