title: SQL, add column with summed values of the same type
body: <p><br />My current table looks like this:</p>
  
  <pre><code>ID   TYPE   QUANTITY   
  1    A1     3
  2    B1     2
  3    A1     2
  4    B1     8
  </code></pre>
  
  <p>And after doing the query I want to get that:</p>
  
  <pre><code>ID   TYPE   QUANTITY   SUM   
  1    A1     3          5
  2    B1     2          10
  3    A1     2          5
  4    B1     8          10
  </code></pre>
  
  <p>The SUM column consist of summed quantities of items with the same type.</p>