Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> Re: sum of a column (development question)
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-lReceived on Tue Sep 11 2007 - 13:37:19 CDT