title: SQL Query with CASE inside SUM not working
body: <p>A shortened query:</p>
  <pre><code>select t.Docket, t.TranType,CAST(ROUND(t.Net, 2) AS decimal(18,2)) as Net1,
  CASE
      WHEN t.TranType = 'SRT'  THEN CAST(ROUND(t.Net, 2) AS decimal(18,2))  * -1
      WHEN t.TranType = 'DIV'  THEN t.net  * 0
      ELSE CAST(ROUND(t.Net, 2) AS decimal(18,2)) 
  END AS Net2
                  from trans t
  </code></pre>
  <p><a href="https://i.stack.imgur.com/73Y63.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/73Y63.png" alt="enter image description here" /></a></p>
  <p>But when I want to add:</p>
  <pre><code>SUM (CASE
      WHEN t.TranType = 'SRT'  THEN CAST(ROUND(t.Net, 2) AS decimal(18,2))  * -1
      WHEN t.TranType = 'DIV'  THEN t.net  * 0
      ELSE CAST(ROUND(t.Net, 2) AS decimal(18,2)) 
  END AS Net3) OVER () AS Total
  </code></pre>
  <p>I get error: Incorrect syntax near 'SUM'. I just want a total amount adding up everything in Net2</p>