title: Sum values from Duplicated rows
body: <p>There's my sql data:</p>
  
  <pre><code>code name total
  ---------------
  3   Sprite 2400
  17  Coke   1500
  6   Dew    1000
  17  Coke   3000
  6   Dew    2000
  </code></pre>
  
  <p>But code and name has duplicated values and I want to sum total from each duplicated field.
  Something like this:</p>
  
  <pre><code>code name total
  ---------------
  3   Sprite 2400
  17  Coke   4500
  6   Dew    3000
  </code></pre>
  
  <p>How could I do that in sql?</p>