title: Why are aggregates not allowed in SQL where clause
body: <pre><code>SELECT SUM(salary) 
  FROM EMPLOYEE 
  WHERE SUM(salary) &gt; 10000;
  </code></pre>
  
  <p>causes error, I know that it needs to be put in <code>HAVING</code> clause. </p>
  
  <p>My question is why? As in root cause for this syntax choice in SQL language design.</p>