query for all 3 db | simple query using self join and then group by on machine_id
\n\nselect a1.machine_id as MACHINE_ID, round(avg(a2.TIMESTAMP - a1.TIMESTAMP),3) as processing_time \nfrom Activity a1 inner join Activity a2 \non a1.machine_i
\n```\nselect a1.machine_id as MACHINE_ID, round(avg(a2.TIMESTAMP - a1.TIMESTAMP),3) as processing_time \nfrom Activity a1 inner join Activity a2 \non a1.machine_id = a2.machine_id and a1.process_id=a2.process_id and a1.ACTIVITY_TYPE not in (a2.ACTIVITY_TYPE,\'end\') \ngroup by a1.machine_id;\n```
['MySQL', 'Oracle', 'MS SQL Server']