title: Find the min time interval between rows for a MySQL dataset
body: <p>I have a MySQL table that records the events received for a user and the Date a event is received.</p>
  
  <pre><code>Date                    User
  
  2012-01-21 18:30:02     AAA
  2012-01-21 18:30:05     AAA
  2012-01-21 18:30:08     AAA
  2012-01-21 18:30:11     AAA
  2012-01-21 18:30:15     AAA
  2012-01-21 18:30:18     AAA
  2012-01-21 18:30:21     AAA
  2012-01-21 18:30:23     AAA
  2012-01-21 18:30:26     AAA
  2012-01-21 18:30:29     BBB
  2012-01-21 18:30:32     BBB
  2012-01-21 18:30:33     BBB
  2012-01-21 18:30:37     BBB
  2012-01-21 18:30:40     BBB
  2012-01-21 18:30:42     BBB
  2012-01-21 18:30:44     BBB
  2012-01-21 18:31:01     BBB
  2012-01-21 18:31:04     BBB
  2012-01-21 18:31:07     BBB
  2012-01-21 18:31:10     BBB
  </code></pre>
  
  <p>The events are not sorted by Date or User.</p>
  
  <p>I would like to find out the min of the time interval (in seconds) between two successive events for a single user. So the result set would look like this:</p>
  
  <pre><code>MIN_INTERVAL        USER
  
  3                   AAA
  5                   BBB
  </code></pre>
  
  <p>Can anyone help me come up a SQL query that generate this? I don't think a GROUP BY will help.</p>