title: Group records by UserID, select where on one column value and sum another
body: <p>Using SQL in MySQLWorkbench I'd like to group records by 'UserID', 
  select only the records that match where 'Weeks' are in(5,6,7,8) and sum the values for each user in 'Score'. </p>
  
  <p>The records are actually stored in two tables that I am joining, a lineup table and lineup history table: </p>
  
  <pre><code>INNER JOIN vi_lineup on vi_lineup.lineup_master_id = vi_lineup_master.lineup_master_id
  </code></pre>
  
  <p>Obviously, I am a newbie. I did search S.O. first but did not find a matching question. I'll keep looking and hope someone answers here. Thanks for any help.</p>
  
  <p>A comment asked about the Weeks. The game is based on a weekly model and we number them sequentially. Here's a working query joining the tables and selecting records based on the weeks:</p>
  
  <pre><code>select * FROM vi_lineup LU 
  INNER JOIN vi_lineup_master LM 
  WHERE (LU.week &gt; 4 and LU.week &lt; 9)  
  AND LU.lineup_master_id = LM.lineup_master_id 
  Limit 0,148000;
  </code></pre>
  
  <p>What I would like to do now is Group the records by LM.UserID and sum the values in LU.Score
  Thanks!</p>