MySQL answer.
Re: How to perform aggregation (sum) on a computed column?
This is specific to MySQL. This will give you a running sum. The last row will have the total sum of all the ages.
[sql]
SET @a := 0;
SELECT
(AGE * 10) AS XYZ,
@a := @a + (AGE*10)
FROM MY_TABLE
[/sql]
|