title: one sql query for all count of posts each day
body: <p>I have been trying to make one generic query in which i'll get the <code>(Count of number of posts being submitted each day (separately) in a respective month count(postid))</code> </p>
  
  <p>Like lets suppose month is january so query returns something like following. </p>
  
  <p><em>Output from one sql query:</em></p>
  
  <p>Day&nbsp;&nbsp; :&nbsp;&nbsp; Nummber of posts</p>
  
  <p>1    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;      5</p>
  
  <p>2    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;       3</p>
  
  <p>3    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;       9</p>
  
  <p>and so on..</p>
  
  <p>Kindly let me know what is a right way to do that or any other good generic alternative, I am trying to avoid making multiple queries to count post for each respective day.</p>
  
  <p>Table Structure:
  <code>ID | postid | post | date</code></p>
  
  <pre><code>Select count(postid) from posts where month="JAN"
  </code></pre>