title: MySQL return 'empty result' even with coalesce
body: <p>I have some trouble with MySQL.</p>
  
  <p>Here is the query I use:</p>
  
  <pre><code>SELECT
      COALESCE(SUM(`a`.`battles`), 0) AS `battles`
  FROM
      `account_stats` AS `a`
  WHERE
      `a`.`account_id` = 12345
  GROUP BY
      `a`.`account_id`
  </code></pre>
  
  <p>The Table <code>account_stats</code> is not empty, but has no row with <code>account_id = 12345</code>.</p>
  
  <p>I want that MySQL returns <strong>0 battles</strong> instead of <code>Empty set</code>. But even with <strong>COALSECE</strong> or <strong>IFNULL</strong> it returns <code>Empty set</code>.</p>
  
  <p>When I remove the <code>GROUP BY</code> everything works fine, but I need it to calculate the SUM of battles.</p>
  
  <p>Is there a way to workaround this problem?</p>