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

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

全部评论

相关推荐

点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

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