I have two tables: Company and Products. The Products table has a relation to the Company table. In the Products table, there’s a column that can store multiple product entries with their respective quantities, such as:
- Glass: 2
- Glass: 3
- Rubber: 4
- Rubber: 8
- Tile: 1
What I want is to calculate the total quantity for each unique product. For example, the output for the above data should be:
- Glass: 5
- Rubber: 12
- Tile: 1
How can I achieve this?