title: MySQL filter results by month and year
body: <p>My table shows the amount of searches taken by various countries and the date on which they were taken, I want a query that shows me the searches taken each month for both the years 2012 &amp; 2013, I will need to add separate columns for month, year and number of searches. I have previously used the query below which returns the amount of searches taken each week, but I would like to change it to just the searches taken each month for years 2012 &amp; 2013.</p>
  
  <pre><code>SELECT COUNT(*) as `count`,
        `region`, 
         DATE(NOW()) as `week_ending` 
     FROM my_stores.stats 
          WHERE `date` &gt; DATE_ADD(DATE(NOW()), INTERVAL -1 WEEK) 
                 AND 
                `date` &lt; DATE(NOW()) 
   GROUP BY `region`, DATE(NOW());
  </code></pre>