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;
I couldnt find anything in the docs, but it acording to this it isnt standard
Thanks
Chad
----- Original Message -----
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
> >