mysql> SELECT CONCAT("Calculated difference between id ",t1.id," and id ",t2.id," is ",TIMESTAMPDIFF(SECOND,t1.time,t2.time)," seconds") AS difference FROM example AS t1, example AS t2 WHERE t1.id