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 67d404d commit 5ec7a63Copy full SHA for 5ec7a63
SQL/SQL-50/Average_Time_of_Process_per_Machine.sql
@@ -0,0 +1,5 @@
1
+select a1.machine_id, round(sum(a2.timestamp - a1.timestamp) / count(a1.machine_id), 3) as processing_time
2
+from Activity a1
3
+join Activity a2
4
+on a1.activity_type = "start" and a2.activity_type = "end" and a1.process_id = a2.process_id and a1.machine_id = a2.machine_id
5
+group by a1.machine_id;
0 commit comments