Easy SQL code
\n\n\n# Code\n\n# Write your MySQL query statement below\nSELECT \n    machine_id,\n    ROUND(AVG(IF(activity_type = "end", timestamp, -timestamp)) * 2, 3) AS p
\n\n\n# Code\n```\n# Write your MySQL query statement below\nSELECT \n    machine_id,\n    ROUND(AVG(IF(activity_type = "end", timestamp, -timestamp)) * 2, 3) AS processing_time\nFROM Activity\nGROUP BY machine_id;\n```
['MySQL']