title: Extract the same month in different years mysql
body: <p>I'm developing a logger for my photovoltaic panels, and I've a mysql table with the daily production of last 5 years. I'd like to extract and aggregate the monthly production as for example:</p>
  
  <pre><code>jan 2010= x kWh
  
  jan 2011= ...
  
  jan 2012=...
  
  jan 2013=...
  </code></pre>
  
  <p>and so on..
  Is there a quick way to accomplish that in mysql-php, without make too much different selects?
  Thank you in advance...</p>