Sie können SUM OVER
verwenden Funktion:
SELECT *,
SUM(Input + Output) OVER(PARTITION BY ID ORDER BY Date) AS Total
FROM table_a
Sie können SUM OVER
verwenden Funktion:
SELECT *,
SUM(Input + Output) OVER(PARTITION BY ID ORDER BY Date) AS Total
FROM table_a