Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Need help with sum
hi,
try this...
select name, sum (price) price
from <table name>
group by name;
hope this helps....
regards,
aparna
"claudio" <cat_bwo_at_hotmail.com> wrote in message
news:98a9ad28.0105250544.41be8235_at_posting.google.com...
> My table looks like this:
>
> name...................price
> Schwarzenegger...........100
> Fonda.....................10
> Fonda.....................40
> Fonda....................200
> Thomas....................50
> Thomas....................20
>
>
> Sql should give this:
>
> name...................price
> Schwarzenegger...........100
> Fonda....................250
> Thomas....................70
>
>
> The sum command does not seem to work in this case (only whole
> columns?), any help would be greatly appreciated :-).
Received on Fri May 25 2001 - 09:55:43 CDT