ON DUPLICATE KEY UPDATE in INSERT INTO SELECT with GROUP BY
Like all functions you need to make a further select with the data
And please next time provide a minimal reproducible example, so that the answer can be doe quicker and with much less effort


CREATE TABLe t2 (ID INT primary key,P1 INT,P2 INT ,Items INT ) 




INSERT INTO t2 VALUES (1,1,1,1)




CREATE TABLe t1 (ID INT primary key,P1 INT,P2 INT ,Items INT ) 




INSERT INTO t1 VALUES (1,1,2,2)




INSERT IGNORE INTO t2 (ID,P1,P2,Items) 
    SELECT ID,P1,P2, t1sum
    FROM
    (SELECT ID,P1,P2,SUM(Items) t1sum
    FROM t1 GROUP BY ID,P1,P2) t3
ON DUPLICATE KEY UPDATE t2.Items=t3.t1sum


✓




SELECT * FROM t2


ID | P1 | P2 | Items
-: | -: | -: | ----:
 1 |  1 |  1 |     2


db&lt;&gt;fiddle here