Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Select greatest value for account number
select max(amount) group by acct_no;
elrond
"Craig Alexander" <craig_at_itas.net> wrote in message
news:nBVo4.279$_Z3.17466_at_sapphire.mtt.net...
> I have a scenario where an account number has multiple dollar amounts
> associated with it. What I want to do is select the largest amount
> associated with the account number.
> .
> Here is what the table looks like
>
> Acct_No Amount
> 1 20
> 1 21
> 1 45
> 2 5
> 2 7
> 2 67
>
> For Acct_No '2' I would like to bring back the Amount of '67' etc.
>
>
> I'm relatively new to this and appreciate any help
>
> Thanks
> Craig
>
> --
> _______________________
>
> Craig Alexander
> Island Tel Advanced Solutions
>
>
Received on Fri Feb 11 2000 - 09:21:26 CST
![]() |
![]() |