Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Re: SQL to retrieve all distinct records

Re: SQL to retrieve all distinct records

From: Jocke Treugut <treugut_tuning_at_yahoo.se>
Date: Thu, 15 Apr 2004 15:54:49 +0200 (CEST)
Message-ID: <20040415135449.69031.qmail@web21001.mail.yahoo.com>


Hi, Alison!

It looks like you want the smallest value for C (from your example with SYS and SYS2). If that is correct

SELECT a, b, MIN( c ) FROM testing GROUP BY a, b;

should work.

Cheers / Jocke Treugut

www.treugut-tuning.com

Höstrusk och grå moln - köp en resa till solen på Yahoo! Resor på adressen http://se.docs.yahoo.com/travel/index.html



Please see the official ORACLE-L FAQ: http://www.orafaq.com

To unsubscribe send email to: oracle-l-request_at_freelists.org put 'unsubscribe' in the subject line.
--

Archives are at http://www.freelists.org/archives/oracle-l/ FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html
Received on Thu Apr 15 2004 - 09:07:16 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US