select a.emp_id as emp_id, emp_level, tag as exam_tag from emp_info a, examination_info b, ( select *, avg(timestampdiff (second, start_time, submit_time)) over ( partition by exam_id ) as avg_time, avg(score) over ( partition by exam_id ) as avg_score from exam_record ) c where a.emp_id = c.emp_id ...