title: SQL select and count all items that have occured before
body: <p>I have a table with rows that symbolize order dates:</p>
  
  <pre><code>2009-05-15 13:31:47.713 
  2009-05-15 22:09:32.227
  2009-05-16 02:38:36.027
  2009-05-16 12:06:49.743
  2009-05-16 16:20:26.680
  2009-05-17 01:36:19.480
  2009-05-18 09:44:46.993
  2009-05-18 14:06:12.073 
  2009-05-18 15:25:47.540
  2009-05-19 10:28:24.150 
  </code></pre>
  
  <p>I would like have query that returns the following:</p>
  
  <pre><code>2009-05-15 2
  2009-05-16 5
  2009-05-17 6
  2009-05-18 9
  2009-05-19 10
  </code></pre>
  
  <p>Basically it keeps a running total of all the orders placed by the end of the day of the date indicated. The orders are not the orders on that day but all the orders since the earliest dates in the table.</p>
  
  <p>This is MSSQL 2000 and the datatype in the first table is just datetime, in the second it could be datetime or string, it doesn't really matter for my purposes.</p>