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

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

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

select 
	tag,
	avg_play_progress
from
(
select
	tag,
	concat(round(avg(
	case
		when process >= 1 then 1
		else process
	end 
	)*100,2), '%') avg_play_progress
	
from
	(
	select
		t2.tag,
		(TIMESTAMPDIFF(second,t1.start_time,t1.end_time)/t2.duration)  process
	from
		tb_user_video_log t1 ,
		tb_video_info t2
	where
		t1.video_id = t2.video_id
	) xxx 
group by tag 
) xxxx 
where cast((left(avg_play_progress,5)) as decimal(5,2)) > 60
order by avg_play_progress desc

全部评论

相关推荐

面试拷打成m:我感觉他说的挺对的,感觉我找不到工作也要去送外卖了,至少饿不死
点赞 评论 收藏
分享
09-17 19:25
已编辑
太原理工大学 游戏测试
叁六玖:公司名发我,我要这个HR带我打瓦
我的秋招日记
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务