select
first_date
,count(distinct case when by_day=0 then yxuserid else null end) as day_0
,count(distinct case when by_day=1 then yxuserid else null end) as day_1
,count(distinct case when by_day=2 then yxuserid else null end) as day_2
,count(distinct case when by_day=3 then yxuserid else null end) as day_3
,count(distinct case when by_day=4 then yxuserid else null end) as day_4
,count(distinct case when by_day=5 then yxuserid else null end) as day_5
,count(distinct case when by_day=6 then yxuserid else null end) as day_6
,count(distinct case when by_day>=7 then yxuserid else null end) as day_7plus
from
(
select
a.yxuserid
,log_date
,first_date
,datediff(log_date,first_date) as by_day
from
(
select
yxuserid
,to_date(from_unixtime(floor(createtime/1000))) as log_date
from
rdb.ods_db_acthd1912shop_tb_yx_common_task_p
where
ds='2019-12-02'
and createtime>=
计算新访uv次日留存率
最新推荐文章于 2022-07-14 08:10:35 发布
本文介绍如何计算每天新访独立用户(UV)的次日留存率,着重讨论这一指标对于理解用户行为的重要性,同时指出这种方法不包含老用户的次日留存情况。
摘要由CSDN通过智能技术生成