This should be easy, but I can't figure it out. I have a product table which looks like this (very abbreviated for clarity)
So all I want to do is to aggragate the quantities for each product id eg product id 128 quantity of 37. All I have come up with is the following, which groups product_name but does not add the quantities correctly. This is Laravel Query builder code. But no matter, raw SQL is fine if you can help. Thank You !