Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: simple (not for me) question
"Kleist" <kleist_at_tlen.pl> wrote in message news:de1lcu$3l2$1_at_news.uar.net...
> Hello,
>
> I have a table like this:
>
> ID | prod_nr | rate
> ----|----------|------------
> 1 | 23 | 8
> 2 | 29 | 11.3
> 3 | 230 | 3
> 4 | 23 | 16.2
> 5 | 23 | 4
>
> I am new in sql, and don`t know how to get list of
> ID's for distinct list of prod_nr. I need to have the result like this.
>
> res_id
> -------
> 1
> 2
> 3
>
> Thanks in advance for any clue in this question
what have you tried?
what version of oracle are you using?
you're not just looking for a list of IDs, you appear to be looking for a list of minimum ID for each prod_nr
have you tried the GROUP BY clause?
++ mcs Received on Thu Aug 18 2005 - 06:47:31 CDT
![]() |
![]() |