1661.sql (285B)
1 SELECT A1.machine_id, ROUND(AVG(A2.timestamp - A1.timestamp), 3) AS processing_time 2 FROM Activity A1, Activity A2 3 WHERE A1.machine_id = A2.machine_id AND 4 A1.process_id = A2.process_id AND 5 A1.activity_type = 'start' AND 6 A2.activity_type = 'end' 7 GROUP BY A1.machine_id