Hi,

I having trouble working out how to get a result set similar to the 
following where I select from a table with Date & Sales column.

My specific question is can I have a column that accumulates values, if so 
could I have some guidance on how to express this in a select statement please.


+----------+-----------+-----------+
| Month    | Sales     | Cum Sales |
+----------+-----------+-----------+
| Jan      | 1000      | 1000      |
| Feb      | 1500      | 2500      |
| Mar      | 1200      | 3700      |
| April    | 1400      | 5100      |
+----------+-----------+-----------+

Many thanks in advance.

Richard


=======================================
Richard Vibert
[EMAIL PROTECTED]
Tatura Mitre10
=======================================


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to