Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Max Function Question
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