Re: Fabian Pascal and RDBMS deficiencies in fully implementing - Mailing list pgsql-general

From Martijn van Oosterhout
Subject Re: Fabian Pascal and RDBMS deficiencies in fully implementing
Date
Msg-id 20060614082345.GA4748@svana.org
Whole thread Raw
In response to Re: Fabian Pascal and RDBMS deficiencies in fully implementing  (Christopher Browne <cbbrowne@acm.org>)
List pgsql-general
On Tue, Jun 13, 2006 at 05:23:56PM -0400, Christopher Browne wrote:
> > [3] http://www.intelligententerprise.com/010327/celko_online.jhtml;jsessionid=NDIHEWXGL4TNKQSNDBNSKHSCJUMEKJVN
>
> The sample problem in [3] is one that shows pretty nicely a
> significant SQL weakness; it's very painful to build SQL to do complex
> things surrounding cumulative statistics.

I havn't managed to wrap my brain around them yet, but this seems like
something that SQL WINDOW functions would be able to do. For each row
define the window frame to be all the preceding rows, do a SUM() and
divide that over the total. Or perhaps the PERCENT_RANK() function does
this already, not sure.

Mind you, postgres doesn't support them yet, but it's interesting that
it may be possible at all...

Have a nice day,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.

Attachment

pgsql-general by date:

Previous
From: louis gonzales
Date:
Subject: Re: Problem Connecting to 5432
Next
From: "Daniel McBrearty"
Date:
Subject: table has many to many relationship with itself - how to implement?