title: How to SELECT data month by month in PHP MySQL
body: <p>I've stored data in <code>MySQL</code> database with the date as below.</p>
  
  <pre><code>pageview_date
  2015-01-07
  2015-01-07
  2015-01-07
  2015-01-07
  2015-01-07
  2015-01-07
  2015-01-07
  2015-01-07
  2015-01-07
  2015-01-07
  2015-01-07
  2015-01-07
  2015-01-07
  2015-01-07
  2015-01-07
  2015-01-07
  2015-01-07
  </code></pre>
  
  <p>How can I <code>SELECT</code> data by months ? I mean all data for January, December, November .... separately ?
  How to set <code>WHERE</code> part?
  I want to get last 6 months data from today by each month programmatically</p>