title: SQL QUERY, what can't appear in the having clause?
body: <p>I have the following relation:</p>
  
  <pre><code>R(A, B, C, D, E)
  </code></pre>
  
  <p>and the following query</p>
  
  <pre><code>SELECT ...
       FROM R
       WHERE ...
       GROUP BY B, E
       HAVING ???
  </code></pre>
  
  <p>What can't appear in the having clause?: MAX(C), COUNT(A), D,B</p>
  
  <p>I believe all of them work, but I am little bit hesitant about B. MAX(C) works because we can bound the max value of the column c in a group. Same thing for COUNT(A). D also works. It's just an attribute, but it looks weird to bound a member of the GROUP BY clause. </p>