Skip to content
Advertisement

Sum of quantity column based on the grouped of product_id column values with their respective names form name column

Here is what my table looks like:

Here is what my table looks like

Here what I need:

Here what I need

I tried this code

Advertisement

Answer

GROUP BY will do the trick in this case!

Replace the column names with the ones from your database table.

User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement