with d as ( select exam_id, avg(timestampdiff (second, start_time, submit_time)) as time_avg, avg(score) as score_avg from exam_record group by exam_id ), e as ( select emp_id, exam_id, avg(timestampdiff (second, start_time, submit_time)) as time_avg1, avg(score) as score_avg1 from exam_record group...