Re: [GENERAL] Cumulative (Running) Sum

2008-03-09 Thread Matt Culbreth
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

[GENERAL] Cumulative (Running) Sum

2008-03-08 Thread Matt Culbreth
Hello Group, 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? Here's an example of what I'm talking about: Say we have a table of sales by month person. We want to

Re: [GENERAL] Cumulative (Running) Sum

2008-03-08 Thread Tom Lane
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

Re: [GENERAL] Cumulative (Running) Sum

2008-03-08 Thread hubert depesz lubaczewski
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: