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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Help with Select Distinct

Re: Help with Select Distinct

From: Brian Dick <bdick_at_home.com>
Date: Wed, 28 Nov 2001 19:48:59 GMT
Message-ID: <LcbN7.20133$Xb7.157839@news1.wwck1.ri.home.com>


select first_name, last_name, min(grades) from students
group by first_name, last_name

"Tuan Nguyen" <tnguyen_at_at-macktech-dot.com> wrote in message news:u0j80u4qo0kcj0jk97a6hg4puo97qai5v2_at_4ax.com...
> Hi all
>
> Supposed I have a table called STUDENTS with these type of data
>
>
> SQL> select * from STUDENTS;
>
> FIRST_NAME LAST_NAME GRADES
> ------------------------ ------------------------- ----------
> Cody Scow 90
> David Allen 84
> Cody Scow 79
> Joe Abad 92
>
> SQL>
>
> How would I select from this table so I would only get one Cody Scow
> with the lower grade returned? Something like
>
>
> FIRST_NAME LAST_NAME GRADES
> ------------------------ ------------------------- ----------
> Cody Scow 79
> David Allen 84
> Joe Abad 92
>
> Thanks for any help!!!
>
> -Tuan
>
Received on Wed Nov 28 2001 - 13:48:59 CST

Original text of this message

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