I want to find the difference in times between the date/times of two
tasks in the same table.
selfJoin table
task_ID task date_time
1 measure board 2004-11-28 15:53:55
2 cut board 2004-11-28 16:08:03
Here is the best SQL statement I can come up with to find how much
time has passed between those two events:
$sql = "SELECT DIFF(first.date_time, second.date_time) FROM selfJoin
AS first, selfJoin AS second";
What is the correct way to do this?
(Never mind that there will in fact be many tasks in each table. And
I will also want to know the total time difference between the first
task and the last task.)
Thanks,
-Andrew K