Du kan bruge SUM OVER
funktion:
SELECT *,
SUM(Input + Output) OVER(PARTITION BY ID ORDER BY Date) AS Total
FROM table_a
Du kan bruge SUM OVER
funktion:
SELECT *,
SUM(Input + Output) OVER(PARTITION BY ID ORDER BY Date) AS Total
FROM table_a