title: SQL: Avg time difference (DD:MM:HH:SS) between two dates
body: <p>I am trying to write a query to know the avg time between two times.  I want to write this by user name.</p>
  
  <p>Here is an example:</p>
  
  <pre><code>Start of time   end of time user name
  12/20/12        1/1/13  1
  12/31/12        1/1/13  2
  12/31/12        1/1/13  3
  1/1/13          1/1/13  2
  1/1/13          1/1/13  3
  1/1/13          1/1/13  1
  1/1/13          1/1/13  2
  1/1/13          1/1/13  3
  1/1/13          1/4/13  3
  9/14/12         1/1/13  2
  1/1/13          1/1/13  2
  1/1/13          1/1/13  1
  </code></pre>
  
  <p>We have three users,</p>
  
  <pre><code>Username: 1
  Username: 2
  Username: 3
  </code></pre>
  
  <p>These 3 users worked started a task at some time (start of time) and end the task at some time (end of time).</p>
  
  <p>I want to know the avg time consumed by these users?></p>
  
  <p>Could help write me query?.</p>