J
Jayes
I have SQL query with the data as follows
Week Open Created Closed Balanc
09 10 2 5
10 0 3 4
11 0 5 1 1
12 0 4 2 1
and so on..
How can I write a SQL query to get the reult like below
Week Open Created Closed Balanc
09 10 2 5
10 7 3 4
11 6 5 1 1
12 10 4 2 1
In other words Balance = (Open+Created-Closed
The value of Open of the next record should be the balance of the previous record
Please help me solve this problem
Week Open Created Closed Balanc
09 10 2 5
10 0 3 4
11 0 5 1 1
12 0 4 2 1
and so on..
How can I write a SQL query to get the reult like below
Week Open Created Closed Balanc
09 10 2 5
10 7 3 4
11 6 5 1 1
12 10 4 2 1
In other words Balance = (Open+Created-Closed
The value of Open of the next record should be the balance of the previous record
Please help me solve this problem