title: Unexpected behavior of HAVING clause
body: <p>I have the following table in MySQL-</p>
  <pre><code>runs overs
   5     6
   6     7
  </code></pre>
  <p>I am trying to test the behavior of having clause without group by clause.</p>
  <pre><code>When i write-
  select * from cricket having runs=MIN(runs);
  OUTPUT-
  runs overs
   5     6
  
  select * from cricket having runs=MAX(runs);
  OUTPUT-
  Empty Set
  </code></pre>
  <p>What is the reason behind this behavior?</p>
  <p>EDIT:
  On reversing the row order-</p>
  <pre><code>runs overs
   6     7
   5     6
  </code></pre>
  <p>The output is as follows-</p>
  <pre><code>select * from cricket having runs=MIN(runs);
  OUTPUT-
  Empty Set
  
  select * from cricket having runs=MAX(runs);
  OUTPUT-
  runs overs
   6     7
  </code></pre>