+---------------+---------+-----------------+---------+
| product_count | size1 | sproduct_count2 | size2
+---------------+---------+-----------------+---------+
| 13 | 2x4 | 5 | 2x6
| 14 | 2x6 | 2 | 4x8
| 15 | 2x8 | 3 | 2x8
| 16 | 4x4 | 2 | 4x4
| 17 | 4x8 | 15 | 4x8
+---------------+---------+-----------------+---------+
How do I get the total counts so the return results appear like:
product_count | size
13 | 2x4
19 | 2x6
18 | 2x8
18 | 4x4
34 | 4x8
I have tried:
SELECT SUM(product_count+product_count2) AS product_count, size1 FROM UNITS GROUP BY size1
and it works for some rows and others it does not work for. Would CONCAT be something I need to use?
product_count/size1, and there's 5 of 2x6 insproduct_count2/size2. The sum, 19, is shown in the result next to 2x6.