pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Chad Thompson <chad@weblinkservices.com>
To: Christopher Kings-Lynne <chriskl@familyhealth.com.au>
To: Rudi Starcevic <rudi@oasis.net.au>
To: pgsql-sql@postgresql.org
Subject: Re: DISTINCT ON
Date: Fri, 13 Sep 2002 08:35:39 -0600
Message-ID: <009e01c25b32$d57ac340$32021aac@chad> (raw)
References: <GNELIHDDFBOCMGBFGEFOMEDICEAA.chriskl@familyhealth.com.au>

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 ----- 
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
> > 

view thread (9+ messages)  latest in thread

Message-ID: <009e01c25b32$d57ac340$32021aac@chad>
Permalink:  ../009e01c25b32$d57ac340$32021aac@chad/
Also on:    postgresql.org/message-id/009e01c25b32$d57ac340$32021aac@chad

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: chad@weblinkservices.com, chriskl@familyhealth.com.au, rudi@oasis.net.au
  Subject: Re: DISTINCT ON
  In-Reply-To: <009e01c25b32$d57ac340$32021aac@chad>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox