title: SQL Average Inter-arrival Time, Time Between Dates
body: <p>I have a table with sequential timestamps: </p>
  
  <p>2011-03-17 10:31:19</p>
  
  <p>2011-03-17 10:45:49</p>
  
  <p>2011-03-17 10:47:49
  ...</p>
  
  <p>I need to find the average time difference between each of these(there could be dozens) in seconds or whatever is easiest, I can work with it from there. So for example the above inter-arrival time for only the first two times would be 870 (14m 30s). For all three times it would be: (870 + 120)/2 = 445 (7m 25s).</p>
  
  <p>A note, I am using postgreSQL 8.1.22 .</p>
  
  <p>EDIT: The table I mention above is from a different query that is literally just a one-column list of timestamps</p>