I have the following columns in a table:
- The product's name
- amount
- Description
I want to add product quantities if the product name is the same. For example, if I have a product with the same name twice, I want the total quantities of products to be added and get the result.
This is a table, and I want to add quantities of the same element:
Name Quantity Description
Pen 3
Pencil 2
Pen 6
Eraser 7
Eraser 6
For exmaple:
- I have a pen twice, so I want to add (3 + 6) and display the total number as 9 and ...
- I have an eraser twice (7 + 6), so the amount should be 13.
source
share