title: Group MySQL rows by month and count data until each month
body: <p>I have a table called "results" with lots of rows and a column called "timestamp".</p>
  
  <p>I want to group the number of rows for each month. But for each one of them, I also want to consider the previous months rows.</p>
  
  <p>So if I have</p>
  
  <pre><code>Jun/13
  Jun/13
  Jun/13
  Jul/13
  Jul/13
  Jul/13
  Jul/13
  Jul/13
  Aug/13
  Aug/13
  Aug/13
  Aug/13
  Aug/13
  Aug/13
  Aug/13
  </code></pre>
  
  <p>The result will be</p>
  
  <pre><code>3  Jun/13
  8  Jul/13
  15 Aug/13
  </code></pre>
  
  <p>This is what I have right now, but it doesn't consider the previous months.</p>
  
  <pre><code>SELECT DATE_FORMAT(FROM_UNIXTIME(timestamp), '%e %b %Y'), COUNT(1) FROM results
  GROUP BY DATE_FORMAT(FROM_UNIXTIME(timestamp), '%e %b %Y');
  </code></pre>