Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Need help with sum
Try this:
SELECT name, SUM(price)
FROM my_table
GROUP BY name;
Best!
Randall
claudio <cat_bwo_at_hotmail.com> wrote in message
news:98a9ad28.0105250529.3e068175_at_posting.google.com...
> Hello
>
>
> I have problems with the sum command.
>
> My table looks like this:
>
>
> name..................price
> schwarzenegger..........100
> basinger.................20
> basinger................200
> fonda....................10
> fonda..................1000
> fonda...................200
> fonda....................50
>
>
> end I want to summarize the prics per name. Unfortunately, sum only
> seems to work with whole columns. I greatly appreciate any help.
Received on Fri May 25 2001 - 08:38:49 CDT