title: MySQL query to return number 'zero' if no results
body: <p>When selecting a DATE and that date does not exist in my table it currently will return an empty result set.  How can I be able to return the number zero for those empty result sets instead?:</p>
  
  <pre><code>    SELECT SUM(TOTAL), SUM(5STAR), STORE, DATE
      FROM `table` WHERE DATE &gt;= '2012-02-24' GROUP BY TOTAL
  
  MySQL returned an empty result set (i.e. zero rows)
  </code></pre>
  
  <p>I want to instead return the results of the <code>SUM(TOTAL)</code> and <code>SUM(5STAR)</code> (if zero rows) as the number zero (0).</p>
  
  <p>FULL TABLE STRUCTURE:</p>
  
  <ul>
  <li>ID = Primary</li>
  <li>DATE = UNIQUE (date)</li>
  <li>STORE</li>
  <li>5STAR</li>
  <li>4STAR</li>
  <li>3STAR</li>
  <li>2STAR</li>
  <li>1STAR</li>
  <li>TOTAL</li>
  <li>FROM = UNIQUE</li>
  </ul>