Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
Hi,
I have prepared the sql query of a report in sql server.
There exists a one to many relationship.
A name can have multiple item_segments against it,an item_segment can have multiple due_dates and a due date should have 6 different order types against it.The requirement is to do cumulative addition of the quantity in all the weeks for a particular name and item_segment.
So I would like to have a column cumulativeweekly that could do the cumulative addition of the current week's total with the succeeding weeks.
For Week 50 = Total of week 49 + Total of week 50 = -7302 + (-2834) etc.
Please help me in achieving this.
User | Count |
---|---|
125 | |
108 | |
99 | |
63 | |
62 |
User | Count |
---|---|
135 | |
116 | |
101 | |
71 | |
61 |