题解 | #广告点击率排名#

广告点击率排名

https://www.nowcoder.com/practice/489a4e583a4549ba8d788212469276e6

select * from (select uid, ctr_2208,rank() over(order by  ctr_2208 desc,uid desc) as rk_ctr from (select uid,round(sum(is_click)/count(is_click),3) as ctr_2208 from user_res_event_log_tb where rid like 'ad%' and month(event_date) = 8 and year(event_date) =2022 group by uid order by ctr_2208 desc,uid desc) t2 ) t3 where uid in (select uid from (select uid,sum(is_click)/count(is_click) as ctr1 from user_res_event_log_tb where rid like 'ad%' and month(event_date) = 7 and year(event_date) =2022 group by uid order by ctr1 desc,uid desc limit 3) t1) order by uid

全部评论

相关推荐

10-17 12:16
同济大学 Java
7182oat:快快放弃了然后发给我,然后让我也泡他七天最后再拒掉,狠狠羞辱他一把😋
点赞 评论 收藏
分享
点赞 评论 收藏
分享
评论
点赞
收藏
分享
牛客网
牛客企业服务