title: How to use CriteriaQuery SUM of custom operation on some cells?
body: <p>Consider you have table T, with fields A and B.</p>
  
  <p>With regular SQL, I could do this:</p>
  
  <pre><code>SELECT SUM(A * (100.0 - B) / 100.0) AS D FROM T;
  </code></pre>
  
  <p>And I would get exactly what I expect.</p>
  
  <p>However, I'm not sure how to do it with CriteriaQuery.</p>
  
  <p>I know how to do sum over 1 field, but not how to do sum over some math expression over multiple fields in a row.</p>