title: Mysql to select month-wise record even if data not exist
body: <p>I wrote a query to get month-wise record in user table as follows</p>
  
  <pre><code>SELECT COUNT( `userID` ) AS total, DATE_FORMAT( `userRegistredDate` , '%b' ) AS
  MONTH , YEAR( `userRegistredDate` ) AS year
  FROM `users`
  GROUP BY DATE_FORMAT( FROM_UNIXTIME( `userRegistredDate` , '%b' ) )
  </code></pre>
  
  <p>Output:</p>
  
  <pre><code>total      MONTH    year
  ---------------------------
  3           May     2013
  2           Jul     2013
  --------------------------
  </code></pre>
  
  <p>Expected Output:</p>
  
  <pre><code>total      MONTH    year
  ---------------------------
   0          Jan     2013
   0          Feb     2013
   0          Mar     2013
   0          Apr     2013
   3          May     2013
   0          Jun     2013 
   2          Jul     2013
  --------------------------
  </code></pre>
  
  <p>I need to show the record even if data not exist. How to do this?</p>