>>Too bad that your lowest version is SQL Server 2008 because otherwise it would be a simpler solution.
>>
>
>What version of SQL Server I should ask the customers to upgrade to, in order to make this a simpler solution?
2012 version of SQL Server has window functions that may be helpful (SUM over (ORDER BY ...))
If it's not broken, fix it until it is.
My Blog