已有用户消费数据表detail_usr_comsume_list
已知用户数10000,其中付费用户数2400
根据各自指标中间的25%~75%均值作为判断高低的指标
R(Recency)
select avg(R) as avg_R
from(
select *,row_number() over (partition by R) as rank_R
from(
select uid,datediff('2024-07-01',max(usr_datetime)) as R
from detail_usr_comsume_list
where consume>0
group by uid
)t
)tt
where rank_R between 600 and 1800;
F(Frequency)
with tb1 as(
select uid,count(usr_datetime) cum_cnt
from detail_usr_comsume_list
where consume>0
group by uid
),
tb2 as(
select uid
from(
select uid,cnt_rank
from (
select uid, row_number() over (order by cum_cnt) as cnt_rank
from tb1
)t
where cnt_rank between 600 and 1800
)tt
)
select avg(cum_cnt) as avg_F
from tb1
where uid in (select uid from tb2);
M(Monetary)
with tb1 as(
select uid,sum(consume) cum_sum
from detail_usr_comsume_list
where consume>0
group by uid
),
tb2 as(
select uid
from(
select uid,cum_rank
from (
select uid, row_number() over (order by cum_sum) as cum_rank
from tb1
)t
where cum_rank between 600 and 1800
)tt
)
select avg(cum_sum) as avg_M
from tb1
where uid in (select uid from tb2);
生产用户tag表格
create table pay_usr_tag as
with tb as (
select uid ,
datediff('2024-07-01',max(usr_datetime)) as R,
count(usr_datetime) as F,
sum(consume) as M
from detail_usr_comsume_list
where consume>0
group by uid
)
select *,case
when R < 16 and F >2 and M>=682 then '重要价值用户'
when R < 16 and F <=2 and M>=682 then '重要发展用户'
when R >=16 and F >2 and M>=682 then '重要保持用户'
when R >=16 and F <=2 and M>=682 then '重要挽留用户'
when R < 16 and F >2 and M<682 then '一般价值用户'
when R < 16 and F <=2 and M<682 then '一般发展用户'
when R >=16 and F >2 and M<682 then '一般保持用户'
when R >=16 and F <=2 and M<682 then '一般挽留用户'end as usr_tag
from tb;
create table usr_tag_info as
select usr_tag,count(*) as cnt,sum(M) as sum_amount
from pay_usr_tag
group by usr_tag;
create table point_usr_info as
with tb1 as
(
select uid
from pay_usr_tag
where usr_tag='重要价值用户'
)
select parts,
sum(if(gender='男',1,0)) as male,sum(if(gender='女',1,0)) as female,
count(city) city_cnt,
round(avg(age),1) as avg_age,
round(avg(levels),1) as avg_level,
round(avg(usr_amount),1) as avg_amount,
round(sum(usr_amount),1 )as sum_amount
from usr_info_list_PT lateral view explode(split(forums," ")) fm as parts
where usr_info_list_PT.uid in (select tb1.uid from tb1)
group by parts;
可视化部分
建议:
可以看到体量前三的用户占总体的96%分别是 重要价值用户、一般挽留用户、一般发展用户。其中 重要价值用户
一类占比40%但消费占总体的90%,用户消费还有很大的挖掘空间。
人群转换
1.虽然一般挽留用户的人数更多,但是考虑转换成本问题,可以优先从一般发展用户入手,增加消费频次F,使其转换为一般价值用户,后期逐渐诱导提高消费金额。
2.一般挽留用户,RFM值都比较低,可以先刺激近期进行一次消费,使其转换为一般发展用户,后期逐渐诱导增加消费频次。
结合另一文中《拟某款抽卡手游的6月份封测报告》社区分析表formus_info中筛选其中uid为重要价值用户的玩家,可以发现前4种社交平台与年龄特征等都符合核心用户特征。
其中虎扑平台中重要价值用户消费相对整体而言欲望降低,说明其他类型的用户有更高的消费欲望,为人群转换的关注目标。
小红书平台上的重要价值用户中,消费欲望明显更高,但是基于本身的用户基数较低,需要继续分析重要价值用户在小红书名平台的占比情况与特诊是否符合这个平台整体的情况,来区分是否为少数的例外,再考虑是否投入。
原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。
如有侵权,请联系 cloudcommunity@tencent.com 删除。
原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。
如有侵权,请联系 cloudcommunity@tencent.com 删除。