Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 7B00A475D39 for ; Fri, 13 Sep 2002 10:37:02 -0400 (EDT) Received: from utahisp.com (unknown [66.239.12.3]) by postgresql.org (Postfix) with ESMTP id 1BE634759BD for ; Fri, 13 Sep 2002 10:37:01 -0400 (EDT) Received: from chad [63.230.8.76] by utahisp.com (SMTPD32-5.05) id A7B774D802F6; Fri, 13 Sep 2002 08:35:35 -0600 Message-ID: <009e01c25b32$d57ac340$32021aac@chad> From: "Chad Thompson" To: "Christopher Kings-Lynne" , "Rudi Starcevic" , References: Subject: Re: DISTINCT ON Date: Fri, 13 Sep 2002 08:35:39 -0600 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_009B_01C25B00.89F81620" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 X-Declude-Sender: chad@weblinkservices.com [63.230.8.76] X-Note: This E-mail was scanned by Declude JunkMail (www.declude.com) for spam. X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200209/135 X-Sequence-Number: 9412 This is a multi-part message in MIME format. ------=_NextPart_000_009B_01C25B00.89F81620 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable 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 standa= rd Thanks Chad ----- Original Message -----=20 From: "Christopher Kings-Lynne" To: "Rudi Starcevic" ; 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". >=20 > Chris >=20 > > -----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 > >=20 > >=20 > > Hi, > >=20 > > Just quickly, DISTINCT ON - Is that Postgresql only ? > > Thanks > >=20 ------=_NextPart_000_009B_01C25B00.89F81620 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
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
>s= hould=20 do what you want.  Something like:
>SELECT DISTINCT ON (att_2) att_1, att_2, att_3, att_4
>FROM= =20 table
>ORDER BY att_2, att_1 DESC;
I couldnt find anything in the docs, but i= t=20 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=20 PM
Subject: Re: [SQL] DISTINCT ON

> Don't know.  I've seen it elsewh= ere so it=20 might even be "standard".
>
> Chris
>
> >=20 -----Original Message-----
> > From:
pgsql-sql-owner@postgresql.org
>=20 > [mailto:pgsql-sql-owner@postgresql.org]On Behalf Of Rudi Starcevic
= >=20 > Sent: Friday, 13 September 2002 10:50 AM
> > To:
pgsql-sql@postgresql.org
> >=20 Subject: [SQL] DISTINCT ON
> >
> >
> > Hi,
= >=20 >
> > Just quickly, DISTINCT ON - Is that Postgresql only ?>=20 > Thanks
> >
 
 
------=_NextPart_000_009B_01C25B00.89F81620--