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 |
반응형
'SQL' 카테고리의 다른 글
leetcode 1075. Project Employees I (0) | 2023.04.21 |
---|---|
leetcode 1934. Confirmation Rate (0) | 2023.04.21 |
leetcode 1068. Product Sales Analysis I (0) | 2023.04.14 |
leetcode 1280. Students and Examinations (0) | 2023.04.12 |
leetcode 577. Employee Bonus (0) | 2023.04.12 |
댓글