|
@@ -44,6 +44,7 @@ mid AS u_id
|
|
|
,ceil(log2(total_time + 1)) as i_play_len
|
|
|
,ceil(log2(i_days_since_upload + 1)) as i_days_since_upload -- 发布时间(距离现在天数)
|
|
|
-- 基础特征_场景
|
|
|
+,apptype AS ctx_apptype
|
|
|
,ctx_day AS ctx_day
|
|
|
,ctx_week AS ctx_week
|
|
|
,ctx_hour AS ctx_hour
|
|
@@ -56,6 +57,9 @@ mid AS u_id
|
|
|
,rootmid AS ui_root_id
|
|
|
,shareid AS ui_share_id
|
|
|
-- 统计特征_用户
|
|
|
+,u_cycle_bucket_7days
|
|
|
+,u_cycle_bucket_30days
|
|
|
+,u_share_bucket_30days
|
|
|
,ceil(log2(u_1day_exp_cnt + 1)) as u_1day_exp_cnt
|
|
|
,ceil(log2(u_1day_click_cnt + 1)) as u_1day_click_cnt
|
|
|
,ceil(log2(u_1day_share_cnt + 1)) as u_1day_share_cnt
|
|
@@ -129,6 +133,15 @@ and apptype != '13'
|
|
|
), candidate_user as (
|
|
|
SELECT
|
|
|
u_id,
|
|
|
+ max(u_brand) as u_brand,
|
|
|
+ max(u_device) as u_device,
|
|
|
+ max(u_system) as u_system,
|
|
|
+ max(u_system_ver) as u_system_ver,
|
|
|
+ max(ctx_region) as ctx_region,
|
|
|
+ max(ctx_city) as ctx_city,
|
|
|
+ max(u_cycle_bucket_7days) as u_cycle_bucket_7days,
|
|
|
+ max(u_cycle_bucket_30days) as u_cycle_bucket_30days,
|
|
|
+ max(u_share_bucket_30days) as u_share_bucket_30days,
|
|
|
max(u_1day_exp_cnt) as u_1day_exp_cnt,
|
|
|
max(u_1day_click_cnt) as u_1day_click_cnt,
|
|
|
max(u_1day_share_cnt) as u_1day_share_cnt,
|