title: Update table with SUM from another table
body: <p>I am trying to what I thought was going to be a simple update of a table with the sum from another table, but for some reason, it is only updating one row. Here is what the relevant info from the tables look like:</p>
  
  <p><strong>games</strong></p>
  
  <pre><code>gameplayer|points
  ----------------
  John      |5
  Jim       |3
  John      |3
  Jim       |4
  </code></pre>
  
  <p><strong>playercareer</strong></p>
  
  <pre><code>playercareername|playercareerpoints
  -----------------------------------
  John            |0
  Jim             |0
  </code></pre>
  
  <p>Now ultimately, I would like the last table to look like this after running the update:</p>
  
  <p><strong>playercareer</strong></p>
  
  <pre><code>playercareername|playercareerpoints
  -----------------------------------
  John            |8
  Jim             |7
  </code></pre>
  
  <p>This is the query I attempted that only updates the first row:</p>
  
  <pre><code>UPDATE playercareer
  SET playercareer.playercareerpoints = 
      (
  SELECT 
      SUM(games.points) 
  FROM games
      WHERE
       playercareer.playercareername=games.gameplayer
      )
  </code></pre>
  
  <p>I can't seem to find the answer to this. Thanks in advance for your time and advice!</p>