title: SQL to calculate sum of column values and repeat this value over all rows
body: <p>Let's say I have a table like this:</p>
  
  <pre><code>COL1    COL2
  ABC     1
  DEF     2
  GHI     3
  </code></pre>
  
  <p>And I want to have the sum of COL2 in a new column COL3:</p>
  
  <pre><code>COL1    COL2   COL3
  ABC     1      6
  DEF     2      6
  GHI     3      6
  </code></pre>
  
  <p>So taking a simple sum won't work because it will return only 1 value, whereas I want the value to be repeated over all rows.</p>