title: Calculating the average time between orders for each customer
body: <p>I've searched all over but cant seem to find how to calculate the average time between orders for each customer.  I'm using Oracle SQL Developer.  Ive tried using the lag() function with no joy.</p>
  
  <p>Example data below shows a customer bought on 3 separate occasions.  The average time between all purchases is 7.5 days ((6+9)/2).  </p>
  
  <pre><code>CustID   OrderDate 
  -------  ---------
  1000000  14-AUG-12
  1000000  23-AUG-12
  1000000  29-AUG-12
  </code></pre>
  
  <p>So how do I calculate that average for each customer? </p>
  
  <p>any help would be much appreciated.</p>