题解 | #平均播放进度大于60%的视频类别#

平均播放进度大于60%的视频类别

https://www.nowcoder.com/practice/c60242566ad94bc29959de0cdc6d95ef

-- 各类视频 的平均播放进度
select
    tag,
    concat(round(avg(if(timestampdiff(second,start_time,end_time) >= duration,duration,timestampdiff(second,start_time,end_time))/duration*100),2),'%') as avg_play_progress
from tb_user_video_log u
join tb_video_info v using(video_id)
group by tag
-- 筛选进度大于60%
having replace(avg_play_progress,'%','') > 60
order by avg_play_progress desc;

全部评论

相关推荐

真烦好烦真烦:牛友太有实力了
点赞 评论 收藏
分享
04-11 23:51
门头沟学院 Java
坚定的芭乐反对画饼_许愿Offer版:人人都能过要面试干嘛,发个美团问卷填一下,明天来上班不就好了
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客企业服务