当天时间的逻辑不是很好得出 select video_id, round((100 * ratio + 5 * fun + 3 * comment_cnt + 2 * retweet) / (1 + lastest_day), 0) from ( select t1.video_id, sum(case when timestampdiff(second, t1.start_time, t1.end_time) < t2.duration then 0 else 1 end) / count(1) ratio, sum(t1.if_like) fun, sum(t1.if_...