Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
B
bi-report
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
data
bi-report
Commits
f3a4c0fe
Commit
f3a4c0fe
authored
Jun 22, 2020
by
魏艺敏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update codes
parent
0356a45e
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
32 additions
and
32 deletions
+32
-32
meigou-detail-page-dispense-pv.sql
...bak/meigou-detail-page/meigou-detail-page-dispense-pv.sql
+32
-32
daily_content_data_insert.sql
sqls/daily_content_data_insert/daily_content_data_insert.sql
+0
-0
create_daliy_content.sql
tables/daily_content/create_daliy_content.sql
+0
-0
create_recommend_daily_data.sql
.../daily_recommend_strategy/create_recommend_daily_data.sql
+0
-0
create_search_click_path.sql
tables/search_related/create_search_click_path.sql
+0
-0
create_search_input_type.sql
tables/search_related/create_search_input_type.sql
+0
-0
create_search_result_click_rate.sql
tables/search_related/create_search_result_click_rate.sql
+0
-0
No files found.
sqls/bak/meigou-detail-page/meigou-detail-page-dispense-pv.sql
View file @
f3a4c0fe
...
...
@@ -266,37 +266,37 @@ FROM
AND
page_name
=
'welfare_detail'
AND
action
=
'page_click_share'
)
click
JOIN
(
SELECT
partition_date
,
device_os_type
AS
device_type
,
CASE
WHEN
active_type
=
'4'
THEN
'老活跃设备'
WHEN
active_type
IN
(
'1'
,
'2'
)
THEN
'新增设备'
END
AS
active_type
,
array
(
CASE
WHEN
tmp
.
time
=
'AI'
THEN
'AI'
ELSE
'其他'
END
,
'合计'
)
as
channel
,
device_id
FROM
online
.
ml_device_day_active_status
LEFT
JOIN
(
SELECT
phone
,
time
FROM
offline
.
tmp_zhx_20191227
WHERE
flag
=
'0204_danlei_channel'
)
tmp
on
first_channel_source_type
=
tmp
.
phone
WHERE
partition_date
>=
regexp_replace
((
current_date
-
interval
'90'
day
),
'-'
,
''
)
AND
partition_date
<
regexp_replace
((
current_date
),
'-'
,
''
)
AND
active_type
IN
(
'1'
,
'2'
,
'4'
)
AND
first_channel_source_type
not
IN
(
'yqxiu1'
,
'yqxiu2'
,
'yqxiu3'
,
'yqxiu4'
,
'yqxiu5'
,
'mxyc1'
,
'mxyc2'
,
'mxyc3'
,
'wanpu'
,
'jinshan'
,
'jx'
,
'maimai'
,
'zhuoyi'
,
'huatian'
,
'suopingjingling'
,
'mocha'
,
'mizhe'
,
'meika'
,
'lamabang'
,
'js-az1'
,
'js-az2'
,
'js-az3'
,
'js-az4'
,
'js-az5'
,
'jfq-az1'
,
'jfq-az2'
,
'jfq-az3'
,
'jfq-az4'
,
'jfq-az5'
,
'toufang1'
,
'toufang2'
,
'toufang3'
,
'toufang4'
,
'toufang5'
,
'toufang6'
,
'TF-toufang1'
,
'TF-toufang2'
,
'TF-toufang3'
,
'TF-toufang4'
,
'TF-toufang5'
,
'tf-toufang1'
,
'tf-toufang2'
,
'tf-toufang3'
,
'tf-toufang4'
,
'tf-toufang5'
,
'benzhan'
,
'promotion_aso100'
,
'promotion_qianka'
,
'promotion_xiaoyu'
,
'promotion_dianru'
,
'promotion_malioaso'
,
'promotion_malioaso-shequ'
,
'promotion_shike'
,
'promotion_julang_jl03'
,
'promotion_zuimei'
,
''
,
'unknown'
)
AND
first_channel_source_type
not
LIKE
'promotion
\_
jf
\_
%'
)
mas
ON
click
.
cl_id
=
mas
.
device_id
AND
click
.
partition_date
=
mas
.
partition_date
)
t1
LATERAL
VIEW
explode
(
t1
.
channel
)
t2
AS
channel
GROUP
BY
t1
.
partition_date
,
t1
.
device_type
,
t1
.
active_type
,
t2
.
channel
)
T1
JOIN
(
SELECT
partition_date
,
device_os_type
AS
device_type
,
CASE
WHEN
active_type
=
'4'
THEN
'老活跃设备'
WHEN
active_type
IN
(
'1'
,
'2'
)
THEN
'新增设备'
END
AS
active_type
,
array
(
CASE
WHEN
tmp
.
time
=
'AI'
THEN
'AI'
ELSE
'其他'
END
,
'合计'
)
as
channel
,
device_id
FROM
online
.
ml_device_day_active_status
LEFT
JOIN
(
SELECT
phone
,
time
FROM
offline
.
tmp_zhx_20191227
WHERE
flag
=
'0204_danlei_channel'
)
tmp
on
first_channel_source_type
=
tmp
.
phone
WHERE
partition_date
>=
regexp_replace
((
current_date
-
interval
'90'
day
),
'-'
,
''
)
AND
partition_date
<
regexp_replace
((
current_date
),
'-'
,
''
)
AND
active_type
IN
(
'1'
,
'2'
,
'4'
)
AND
first_channel_source_type
not
IN
(
'yqxiu1'
,
'yqxiu2'
,
'yqxiu3'
,
'yqxiu4'
,
'yqxiu5'
,
'mxyc1'
,
'mxyc2'
,
'mxyc3'
,
'wanpu'
,
'jinshan'
,
'jx'
,
'maimai'
,
'zhuoyi'
,
'huatian'
,
'suopingjingling'
,
'mocha'
,
'mizhe'
,
'meika'
,
'lamabang'
,
'js-az1'
,
'js-az2'
,
'js-az3'
,
'js-az4'
,
'js-az5'
,
'jfq-az1'
,
'jfq-az2'
,
'jfq-az3'
,
'jfq-az4'
,
'jfq-az5'
,
'toufang1'
,
'toufang2'
,
'toufang3'
,
'toufang4'
,
'toufang5'
,
'toufang6'
,
'TF-toufang1'
,
'TF-toufang2'
,
'TF-toufang3'
,
'TF-toufang4'
,
'TF-toufang5'
,
'tf-toufang1'
,
'tf-toufang2'
,
'tf-toufang3'
,
'tf-toufang4'
,
'tf-toufang5'
,
'benzhan'
,
'promotion_aso100'
,
'promotion_qianka'
,
'promotion_xiaoyu'
,
'promotion_dianru'
,
'promotion_malioaso'
,
'promotion_malioaso-shequ'
,
'promotion_shike'
,
'promotion_julang_jl03'
,
'promotion_zuimei'
,
''
,
'unknown'
)
AND
first_channel_source_type
not
LIKE
'promotion
\_
jf
\_
%'
)
mas
ON
click
.
cl_id
=
mas
.
device_id
AND
click
.
partition_date
=
mas
.
partition_date
)
t1
LATERAL
VIEW
explode
(
t1
.
channel
)
t2
AS
channel
GROUP
BY
t1
.
partition_date
,
t1
.
device_type
,
t1
.
active_type
,
t2
.
channel
)
T1
ORDER
BY
`日期`
desc
,
`设备类型`
,
`活跃类型`
,
`渠道`
sqls/daily_content_data_insert/daily_content_data_insert.sql
View file @
f3a4c0fe
This diff is collapsed.
Click to expand it.
tables/create_daliy_content.sql
→
tables/
daily_content/
create_daliy_content.sql
View file @
f3a4c0fe
File moved
tables/create_recommend_daily_data.sql
→
tables/
daily_recommend_strategy/
create_recommend_daily_data.sql
View file @
f3a4c0fe
File moved
tables/create_search_click_path.sql
→
tables/
search_related/
create_search_click_path.sql
View file @
f3a4c0fe
File moved
tables/create_search_input_type.sql
→
tables/
search_related/
create_search_input_type.sql
View file @
f3a4c0fe
File moved
tables/create_search_result_click_rate.sql
→
tables/
search_related/
create_search_result_click_rate.sql
View file @
f3a4c0fe
File moved
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment