title: How to Sum particular values in a column in Microsoft SQL Server?
body: <p>I'm kinda new to this and I have been stuck on this for a while now.</p>
  
  <p>Example:</p>
  
  <pre><code>Col1 Col2 Col3
   A  | H  | 1
   A  | I  | 2
   A  | J  | 3
   B  | J  | 4 
   B  | K  | 5
   C  | L  | 6
  </code></pre>
  
  <p>How can I sum 'Col3' but only for particular values. For example sum up the values in 'Col3' where the letters in 'Col1' are in the same row as 'Col3'. So A = 6 (1+2+3) and B = 9 (4+5) and C = 6</p>
  
  <p>So you get this:</p>
  
  <pre><code>Col1 Col2 Col3
   A  | H  | 6   
   A  | I  | 6
   A  | J  | 6
   B  | J  | 9 
   B  | K  | 9
   C  | L  | 6
  </code></pre>
  
  <p>This is what I had so far:</p>
  
  <pre><code>SELECT Col1, Col2, SUM(Col3)
  FROM Table1
  GROUP BY Col1, Col2;
  </code></pre>
  
  <p>Thanks</p>