We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8642961 commit 07ae498Copy full SHA for 07ae498
1661-average-time-of-process-per-machine.sql
@@ -0,0 +1,6 @@
1
+# Write your MySQL query statement below
2
+SELECT s.machine_id, ROUND(AVG(e.timestamp-s.timestamp), 3) AS processing_time
3
+FROM Activity s JOIN Activity e ON
4
+ s.machine_id = e.machine_id AND s.process_id = e.process_id AND
5
+ s.activity_type = 'start' AND e.activity_type = 'end'
6
+GROUP BY s.machine_id;
0 commit comments