title: SQL query: Using DISTINCT/UNIQUE and SUM() in one statement
body: <p><b>THE PROBLEM</b><br />
  I have four game servers collecting data. Putting data into a single table. Unfortunately this causes four entries per stat for one player. </p>
  
  <p><b>WHAT I WANT</b><br />
  I want one record and SUM()on certain columns.<br /><br />
  I will post a statement that I wrote which doesn't work but you'll get the point of what I would like to accomplish.<br /><br /></p>
  
  <pre><code>SELECT DISTINCT( Name ), 
                 Max(Level), 
                 Class, 
                 Sum(Kills), 
                 Sum(Deaths), 
                 Sum(Points), 
                 Sum(TotalTime), 
                 Sum(TotalVisits), 
                 CharacterID 
  FROM   Characters 
  WHERE  Name LIKE '$value%' 
          OR CharacterID LIKE '$value' 
  ORDER  BY Name ASC; 
  </code></pre>