Commit 010cbfec authored by 魏艺敏's avatar 魏艺敏

push codes

parent 04a89108
......@@ -21,7 +21,9 @@ CREATE TABLE IF NOT EXISTS pm.tl_pm_userclue_d
active_type string comment '{"chs_name":"活跃类型","description":"","etl":"","value":"","remark":""}',
grey_type string comment '{"chs_name":"灰度类型","description":"","etl":"","value":"","remark":""}',
dau bigint comment '{"chs_name":"dau(不去除积分墙)","description":"","etl":"","value":"","remark":""}',
user_num bigint comment '{"chs_name":"注册的用户数","description":"","etl":"","value":"","remark":""}',
total_valid_dev bigint comment '{"chs_name":"总有效咨询设备","description":"","etl":"","value":"","remark":""}',
total_valid_num bigint comment '{"chs_name":"总有效线索","description":"","etl":"","value":"","remark":""}',
msg_num bigint comment '{"chs_name":"私信咨询人次-总计","description":"","etl":"","value":"","remark":""}',
msg_dev bigint comment '{"chs_name":"私信咨询设备数-总计","description":"","etl":"","value":"","remark":""}',
msg_num bigint comment '{"chs_name":"私信咨询人次-总计","description":"","etl":"","value":"","remark":""}',
valid_msg_dev bigint comment '{"chs_name":"有效私信咨询设备数-总计","description":"","etl":"","value":"","remark":""}',
......
......@@ -3,9 +3,9 @@ SELECT
,channel as `渠道`
,device_os_type as `平台`
,COUNT(DISTINCT device.device_id) AS `当天新活量`
,SUM(IF(valid.date_day=device.first_active_date, valid.clue_num, NULL)) AS validUV_1
,SUM(IF(valid.date_day>=device.first_active_date AND valid.date_day<=date_add(device.first_active_date,2), valid.clue_num, NULL)) AS validUV_3
,SUM(IF(valid.date_day>=device.first_active_date AND valid.date_day<=date_add(device.first_active_date,6), valid.clue_num, NULL)) AS validUV_7
,nvl(SUM(IF(valid.date_day=device.first_active_date, valid.clue_num, NULL)),0) AS `当天有效线索`
,nvl(SUM(IF(valid.date_day>=device.first_active_date AND valid.date_day<=date_add(device.first_active_date,2), valid.clue_num, NULL)),0) AS `3日内有效线索`
,nvl(SUM(IF(valid.date_day>=device.first_active_date AND valid.date_day<=date_add(device.first_active_date,6), valid.clue_num, NULL)),0) AS `7日内有效线索`
FROM
(
SELECT
......
......@@ -3,9 +3,9 @@ SELECT
,channel as `渠道`
,device_os_type as `平台`
,COUNT(DISTINCT device.device_id) AS `当天新活量`
,SUM(IF(pv.action_date=device.first_active_date, pv.wel_pv, NULL)) AS meigouPV_1
,SUM(IF(pv.action_date>=device.first_active_date AND pv.action_date<=date_add(device.first_active_date,2), pv.wel_pv, NULL)) AS meigouPV_3
,SUM(IF(pv.action_date>=device.first_active_date AND pv.action_date<=date_add(device.first_active_date,6), pv.wel_pv, NULL)) AS meigouPV_7
,nvl(SUM(IF(pv.action_date=device.first_active_date, pv.wel_pv, NULL)),0) AS `当日核心页pv`
,nvl(SUM(IF(pv.action_date>=device.first_active_date AND pv.action_date<=date_add(device.first_active_date,2), pv.wel_pv, NULL)),0) AS `3日内核心页pv`
,nvl(SUM(IF(pv.action_date>=device.first_active_date AND pv.action_date<=date_add(device.first_active_date,6), pv.wel_pv, NULL)),0) AS `7日内核心页pv`
FROM
(
SELECT
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment