List:General Discussion« Previous MessageNext Message »
From:SGreen Date:August 13 2004 6:32pm
Subject:Re: Using SUM in a special way
View as plain text  
I am afraid not. A spreadsheet is the right tool for that job, not a 
database. Sorry!

Of course you could always script your own solution (calculating running 
totals, etc.)

Best Wishes,
Shawn Green
Database Administrator
Unimin Corporation - Spruce Pine



hrrg-inf@stripped wrote on 08/13/2004 06:29:18 PM:

> Hi,
>   I would like to use SUM or any other function to sum a series of
> records as in the following example.
> 
> I have this table T1
> 
>    Col1   Col2 
>    1   20
>    2   10
>    1   10
>    2    5
>    1   20
>    3   10
> 
> and would like to obtain this result from a query
> 
>    Col1   Col2   Col3
>    1   20   20
>    1   10   30
>    1   20   50
>    2   10   10
>    2    5   15
>    3   10   10
> 
> Column Col3 should carry forward and sum values from Col2
> 
> Is that possible ?, with SQL I mean...
> 
> 
> Thank you 
> Mauricio
> 
> 
> 
> 
> -- 
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:    http://lists.mysql.com/mysql?unsub=1
> 

Thread
Using SUM in a special wayMauricio Pellegrini13 Aug
  • Re: Using SUM in a special waySGreen13 Aug
  • Re: Using SUM in a special wayMark Stafford13 Aug
  • Re: Using SUM in a special wayKeith Ivey13 Aug
    • Re: Using SUM in a special wayMauricio Pellegrini13 Aug