Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: A SQL select statement
Hi,
It works well.
Thank you so much,
Jingyan Xu
TurkBear wrote in message <3806262d.18699949_at_super.news-ituk.to>...
>Try this:
>
>select item,to_char(actiondate,'Month) Month,sum(amount)
>from Ledger
>group by item,to_char(actiondate,'Month')
>
>Should work...
>
>HTH
>
>"Jingyan" <jingyan.xu_at_tst2000.com> wrote:
>
>>Hi,
>>the Ledger table below: I need to write a select statement to show the
>>monthly amount paid for each item. Thanks for help. Jingyan Xu
>>Name Null? Type
>>------------------------------- -------- ----
>>ACTIONDATE DATE
>>ACTION VARCHAR2(8)
>>ITEM VARCHAR2(30)
>>QUANTITY NUMBER
>>QUANTITYTYPE VARCHAR2(10)
>>RATE NUMBER
>>AMOUNT NUMBER(9,2)
>>PERSON VARCHAR2(25)
>>
>>
>
>
>
> -----------== Posted via Newsfeeds.Com, Uncensored Usenet News
==----------
> http://www.newsfeeds.com The Largest Usenet Servers in the World!
>------== Over 73,000 Newsgroups - Including Dedicated Binaries Servers
==-----
Received on Fri Oct 15 1999 - 03:59:07 CDT