SELECT iStop-iStart FROM(SELECT SUM(log_time) AS iStop FROM tbl WHERE status IN (2,3)) a JOIN(SELECT SUM(log_time) AS iStart FROM tbl WHERE status=1) b;
Ovenstående forespørgsel virker kun, hvis pause eller stop er sidste registrering
SELECT iStop-iStart FROM(SELECT SUM(log_time) AS iStop FROM tbl WHERE status IN (2,3)) a JOIN(SELECT SUM(log_time) AS iStart FROM tbl WHERE status=1) b;
Ovenstående forespørgsel virker kun, hvis pause eller stop er sidste registrering