Re: Cumulative count (running total) window fn - Mailing list pgsql-general

From Alban Hertroys
Subject Re: Cumulative count (running total) window fn
Date
Msg-id 05309593-C1F5-455B-A9F1-921097376511@solfertje.student.utwente.nl
Whole thread Raw
In response to Re: Cumulative count (running total) window fn  (Oliver Kohll - Mailing Lists <oliver.lists@gtwm.co.uk>)
List pgsql-general
On 29 Apr 2010, at 19:21, Oliver Kohll - Mailing Lists wrote:

> The two plans (note I've been rewriting the field names for readability until now but haven't here):
>
> explain analyze SELECT year, sum(c) over (order by year)
> FROM (
>   SELECT extract(year from a56b7a8d6de03f67b) AS year, count(a10e4ab8863c199f1) AS c
>   FROM a2e9a7e9e257153de
>   GROUP BY extract(year from a56b7a8d6de03f67b)
> ) as subq;

Oh my, how can you work with such column and table names? You and any colleagues you may have will probably appreciate
havinga few views over those tables that translate that gibberish to human readable stuff. You could go further and
makethose views updatable (by means of a few rules), but then you run the risk that colleagues start to hug you... 

Alban Hertroys

--
Screwing up is an excellent way to attach something to the ceiling.


!DSPAM:737,4bdaabce10411378620886!



pgsql-general by date:

Previous
From: Glyn Astill
Date:
Subject: pg_restore: [custom archiver] dumping a specific TOC data block out of order is not supported without ID on this input stream (fseek required)
Next
From: Ognjen Blagojevic
Date:
Subject: Re: Java Memory Issue while Loading Postgres library