Y eso es lo que efectivamente hice:
Código sql:
Ver originalSELECT T1.*,T1.Maq1*T1.Maq2 [ProdTotal],
(T1.Maq1*T1.Maq2) - CASE WHEN T3.ProdTotal IS NULL THEN 0 ELSE T3.ProdTotal END [ProdTotalAnt]
FROM tutabla T1
INNER JOIN (
SELECT T1.Id,(SELECT MAX(Id) FROM tutabla WHERE Id < T1.Id) [IdAnt]
FROM tutabla T1
) T2 ON T1.Id = T2.Id
LEFT JOIN (
SELECT Id, Maq1*Maq2 [ProdTotal]
FROM tutabla
) T3 ON T2.IdAnt = T3.Id