I have a table with data similar to such:
Layer | LayerPerOccLimit
1 40
2 60
3 75
4 96
5 102
Basically what I need is a third field that would be a sum of the all of the LayerPerOccLimits that preceed it. So the goal is the Aggregate Column:
Layer | LayerPerOccLimit | *Aggregate*
1 40 0
1 80 0
2 60 120
3 75 180
3 25 180
4 96 280
4 10 280
5 102 386
Edited. Like a running total but has to be grouped by the Layer column.
I have tried various methods such as inserting a primary key and then constructing a case statement based on a combination of less than
expressions but I fear that there is conceptual approach that I am just missing entirely.
I am almost less interested in figuring out the actual code than just wrapping my head around the whatever concept I would employ here in a general sense...