title: Only return rows if sum is greater than a value
body: <p>I have built this SQL Query which searches for all policy numbers and returns a sum of all multiple PPOLNO's currency values :</p>
  
  <pre><code>SELECT PPOLNO, SUM(PPRMPD) AS SUM 
  FROM PFNTLPYMTH 
  WHERE SUM(PPRMPD) &gt;= 5000 
    AND  ((PYEAR=2012 AND PMONTH &gt;=3 
    AND PDAY &gt;=27) OR (PYEAR=2013 
    AND PYEAR &lt;=3 AND PDAY&lt;=27))
  GROUP BY PPOLNO
  </code></pre>
  
  <p>What I'm looking at doing is only returning them if the SUM >= a specific value.  Is this possible and how?  I tried this:</p>
  
  <pre><code>SELECT PPOLNO, SUM(PPRMPD) AS SUM FROM PFNTLPYMTH
  WHERE SUM(PPRMPD) &gt;= 5000 AND ((PYEAR=2012 AND PMONTH &gt;=3 AND PDAY &gt;=27) OR (PYEAR=2013 
  AND PYEAR &lt;=3 AND PDAY&lt;=27)) GROUP BY PPOLNO
  </code></pre>
  
  <p>But to no avail.  I've also just tried putting in WHERE SUM >= 5000, but again, nothing there.</p>
  
  <p>Any help would be greatly appreciated.</p>
  
  <ul>
  <li>Josh</li>
  </ul>