title: SQL - If two records have same value in two columns, add third column
body: <p>I have a table with these values:  </p>
  
  <pre><code>Col1  | Col2    | Col3 |  
  one   | two     |  3   |  
  four  | five    |  6   |  
  four  | seven   |  8   |  
  four  | seven   |  9   |  
  </code></pre>
  
  <p>I want to make a query that returns a row for every record in which Col1 and Col2 are both different than in every other record, but if they are both the same in two records, the result should be one single row with those values in Col1 and Col2 and their Col3 sum in the third column. The result should be:  </p>
  
  <pre><code>Col1  | Col2   | ColNew |  
  one   | two    |  3     |  
  four  | five   |  6     |  
  four  | seven  | 17     |  
  </code></pre>
  
  <p>Thank you.</p>