Re: [GENERAL] Cumulative (Running) Sum
On Mar 8, 4:46 pm, [EMAIL PROTECTED] (hubert depesz lubaczewski) wrote: > > you might find this > useful:http://www.depesz.com/index.php/2007/08/17/rownum-anyone-cumulative-s... > > please also read comments. > > depesz > This is very helpful. It sees that there's a way to do it without hacking it into the actual PG source, which I was tempted to do. Thanks, -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general
Re: [GENERAL] Cumulative (Running) Sum
On Fri, Mar 07, 2008 at 06:50:17AM -0800, Matt Culbreth wrote: > I might have missed this somewhere, but PostgreSQL doesn't presently > support the cumulative/running aggregate function SUM() OVER > (PARTITION BY) syntax that Oracle does, right? you might find this useful: http://www.depesz.com/index.php/2007/08/17/rownum-anyone-cumulative-sum-in-one-query/ please also read comments. depesz -- quicksil1er: "postgres is excellent, but like any DB it requires a highly paid DBA. here's my CV!" :) http://www.depesz.com/ - blog dla ciebie (i moje CV) -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general
Re: [GENERAL] Cumulative (Running) Sum
Matt Culbreth <[EMAIL PROTECTED]> writes: > I might have missed this somewhere, but PostgreSQL doesn't presently > support the cumulative/running aggregate function SUM() OVER > (PARTITION BY) syntax that Oracle does, right? Right. There are people interested in this, and it'll likely show up in 8.4 or later, but it doesn't exist now. (What's actually on the road map is the SQL:2003 windowing functions. I'm not sure the spec is exactly compatible with Oracle, but it definitely has this type of functionality.) regards, tom lane -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general