题解 | #计算用户的平均次日留存率#

计算用户的平均次日留存率

http://www.nowcoder.com/practice/126083961ae0415fbde061d7ebbde453

select count(t3.device_id)/count(t2.device_id) as avg_ret from (select t1.*,date_add(t1.date,interval 1 day) as diertian from (select distinct device_id,date from question_practice_detail ) as t1) as t2 left join (select distinct device_id,date from question_practice_detail) as t3 on t2.device_id=t3.device_id and t2.diertian=t3.date;

全部评论

相关推荐

听说改名字就能收到offer哈:Radis写错了兄弟
点赞 评论 收藏
分享
评论
点赞
收藏
分享
牛客网
牛客企业服务