Hi all,
I've searched on the net for a solution, but to no avail - I'm hoping for luck here
Imagine this is the table:
Prod_ID Quantity Sold
=================================
ABCDEF 2
123456 6
ZZZZZZ 1
ABCDEF 7
ABCDEF 8
ZZZZZZ 2
So we have multiple entries of the same product with different quantities sold.
I need to summarize the total quantity sold of each product i.e. the result would be:
Prod_ID Quantity Sold
=================================
ABCDEF 17
123456 6
ZZZZZZ 3
Is this possible from a MySQL query, or would I need to use php scripting too?
I've tried to think of how to do this using DISTINCT, GROUP BY, SUM etc but can't seem to be able to do it.
Thanks!