I have a table:
ID_____Mat_____DelvDate_____QtyDelv
1_____ A ______10Jan07_______10
2_____ A ______12Jan07_______ 5
3_____ A _______8Jan07_______ 3
4_____ B ______10Jan07_______ 4
I want to create a query that will return the following result:
ID_____Mat_____DelvDate______X
1_____ A ______10Jan07_______3
2_____ A ______12Jan07_______13
3_____ A _______8Jan07_______0
4_____ B ______10Jan07_______4
Note: X = sum of qty delivered before each delivery date
How could I achieve this?