title: Average difference between two dates, grouped by a third field?
body: <p>So say we have 3 fields, <code>username, start_date, end_date</code></p>
  
  <p>Users start and stop multiple records, eg below bob has started and stopped two records.</p>
  
  <pre><code>bob   1/2/13 11:00  1/2/13 13:00
  jack  1/2/13 15:00  1/2/13 18:00
  bob   2/2/13 14:00  1/2/13 19:00
  </code></pre>
  
  <p>I need to know the average time taken (ie diff between start and end), in hours, for each user (ie group by user, not just for each row).</p>
  
  <p>I can't quite get my head around how to do the diff, average AND group by? Any help?</p>