From: | David Johnston <david(dot)g(dot)johnston(at)gmail(dot)com> |
---|---|
To: | "Huang, Suya" <Suya(dot)Huang(at)au(dot)experian(dot)com> |
Cc: | "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: FW: SQL rolling window without aggregation |
Date: | 2014-12-09 05:47:46 |
Message-ID: | CAKFQuwaaKOmfpdbMV+OGSMxx7-5sKpSM+_w5L6pve9mGEWSR-Q@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Monday, December 8, 2014, Huang, Suya <Suya(dot)Huang(at)au(dot)experian(dot)com> wrote:
> -----Original Message-----
> From: pgsql-general-owner(at)postgresql(dot)org <javascript:;> [mailto:
> pgsql-general-owner(at)postgresql(dot)org <javascript:;>] On Behalf Of David G
> Johnston
> Sent: Monday, December 08, 2014 1:18 PM
> To: pgsql-general(at)postgresql(dot)org <javascript:;>
> Subject: Re: FW: [GENERAL] SQL rolling window without aggregation
>
> Huang, Suya wrote
> > It seems like it's not been sent to the SQL group, so I'm trying with
> > this group.
>
> Asked and answered...online archives follow
>
>
> http://postgresql.nabble.com/rolling-window-without-aggregation-td5829344.html#a5829345
>
> http://www.postgresql.org/message-id/1417764928965-5829345.post@n5.nabble.com
>
> David J.
>
>
>
>
> ============================================================================================================
> Thanks Dave. I was trying to avoid UNION...
>
>
>
Instead of avoiding things get something that works then ask whether there
is a better way to do things. At least that way you can provide a working
query that others can look at and know exactly what you need.
In this case you have a single table and want the result to have more rows
than the input - I'm not sure how anything but a union will accomplish that
goal. You have to generate those rows somehow. There may be better ways
of looking at your problem but you only gave us a toy model to play with.
David J.
From | Date | Subject | |
---|---|---|---|
Next Message | Anthony Nowocien | 2014-12-09 07:55:14 | Detecting corruption |
Previous Message | Huang, Suya | 2014-12-09 04:59:53 | Re: FW: SQL rolling window without aggregation |