On Fri, Jan 16, 2009 at 12:23:16PM -0500, Jaime Casanova wrote:
> On Fri, Jan 16, 2009 at 12:07 PM, David Fetter wrote:
> >>
> >> Now i want only 3 records for every typ:
> >>
> >> test=# select typ, ts, rank() over (partition by typ order by ts desc )
> >> from foo where rank <= 3;
> >> ERROR:
On Fri, Jan 16, 2009 at 12:07 PM, David Fetter wrote:
>>
>> Now i want only 3 records for every typ:
>>
>> test=# select typ, ts, rank() over (partition by typ order by ts desc )
>> from foo where rank <= 3;
>> ERROR: column "rank" does not exist
>> LINE 1: ...rtition by typ order by ts desc )
On Thu, Jan 15, 2009 at 03:06:47PM +0100, A. Kretschmer wrote:
> Hi,
>
> first, many thanks to all for the great work, i'm waiting for 8.4.
>
>
> I have played with the new possibilities:
>
> test=# select typ, ts, rank() over (partition by typ order by ts desc ) from
> foo;
> typ |