I have the following table:
Category | Qty | Orders | Level |
---|---|---|---|
Product | 0 | ||
Part 1 | 2 | 4 | 1 |
Part 2 | 3 | 5 | 1 |
Part 1.1 | 4 | 6 | 2 |
Part 1.2 | 5 | 7 | 2 |
How can I update the above table's Level 0 row with sum of Qty and Orders (excluding Level 0's Qty and Orders)?
i.e.
Category | Qty | Orders | Level |
---|---|---|---|
Product | 14 (i.e. 2+3+4+5) | 22 (i.e. 4+5+6+7) | 0 |
Part 1 | 2 | 4 | 1 |
Part 2 | 3 | 5 | 1 |
Part 1.1 | 4 | 6 | 2 |
Part 1.2 | 5 | 7 | 2 |