select video_id,round(count(if(timestampdiff(second,start_time,end_time) >= duration,1,null)) / count(*),3)avg_comp_play_rate from tb_video_info tvi left join tb_user_video_log tuvl using(video_id) inner join (  ...