Skip to content

Commit 2290339

Browse files
committed
1661
1 parent 310966e commit 2290339

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Write your MySQL query statement below
2+
SELECT
3+
a1.machine_id,
4+
ROUND(AVG(a2.timestamp - a1.timestamp), 3) AS processing_time
5+
FROM
6+
Activity a1,
7+
Activity a2
8+
WHERE
9+
a1.machine_id = a2.machine_id
10+
AND
11+
a1.process_id = a2.process_id
12+
AND
13+
a1.activity_type = 'start'
14+
AND
15+
a2.activity_type = 'end'
16+
GROUP BY
17+
machine_id;

0 commit comments

Comments
 (0)