CodePudding user response:
Establish a lookup table, INSERT INTO the query result table (material, cumulants)The SELECT material, the SUM (quantity) AS cumulant
The FROM record
GROUP BY the material number
CodePudding user response:
Establish a lookup table, INSERT INTO the query result table (material, cumulants)