title: How can I COUNT the number of rows in a database for different time periods?
body: <p>I've got a table in a Sybase DB with a column createdDateTime.
  What I want to be able to do is count how many rows were created between specific but accumulating time periods, ie: <br>
  7:00 - 7:15 <br/>
  7:00 - 7:30 <br/>
  7:00 - 7:45 <br/>
  7:00 - 8:00
  ...
  and so on until I have the last time group, 7:00 - 18:00. <br/></p>
  
  <p>Is there a nice way to make one query in SQL that will return all the rows for me with all the row counts: <br/>
  Time &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Rows Created <br/>
  7:00 - 7:15&nbsp;&nbsp;&nbsp;&nbsp;    0 <br/>
  7:00 - 7:30&nbsp;&nbsp;&nbsp;&nbsp;    5 <br/>
  7:00 - 7:45&nbsp;&nbsp;&nbsp;&nbsp;    8 <br/>
  7:00 - 8:00&nbsp;&nbsp;&nbsp;&nbsp;    15 <br/>
  ...&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;            ... <br/></p>
  
  <p>I have a solution at the moment, but it requires me running a parameterised query 44 times to get all the data.</p>
  
  <p>Thanks,</p>