I have prefixed the tables “mag_”, please change to suit. SELECT product_id, sum( total_qty_ordered ) AS ‘total’, `value` AS product_nameFROM...