Easy Solution using Joins
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```oraclesql []\nselect S.machine_id, Round(AVG(E.timestamp-S.timestamp),3) as processing_time\nfrom Activity S join 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```
['Oracle']