代码:
avg 字段平均值
avg+group by分组字段平均值
# Write your MySQL query statement belowselect machine_id, round(avg(if(activity_type='start',-timestamp,timestamp))*2,3)processing_timefrom Activity group by machine_id
京公网安备 11010502049817号