title: Time Frequency of Inserts
body: <p>I have data being inserted into a mysql table of the form</p>
  
  <pre><code>id     companyid     date
  </code></pre>
  
  <p>how would I find the time average frequency of inserts by companyid. </p>
  
  <p>Some companies send data daily, some weekly, some every 10 days, etc.</p>
  
  <p>would like a result of the form</p>
  
  <pre><code>companyid     average frequency of inserts
  2       every 5 days
  3       every 10 days
  4       every 2 days
  </code></pre>