We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 91e529a commit 7a5e1b2Copy full SHA for 7a5e1b2
BASIC JOIN/ult 1661. Average Time of Process per Machine.sql
@@ -0,0 +1,6 @@
1
+# Write your MySQL query statement below
2
+SELECT a1.machine_id, ROUND(AVG(a2.timestamp-a1.timestamp), 3) AS processing_time
3
+FROM Activity a1 JOIN Activity a2
4
+ON a1.machine_id = a2.machine_id AND a2.process_id = a2.process_id
5
+AND a1.activity_type = 'start' AND a2.activity_type = 'end'
6
+GROUP BY machine_id;
0 commit comments