Here's how I would do it with a Recursive Common Table Expression in SQL Server:
DROP TABLE #data
;
CREATE TABLE #data
( [ID] INTEGER NULL
, [Column 1] REAL NULL
, [Column 2] REAL NULL
)
;
INSERT INTO #data VALUES
( 1 , 75 , 150 )
, ( 2 , 400 , 600 )
, ( 3 , 150 , 300 )
, ( 4 , 200 , 400 )
, ( 5 , 562.5 , 750 )
, ( 6 , 300 , 600 )
, ( 7 , 350 , 700 )
;
WITH [work] AS
(
SELECT * , CAST ( 0.0 AS REAL ) [Column 3] , [Column 2] [Sum 2] FROM [#data] WHERE [ID] = 1
UNION ALL
SELECT A.[ID] , A.[Column 1] , A.[Column 2] , A.[Column 1] + B.[Sum 2] [Column 3] , A.[Column 2] + B.[Sum 2] [Sum 2]
FROM [#data] A
CROSS APPLY [work] B
WHERE B.[ID] = A.[ID] - 1
)
SELECT [ID]
, [Column 1]
, [Column 2]
, [Column 3]
FROM [work]
But you
must have something by which you can order the records.