<![CDATA[Article Comments for Kristen Cheyney]]>http://www.sqlmag.com/authors/author/author/5014553/rsscomment/5014553en-USFri, 25 May 2012 10:22:27 GMTFri, 25 May 2012 10:22:27 GMTHow to Determine the Average Number of Days Between Orders or Other Important Eventshttp://www.sqlmag.com/article/tsql3/how-to-determine-the-average-number-of-days-between-orders-or-other-important-events#commentsAnchorThu, 09 Jul 2009 14:01:37 GMT
The algorithm can be simplified significantly. All you need is the number of orders and the first and last order dates: AvgDaysBetweenOrders = (LastOrderDate - FirstOrderDate)/(NumberOfOrders - 1) This is very similar to what jcelko has proposed.]]>
RICHARDThu, 09 Jul 2009 14:01:37 GMThttp://www.sqlmag.com/article/tsql3/how-to-determine-the-average-number-of-days-between-orders-or-other-important-events#commentsAnchor
How to Determine the Average Number of Days Between Orders or Other Important Eventshttp://www.sqlmag.com/article/tsql3/how-to-determine-the-average-number-of-days-between-orders-or-other-important-events#commentsAnchorSun, 28 Jun 2009 17:40:50 GMT
Why not pick a window (start_date end_date) and use (size of window in days) / (# of orders in window) = (avg days between orders)? Ex: If you look at a 30 day window and you had 5 orders ANY TIME in the window, then you averaged one order every 6 days. Draw a time line on paper, represent your orders as counters on the line and it is easier to see.]]>
JoeSun, 28 Jun 2009 17:40:50 GMThttp://www.sqlmag.com/article/tsql3/how-to-determine-the-average-number-of-days-between-orders-or-other-important-events#commentsAnchor
How to Determine the Average Number of Days Between Orders or Other Important Eventshttp://www.sqlmag.com/article/tsql3/how-to-determine-the-average-number-of-days-between-orders-or-other-important-events#commentsAnchorThu, 28 May 2009 08:35:03 GMT
Awesome Article....I will be using this solution over and over again....Thanks]]>
MikeThu, 28 May 2009 08:35:03 GMThttp://www.sqlmag.com/article/tsql3/how-to-determine-the-average-number-of-days-between-orders-or-other-important-events#commentsAnchor