Re: Cumulative running total

From: Wolfgang Breitling <>
Date: Fri, 31 Oct 2008 11:41:16 -0600
Message-Id: <>

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
>2008/10/31 Michael Moore <>:
> > 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


Wolfgang Breitling
Centrex Consulting Corporation

Received on Fri Oct 31 2008 - 12:41:16 CDT

Original text of this message