EASILY UNDERSTANDABLE SOLUTION
Code\n\nselect a.machine_id ,round(avg(b.timestamp-a.timestamp),3) as processing_time \nfrom Activity a join Activity b on a.machine_id= b.machine_id and a.proc
# Code\n```\nselect a.machine_id ,round(avg(b.timestamp-a.timestamp),3) as processing_time \nfrom Activity a join Activity b on a.machine_id= b.machine_id and a.process_id=b.process_id \nwhere a.activity_type=\'start\' and b.activity_type=\'end\'\ngroup by machine_id \n```
['MySQL']