select a.log_date, count(distinct a.user_id) as log_cnt, count(distinct b.user_id) as stay_cnt from t_login as a left join t_login as b on a.user_id = b.user_id and b.log_date between date(a.log_date, '+1 day') and date(a.log_date, '+3 day') group by a.log_date
点赞 3

相关推荐

点赞 评论 收藏
分享
牛客网
牛客企业服务