select id,job_id,start_time,end_time,update_time,sum(TIMESTAMPDIFF(SECOND,start_time,end_time)) time from walmart_rank_tool_job_detail WHERE status in (3,4) and update_time like "2019-06-04%" GROUP BY update_time