select video_id, round((100*a+5*b+3*c+2*d)/(e+1)) hot_index from ( select tbu.video_id, avg(if(timestampdiff(second,start_time,end_time)>=duration,1,0)) a, sum(if_like) b, count(comment_id) c, sum(if_retweet) d, datediff(date((select max(end_time) from tb_user_video_log)),max(date(end_time))) e f...