Hi everyone.
My table mysql is:
I try this query and working:
But I do not know the exact location of the rows... can you help me?
My table mysql is:
Code:
ID Dist Date Hour 15 LT 22/10/2009 08:56:05 14 RM 22/10/2009 08:55:20 13 RM 22/10/2009 08:55:19 12 RM 22/10/2009 08:51:22 11 LT 22/10/2009 08:47:19
Code:
SELECT TIMEDIFF(b.hour, a.hour) AS strDiff FROM doTbl_A a JOIN doTbl_A b ON a.ID=b.id-1 OR a.ID=b.id-2 OR a.ID=b.id-3 OR A.ID=b.id-4 WHERE a.DIST=b.DIST AND a.DATE=b.DATE ORDER BY a.ID
Comment