select tag, concat(round(avg( if (TIMESTAMPDIFF(second,start_time,end_time)>duration,100, (100TIMESTAMPDIFF(second,start_time,end_time)/duration))),2),'%') as progress from tb_video_info v join tb_user_video_log uv using(video_id) group by tag having avg( if (TIMESTAMPDIFF(second,start_time,end_t...