title: mysql number of rows per hour
body: <p>I have a table where each row has a timestamp. Is there a query I can run that can count the number of rows per hour. Outputting a row for each hour with a field for the number of rows encompassed?</p>
  
  <p>e.g </p>
  
  <pre><code>id timestamp
  
  10 2010-09-19 21:05:05
  
  11 2010-09-19 22:05:30
  
  12 2010-09-19 23:05:05
  
  13 2010-09-19 23:05:05
  
  number of rows | hour
  1                21
  1                22
  2                23
  </code></pre>
  
  <p>I guess there might be problems with using the hour as there will be duplicate hours... so maybe '2010-09-19 21' or just a number representing the period (e.g in the example 2010-09-19 21 is 1)</p>
  
  <p>TIA </p>