题解 | #日活与每日次日留存率#

日活与每日次日留存率

https://www.nowcoder.com/practice/18b168ada98d4bdb9108444443cea7d3

select visit_date,
count(id) as dau,
count(q1) / count(id) as next_day_per
from (
    select t1.id,t1.visit_date,t2.visit_date as q1
    from user_visit_log as t1
    left join user_visit_log as t2
    on t1.id = t2.id and datediff(t2.visit_date,t1.visit_date) = 1
) as temp
group by visit_date;

全部评论

相关推荐

牛客51274894...:照片认真的吗,找个专门拍证件照的几十块钱整端正点吧,要不就别加照片
点赞 评论 收藏
分享
03-19 10:36
云南大学 C++
点赞 评论 收藏
分享
评论
5
收藏
分享

创作者周榜

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