title: Limit rows of every month?
body: <p>I need to get data between Decemember 2012 to November 2014.</p>
  
  <p>Each month I only need 1500 rows. </p>
  
  <p>For example:</p>
  
  <pre><code>SELECT * FROM data WHERE YEAR(submit_date) = 2012 AND MONTH(submit_date) = 12 limit 1500;
  SELECT * FROM data WHERE YEAR(submit_date) = 2013 AND MONTH(submit_date) = 1 limit 1500;
  SELECT * FROM data WHERE YEAR(submit_date) = 2013 AND MONTH(submit_date) = 2 limit 1500;
  SELECT * FROM data WHERE YEAR(submit_date) = 2013 AND MONTH(submit_date) = 3 limit 1500;
  and until Nov 2014
  </code></pre>
  
  <p>Is there a way to write SQL query smaller?</p>