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: Max Function Question

Re: Max Function Question

From: <tabates_at_my-deja.com>
Date: Mon, 21 Jun 1999 19:04:14 GMT
Message-ID: <7km2b4$ik3$1@nnrp1.deja.com>


In article <7kecup$spp$1_at_nnrp1.deja.com>,   shiling_at_math.wayne.edu wrote:
> Using a pair comparison my help.
>
> SQL> select * from t;
>
> A B C
> --------- --------- ---------
> 1 1 1
> 1 2 3
> 2 2 2
> 2 3 5
>
> SQL> select * from t
> 2 where (a,b) in (select a,max(b) from t group by a);
>
> A B C
> --------- --------- ---------
> 1 2 3
> 2 3 5
>
> SQL>
>

Thanks, it works perfectly.

Thomas Kyte : thanks for the assist, but the value of C can grow and shrink over time. I failed to mention that in my initial offering. Where the value of B will only grow.

Thanks again,
TABates

Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't. Received on Mon Jun 21 1999 - 14:04:14 CDT

Original text of this message

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