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

Home -> Community -> Usenet -> c.d.o.server -> Re: sql question - distinct

Re: sql question - distinct

From: <soalvajavab1_at_yahoo.com>
Date: 28 Nov 2006 15:45:46 -0800
Message-ID: <1164757546.190931.6020@80g2000cwy.googlegroups.com>


The result of the following query is what I like to get:

SELECT MAX(BFP_NUMBER), MAX(METER_NUMBER), UNIT_ID FROM BMA_RENTAL_AGREEMENT_UPPER
GROUP BY UNIT_ID but I do not need/want to have a group by FUNCTION MAX or any other group by function

Is this possible? to do it in other way?

Steve Howard wrote:
> soalvajavab1_at_yahoo.com wrote:
> >
> > I want DISTINCT only applies to UNIT_ID but I also have data for
> > BFP_NUMBER, METER_NUMBER in each result rows.
> >
>
> I'm still not clear on what you want. Using Galen's example above, do
> you want to see...
>
> UNIT_ID BFP_NUMBER METER_NUMBER
> 1 10 100
> 11 101
> 2 12 102
>
> ?
>
> Regards,
>
> Steve
Received on Tue Nov 28 2006 - 17:45:46 CST

Original text of this message

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