with t1 as ( select video_info.tag, duration, case when timestampdiff(SECOND,user_info.start_time, user_info.end_time) > duration then 100 else timestampdiff(SECOND,user_info.start_time, user_info.end_time)/duration*100 end as ...