题解 | #平均播放进度大于60%的视频类别#
平均播放进度大于60%的视频类别
http://www.nowcoder.com/practice/c60242566ad94bc29959de0cdc6d95ef
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_time)>duration,100, (100TIMESTAMPDIFF(second,start_time,end_time)/duration))) > 60 order by progress desc