select c.date, count(if(timestemp('day',a.date,b.date)=1,b.id))/count(a.id) '次日留存率' ((select DISTINCT id, date from table where date between '2021-03-01' and '2021-03-31') as a left join table b on a.id = b.id and a.date<b.date) as c group by c.date order by c.date asc
点赞 1

相关推荐

2024-12-05 15:53
中南大学 Java
点赞 评论 收藏
分享
牛客网
牛客企业服务