Re: DISTINCT ON
От | Chad Thompson |
---|---|
Тема | Re: DISTINCT ON |
Дата | |
Msg-id | 009e01c25b32$d57ac340$32021aac@chad обсуждение исходный текст |
Ответ на | Re: DISTINCT ON ("Christopher Kings-Lynne" <chriskl@familyhealth.com.au>) |
Список | pgsql-sql |
According to a recent thread Re: [SQL] Select the max on a field
Jeff Eckerman said:
>If you don't mind a non-portable feature, DISTINCT ON
>should do what you want. Something like:
>SELECT DISTINCT ON (att_2) att_1, att_2, att_3, att_4
>FROM table
>ORDER BY att_2, att_1 DESC;
>FROM table
>ORDER BY att_2, att_1 DESC;
I couldnt find anything in the docs, but it acording to this it isnt standard
Thanks
Chad
----- Original Message -----
From: "Christopher Kings-Lynne" <chriskl@familyhealth.com.au>
To: "Rudi Starcevic" <rudi@oasis.net.au>; <pgsql-sql@postgresql.org>
Sent: Thursday, September 12, 2002 8:48 PM
Subject: Re: [SQL] DISTINCT ON
> Don't know. I've seen it elsewhere so it might even be "standard".
>
> Chris
>
> > -----Original Message-----
> > From: pgsql-sql-owner@postgresql.org
> > [mailto:pgsql-sql-owner@postgresql.org]On Behalf Of Rudi Starcevic
> > Sent: Friday, 13 September 2002 10:50 AM
> > To: pgsql-sql@postgresql.org
> > Subject: [SQL] DISTINCT ON
> >
> >
> > Hi,
> >
> > Just quickly, DISTINCT ON - Is that Postgresql only ?
> > Thanks
> >
>
> Chris
>
> > -----Original Message-----
> > From: pgsql-sql-owner@postgresql.org
> > [mailto:pgsql-sql-owner@postgresql.org]On Behalf Of Rudi Starcevic
> > Sent: Friday, 13 September 2002 10:50 AM
> > To: pgsql-sql@postgresql.org
> > Subject: [SQL] DISTINCT ON
> >
> >
> > Hi,
> >
> > Just quickly, DISTINCT ON - Is that Postgresql only ?
> > Thanks
> >
В списке pgsql-sql по дате отправления: