title: Cannot have aggregate function in expression
body: <p>Hi I am trying to do the qry below and I keep getting "Cannot have aggregate function in expression" error on the subqry sum line. Any way to make this work?</p>
  
  <pre><code>SELECT ID, 
      DateColumn, 
      Contamination, 
      BrokenGlass, 
      OtherReasons, 
      SUM(Contamination) + SUM(BrokenGlass) + SUM(OtherReasons) AS Total, 
      SUM(Contamination) / Total AS Expr1,
      (SELECT SUM(Contamination)/ SUM(SUM(Contamination) + SUM(BrokenGlass) + SUM(OtherReasons))
       FROM tbltest T2
       WHERE T2.ID &lt;= T2.ID) AS RunningSum
  FROM tbltest
  GROUP BY ID, DateColumn, Contamination, BrokenGlass, OtherReasons
  </code></pre>