Re: Cumulative running total
Date: Fri, 31 Oct 2008 11:41:16 -0600
Message-Id: <200810311741.m9VHfIlx020536@mail90c0.megamailservers.com>
Yes, an Gints' as well as mine deliberately omit the AS row for
period 1. That is because the current solution wouldn't have it
either. For period 1 it is simply a
select a, b, year, 1, sum(amount) from test where year=blah and
period <= 1 group by 1, b, year
so if there is no row for any a-b values for that year and period 1 it is not in the resultset.
The replacement solution should provide the same results.
At 11:32 AM 10/31/2008, Gints Plivna wrote:
>Yes because it wasn't also in Wolfgang's initially provided desired
>result set and is filtered out by WHERE alt_b IS NOT NULL.
>Anyway as I understood Wolfgang already succesfully solved his problem.
>
>Gints Plivna
>http://www.gplivna.eu
>
>2008/10/31 Michael Moore <michaeljmoore_at_gmail.com>:
> > let me try again...
> > not sure if this matters, but there is no AS for period 1 in the result set
> > for Gint's first solution.
> > Mike
Regards
Wolfgang Breitling
Centrex Consulting Corporation
www.centrexcc.com
-- http://www.freelists.org/webpage/oracle-lReceived on Fri Oct 31 2008 - 12:41:16 CDT