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: simple (not for me) question

Re: simple (not for me) question

From: Mark C. Stock <mcstockX_at_Xenquery>
Date: Thu, 18 Aug 2005 07:47:31 -0400
Message-ID: <n4idnXhBbILI6JneRVn-tg@comcast.com>

"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

Original text of this message

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