Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: A SQL select statement

Re: A SQL select statement

From: TurkBear <johng_at_mm.com>
Date: Thu, 14 Oct 1999 18:58:51 GMT
Message-ID: <3806262d.18699949@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 Thu Oct 14 1999 - 13:58:51 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US