Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Help with Select Distinct
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
![]() |
![]() |