title: COUNT(*) not working with group by?
body: <p>Why the following query returns NO RESULT in MySQL 5.6 on empty database ?</p>
  
  <pre><code>SELECT COUNT(*) 
  FROM a_sec_banns 
  WHERE ip = 'not-exist-ip' 
  GROUP BY ip 
  HAVING max(date_created) &lt;= '10-10-2014' or count(*) &gt; 3;
  </code></pre>
  
  <p>The structure of table is something like  this:</p>
  
  <pre><code>CREATE TABLE `a_sec_banns` (
    `ID` bigint(20) NOT NULL AUTO_INCREMENT,
    `DATE_CREATED` datetime DEFAULT NULL,
    `IP` varchar(60) NOT NULL,
    PRIMARY KEY (`ID`)
  ) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8;
  </code></pre>
  
  <p>I would expect the query COUNT(*) will return a number > 0, 0 if nothing, Exception if query is wrong. But never NULL - what is the NULL/NO result purpose on COUNT ???</p>