Im having a hard time working out a proper DQL to generate cumulative sum. I can do it in plain SQL but when it comes to DQL i cant get hold of it.
Here is how it lo
You just specify the sum in your select part of the DQL:
$query = Doctrine_Query::create() ->select('sum(amount)') ->from('some_table');
Check out this page in the Doctrine documentation for more info.