
SQL | LeetCode 1661. Self Join + GROUP BY
·
Computer Science/SQL
공장 내 여러 머신이 여러 개의 프로세스를 처리하며, 각 프로세스는 시작(start)과 종료(end) 시각을 갖고 있습니다. 각 머신별 평균 처리 시간(end - start)을 계산해야 합니다.Table: Activity+----------------+---------+| Column Name | Type |+----------------+---------+| machine_id | int || process_id | int || activity_type | enum || timestamp | float |+----------------+---------+The table shows the user activities for a factory w..