两个select写法
平均播放进度大于60%的视频类别
https://www.nowcoder.com/practice/c60242566ad94bc29959de0cdc6d95ef?tpId=268&&tqId=39483
select tag,concat(round(avg(t_per)*100,2),'%') avg_play_progress from( select v.tag,if(timestampdiff(second,u.start_time,u.end_time)>v.duration, 1, timestampdiff(second,u.start_time,u.end_time)/v.duration ) t_per from tb_user_video_log u left join tb_video_info v on v.video_id=u.video_id )t group by tag having avg(t_per)>0.6 order by avg(t_per) desc;