sql >> Base de Datos >  >> RDS >> Mysql

Actualizar tabla con SUM de otra tabla

UPDATE playercareer c
INNER JOIN (
  SELECT gameplayer, SUM(points) as total
  FROM games
  GROUP BY gameplayer
) x ON c.playercareername = x.gameplayer
SET c.playercareerpoints = x.total