Simple SQL Solution
Code\n\nSelect s.machine_id, \n        round(avg(e.timestamp-s.timestamp), 3) as processing_time\nfrom Activity s \njoin Activity e\non s.machine_id = e.machine
# Code\n```\nSelect s.machine_id, \n        round(avg(e.timestamp-s.timestamp), 3) as processing_time\nfrom Activity s \njoin Activity e\non s.machine_id = e.machine_id \nand s.process_id = e.process_id\nand s.activity_type = \'start\' \nand e.activity_type = \'end\'\ngroup by s.machine_id;\n```
['MySQL']