Re: SQL to retrieve all distinct records

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

Other related posts: