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

Home -> Community -> Mailing Lists -> Oracle-L -> Re: sum of a column (development question)

Re: sum of a column (development question)

From: David Sharples <davidsharples_at_gmail.com>
Date: Tue, 11 Sep 2007 19:37:19 +0100
Message-ID: <be592d550709111137v15b04ba9i9600b6be057c9ead@mail.gmail.com>


group the records by year and filter it by the two years you want

select year, sum(total) where year in xxx group by year

On 11/09/2007, Lyall Barbour <lyallbarbour_at_sanfranmail.com> wrote:
>
> Hi again,
> Development question. User wants the sum of all the purchase orders
> for this year and last year. I'm trying to get it in the same select
> statement. I want something like this, but don't know how to get it.
>

--
http://www.freelists.org/webpage/oracle-l
Received on Tue Sep 11 2007 - 13:37:19 CDT

Original text of this message

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