title: SUM() of calculated field
body: <p>I've this query:</p>
  
  <pre><code>select 
  C.One
  ,C.Two
  ,C.Three
  ,C.Four
  
  from mytable C
  
  where C.One = 11052 and C.Three = 97734
  </code></pre>
  
  <p>This returns:</p>
  
  <pre><code>One  |Two | Three  | Four
  11052   2   97734   4
  11052   2   97734   4
  11052   2   97734   4
  11052   2   97734   4
  11052   2   97734   4
  11052   2   97734   4
  11052   2   97734   4
  11052   2   97734   4
  11052   2   97734   4
  11052   2   97734   4
  11052   1   97734   4
  11052   1   97734   4
  11052   1   97734   4
  11052   1   97734   4
  11052   1   97734   4
  11052   1   97734   4
  11052   1   97734   4
  11052   1   97734   4
  11052   1   97734   4
  11052   1   97734   4
  11052   3   97734   4
  11052   3   97734   4
  11052   3   97734   4
  11052   3   97734   4
  11052   3   97734   4
  11052   3   97734   4
  11052   3   97734   4
  11052   3   97734   4
  11052   3   97734   4
  11052   3   97734   4
  11052   4   97734   4
  11052   4   97734   4
  11052   4   97734   4
  11052   4   97734   4
  11052   4   97734   4
  11052   4   97734   4
  11052   4   97734   4
  11052   4   97734   4
  11052   4   97734   4
  11052   4   97734   4
  11052   5   97734   4
  11052   5   97734   4
  11052   5   97734   4
  11052   5   97734   4
  11052   5   97734   4
  11052   5   97734   4
  11052   5   97734   4
  11052   5   97734   4
  11052   5   97734   4
  11052   5   97734   4
  </code></pre>
  
  <p>Sorry for the long paste, as you can see every row repeated 10 times for each "Column Two" value (10x for 1, 2, 3, 4, 5) total rows 50.</p>
  
  <p>2)</p>
  
  <p>If wrote this:</p>
  
  <pre><code>select 
  C.One
  ,C.Two
  ,C.Three
  ,C.Four
  ,sum(c.Four) as 'Sum'
  
  from mytable C
  
  where C.One = 11052 and C.Three = 97734
  group by C.One, C.Two,C.Three , C.Four
  </code></pre>
  
  <p>resulting in:</p>
  
  <pre><code>One  | Two | Three  | Four  |  Sum
  11052   1       97734   4   40
  11052   2       97734   4   40
  11052   3       97734   4   40
  11052   4       97734   4   40
  11052   5       97734   4   40
  </code></pre>
  
  <p>The Sum should be 20 (4+4+4+4+4) but it's 40 'cause the 10x the 4 repeats in previuos query. (above).</p>
  
  <p>I should end up with</p>
  
  <pre><code>One  | Two | Three  | Four  |  Sum
  11052   1       97734   4   20
  11052   2       97734   4   20
  11052   3       97734   4   20
  11052   4       97734   4   20
  11052   5       97734   4   20
  </code></pre>
  
  <p>What should i do to fix this and get 20 and not 40? Hope it's clear. Thanks for your time.</p>