hi everyone, thanks for all the input.
with respect to SQL, as many of you mentioned, SQL would be preferable but unfortunately the calculation logic I need to perform is beyond what SQL aggregate functions (e.g. running sum) and subqueries can do. I showed a simple sum, but in reality I...