SQL
leetcode 1661. Average Time of Process per Machine
무적김두칠
2023. 4. 14. 17:57
https://leetcode.com/problems/average-time-of-process-per-machine/description/
Average Time of Process per Machine - LeetCode
Can you solve this real interview question? Average Time of Process per Machine - Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview.
leetcode.com
1
2
3
4
5
6
|
# Write your MySQL query statement below
select
machine_id,
round(sum(case when activity_type='end' then timestamp else -timestamp end)/count(distinct process_id), 3) processing_time
from Activity
group by machine_id
|
cs |
반응형