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
d94caf39
Commit
d94caf39
authored
Jun 22, 2020
by
魏艺敏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update codes
parent
acdbec28
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
33 additions
and
30 deletions
+33
-30
meigou_detail_page_dispense_pv.sql
...bak/meigou_detail_page/meigou_detail_page_dispense_pv.sql
+3
-3
meigou_detail_page_dispense_uv.sql
...bak/meigou_detail_page/meigou_detail_page_dispense_uv.sql
+4
-3
meigou_detail_page_source_pv.sql
sqls/bak/meigou_detail_page/meigou_detail_page_source_pv.sql
+13
-12
meigou_detail_page_source_uv.sql
sqls/bak/meigou_detail_page/meigou_detail_page_source_uv.sql
+13
-12
No files found.
sqls/bak/meigou_detail_page/meigou_detail_page_dispense_pv.sql
View file @
d94caf39
...
...
@@ -36,7 +36,7 @@ SELECT `日期`,`设备类型`,`活跃类型`,`渠道`
FROM
(
SELECT
t1
.
partition_date
as
`日期`
,
t1
.
device_type
as
`设备类型`
,
t1
.
device_
os_
type
as
`设备类型`
,
t1
.
active_type
as
`活跃类型`
,
t2
.
channel
as
`渠道`
,
count
(
case
when
type
=
'美购详情页'
then
cl_id
end
)
as
`美购详情页浏览pv`
...
...
@@ -56,7 +56,7 @@ FROM
FROM
(
SELECT
click
.
partition_date
,
click
.
cl_id
,
click
.
type
,
mas
.
active_type
,
mas
.
device_type
,
mas
.
channel
SELECT
click
.
partition_date
,
click
.
cl_id
,
click
.
type
,
mas
.
active_type
,
mas
.
device_
os_
type
,
mas
.
channel
FROM
(
--浏览需要去掉疑似机构刷量的设备
SELECT
pv
.
partition_date
as
partition_date
,
pv
.
cl_id
as
cl_id
,
type
...
...
@@ -305,7 +305,7 @@ FROM
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
GROUP
BY
t1
.
partition_date
,
t1
.
device_
os_
type
,
t1
.
active_type
,
t2
.
channel
)
T1
ORDER
BY
`日期`
desc
,
`设备类型`
,
`活跃类型`
,
`渠道`
sqls/bak/meigou_detail_page/meigou_detail_page_dispense_uv.sql
View file @
d94caf39
...
...
@@ -30,7 +30,7 @@ SELECT `日期`,`设备类型`,`活跃类型`,`渠道`
FROM
(
SELECT
t1
.
partition_date
as
`日期`
,
t1
.
device_type
as
`设备类型`
,
t1
.
device_
os_
type
as
`设备类型`
,
t1
.
active_type
as
`活跃类型`
,
t2
.
channel
as
`渠道`
,
count
(
distinct
case
when
type
=
'美购详情页'
then
cl_id
end
)
as
`美购详情页浏览uv`
...
...
@@ -50,7 +50,7 @@ FROM
FROM
(
SELECT
click
.
partition_date
,
click
.
cl_id
,
click
.
type
,
mas
.
active_type
,
mas
.
device_type
,
mas
.
channel
SELECT
click
.
partition_date
,
click
.
cl_id
,
click
.
type
,
mas
.
active_type
,
mas
.
device_
os_
type
,
mas
.
channel
FROM
(
--浏览需要去掉疑似机构刷量的设备
SELECT
pv
.
partition_date
as
partition_date
,
pv
.
cl_id
as
cl_id
,
type
...
...
@@ -279,6 +279,6 @@ FROM
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
GROUP
BY
t1
.
partition_date
,
t1
.
device_
os_
type
,
t1
.
active_type
,
t2
.
channel
)
T1
ORDER
BY
`日期`
desc
,
`设备类型`
,
`活跃类型`
,
`渠道`
\ No newline at end of file
sqls/bak/meigou_detail_page/meigou_detail_page_source_pv.sql
View file @
d94caf39
SELECT
T1
.
partition_date
as
`日期`
,
T1
.
device_type
as
`设备类型`
,
T1
.
device_
os_
type
as
`设备类型`
,
T1
.
active_type
as
`活跃类型`
,
T1
.
channel
as
`渠道`
,
T1
.
wel_pv
as
`美购详情页pv`
...
...
@@ -173,7 +173,7 @@ SELECT T1.partition_date as `日期`
FROM
(
--能够走向美购详情页的各页面pv/uv
SELECT
t1
.
partition_date
,
t1
.
device_type
,
t1
.
device_
os_
type
,
t1
.
active_type
,
t2
.
channel
,
count
(
case
when
page_name
=
'welfare_detail'
then
t1
.
cl_id
end
)
as
wel_pv
...
...
@@ -194,7 +194,7 @@ FROM
,
count
(
case
when
page_name
in
(
'report_result'
,
'face_detect_result'
)
then
t1
.
cl_id
end
)
as
ai_report_pv
--待之后增加模拟整形页面
FROM
(
SELECT
t1
.
partition_date
,
t1
.
page_name
,
t1
.
cl_id
,
mas
.
device_type
,
mas
.
active_type
,
mas
.
channel
SELECT
t1
.
partition_date
,
t1
.
page_name
,
t1
.
cl_id
,
mas
.
device_
os_
type
,
mas
.
active_type
,
mas
.
channel
FROM
(
SELECT
partition_date
,
page_name
,
cl_id
...
...
@@ -257,12 +257,12 @@ FROM
WHERE
spam_pv
.
cl_id
IS
NULL
)
t1
LATERAL
VIEW
explode
(
t1
.
channel
)
t2
AS
channel
GROUP
BY
t1
.
partition_date
,
t1
.
device_type
,
t1
.
active_type
,
t2
.
channel
GROUP
BY
t1
.
partition_date
,
t1
.
device_
os_
type
,
t1
.
active_type
,
t2
.
channel
)
T1
LEFT
JOIN
(
--不同referrer下的美购详情页pv/uv
SELECT
t1
.
partition_date
,
t1
.
device_type
,
t1
.
device_
os_
type
,
t1
.
active_type
,
t2
.
channel
,
count
(
case
when
referrer
=
'welfare_detail'
then
t1
.
cl_id
end
)
as
wel_pv
...
...
@@ -283,7 +283,7 @@ FROM
,
count
(
case
when
referrer
in
(
'report_result'
,
'face_detect_result'
)
then
t1
.
cl_id
end
)
as
ai_report_pv
--待之后增加模拟整形页面
FROM
(
SELECT
t1
.
partition_date
,
t1
.
referrer
,
t1
.
cl_id
,
mas
.
device_type
,
mas
.
active_type
,
mas
.
channel
SELECT
t1
.
partition_date
,
t1
.
referrer
,
t1
.
cl_id
,
mas
.
device_
os_
type
,
mas
.
active_type
,
mas
.
channel
FROM
(
SELECT
partition_date
,
referrer
,
cl_id
...
...
@@ -346,16 +346,16 @@ FROM
WHERE
spam_pv
.
cl_id
IS
NULL
)
t1
LATERAL
VIEW
explode
(
t1
.
channel
)
t2
AS
channel
GROUP
BY
t1
.
partition_date
,
t1
.
device_type
,
t1
.
active_type
,
t2
.
channel
GROUP
BY
t1
.
partition_date
,
t1
.
device_
os_
type
,
t1
.
active_type
,
t2
.
channel
)
T2
ON
T1
.
partition_date
=
T2
.
partition_date
and
T1
.
device_
type
=
T2
.
device
_type
and
T1
.
device_
os_type
=
T2
.
device_os
_type
AND
T1
.
active_type
=
T2
.
active_type
AND
T1
.
channel
=
T2
.
channel
LEFT
JOIN
(
--点击加车/支付/私信的不同来源
SELECT
t1
.
partition_date
,
t1
.
device_type
,
t1
.
device_
os_
type
,
t1
.
active_type
,
t2
.
channel
,
count
(
case
when
referrer
=
'welfare_detail'
and
action
=
'welfare_multiattribute_click_add'
then
t1
.
cl_id
end
)
as
wel_add_pv
...
...
@@ -409,7 +409,7 @@ FROM
FROM
(
SELECT
t1
.
partition_date
,
t1
.
referrer
,
t1
.
action
,
t1
.
cl_id
,
mas
.
device_type
,
mas
.
active_type
,
mas
.
channel
SELECT
t1
.
partition_date
,
t1
.
referrer
,
t1
.
action
,
t1
.
cl_id
,
mas
.
device_
os_
type
,
mas
.
active_type
,
mas
.
channel
FROM
(
--点击加车/支付
SELECT
partition_date
,
referrer
,
action
,
cl_id
...
...
@@ -503,10 +503,10 @@ FROM
WHERE
spam_pv
.
cl_id
IS
NULL
)
t1
LATERAL
VIEW
explode
(
t1
.
channel
)
t2
AS
channel
GROUP
BY
t1
.
partition_date
,
t1
.
device_type
,
t1
.
active_type
,
t2
.
channel
GROUP
BY
t1
.
partition_date
,
t1
.
device_
os_
type
,
t1
.
active_type
,
t2
.
channel
)
T3
ON
T1
.
partition_date
=
T3
.
partition_date
and
T1
.
device_
type
=
T3
.
device
_type
and
T1
.
device_
os_type
=
T3
.
device_os
_type
AND
T1
.
active_type
=
T3
.
active_type
AND
T1
.
channel
=
T3
.
channel
ORDER
BY
`日期`
desc
,
`设备类型`
,
`活跃类型`
,
`渠道`
\ No newline at end of file
sqls/bak/meigou_detail_page/meigou_detail_page_source_uv.sql
View file @
d94caf39
SELECT
T1
.
partition_date
as
`日期`
,
T1
.
device_type
as
`设备类型`
,
T1
.
device_
os_
type
as
`设备类型`
,
T1
.
active_type
as
`活跃类型`
,
T1
.
channel
as
`渠道`
,
T1
.
wel_uv
as
`美购详情页uv`
...
...
@@ -167,7 +167,7 @@ SELECT T1.partition_date as `日期`
FROM
(
SELECT
t1
.
partition_date
,
t1
.
device_type
,
t1
.
device_
os_
type
,
t1
.
active_type
,
t2
.
channel
,
count
(
distinct
case
when
page_name
=
'welfare_detail'
then
t1
.
cl_id
end
)
as
wel_uv
...
...
@@ -188,7 +188,7 @@ FROM
,
count
(
distinct
case
when
page_name
in
(
'report_result'
,
'face_detect_result'
)
then
t1
.
cl_id
end
)
as
ai_report_uv
--待之后增加模拟整形页面
FROM
(
SELECT
t1
.
partition_date
,
t1
.
page_name
,
t1
.
cl_id
,
mas
.
device_type
,
mas
.
active_type
,
mas
.
channel
SELECT
t1
.
partition_date
,
t1
.
page_name
,
t1
.
cl_id
,
mas
.
device_
os_
type
,
mas
.
active_type
,
mas
.
channel
FROM
(
SELECT
partition_date
,
page_name
,
cl_id
...
...
@@ -251,12 +251,12 @@ FROM
WHERE
spam_pv
.
cl_id
IS
NULL
)
t1
LATERAL
VIEW
explode
(
t1
.
channel
)
t2
AS
channel
GROUP
BY
t1
.
partition_date
,
t1
.
device_type
,
t1
.
active_type
,
t2
.
channel
GROUP
BY
t1
.
partition_date
,
t1
.
device_
os_
type
,
t1
.
active_type
,
t2
.
channel
)
T1
LEFT
JOIN
(
--不同referrer下的美购详情页uv/uv
SELECT
t1
.
partition_date
,
t1
.
device_type
,
t1
.
device_
os_
type
,
t1
.
active_type
,
t2
.
channel
,
count
(
distinct
case
when
referrer
=
'welfare_detail'
then
t1
.
cl_id
end
)
as
wel_uv
...
...
@@ -277,7 +277,7 @@ FROM
,
count
(
distinct
case
when
referrer
in
(
'report_result'
,
'face_detect_result'
)
then
t1
.
cl_id
end
)
as
ai_report_uv
--待之后增加模拟整形页面
FROM
(
SELECT
t1
.
partition_date
,
t1
.
referrer
,
t1
.
cl_id
,
mas
.
device_type
,
mas
.
active_type
,
mas
.
channel
SELECT
t1
.
partition_date
,
t1
.
referrer
,
t1
.
cl_id
,
mas
.
device_
os_
type
,
mas
.
active_type
,
mas
.
channel
FROM
(
SELECT
partition_date
,
referrer
,
cl_id
...
...
@@ -340,16 +340,16 @@ FROM
WHERE
spam_pv
.
cl_id
IS
NULL
)
t1
LATERAL
VIEW
explode
(
t1
.
channel
)
t2
AS
channel
GROUP
BY
t1
.
partition_date
,
t1
.
device_type
,
t1
.
active_type
,
t2
.
channel
GROUP
BY
t1
.
partition_date
,
t1
.
device_
os_
type
,
t1
.
active_type
,
t2
.
channel
)
T2
ON
T1
.
partition_date
=
T2
.
partition_date
and
T1
.
device_
type
=
T2
.
device
_type
and
T1
.
device_
os_type
=
T2
.
device_os
_type
AND
T1
.
active_type
=
T2
.
active_type
AND
T1
.
channel
=
T2
.
channel
LEFT
JOIN
(
--点击加车/支付/私信的不同来源
SELECT
t1
.
partition_date
,
t1
.
device_type
,
t1
.
device_
os_
type
,
t1
.
active_type
,
t2
.
channel
,
count
(
distinct
case
when
referrer
=
'welfare_detail'
and
action
=
'welfare_multiattribute_click_add'
then
t1
.
cl_id
end
)
as
wel_add_uv
...
...
@@ -403,7 +403,7 @@ FROM
FROM
(
SELECT
t1
.
partition_date
,
t1
.
referrer
,
t1
.
action
,
t1
.
cl_id
,
mas
.
device_type
,
mas
.
active_type
,
mas
.
channel
SELECT
t1
.
partition_date
,
t1
.
referrer
,
t1
.
action
,
t1
.
cl_id
,
mas
.
device_
os_
type
,
mas
.
active_type
,
mas
.
channel
FROM
(
--点击加车/支付
SELECT
partition_date
,
referrer
,
action
,
cl_id
...
...
@@ -497,10 +497,10 @@ FROM
WHERE
spam_pv
.
cl_id
IS
NULL
)
t1
LATERAL
VIEW
explode
(
t1
.
channel
)
t2
AS
channel
GROUP
BY
t1
.
partition_date
,
t1
.
device_type
,
t1
.
active_type
,
t2
.
channel
GROUP
BY
t1
.
partition_date
,
t1
.
device_
os_
type
,
t1
.
active_type
,
t2
.
channel
)
T3
ON
T1
.
partition_date
=
T3
.
partition_date
and
T1
.
device_
type
=
T3
.
device
_type
and
T1
.
device_
os_type
=
T3
.
device_os
_type
AND
T1
.
active_type
=
T3
.
active_type
AND
T1
.
channel
=
T3
.
channel
ORDER
BY
`日期`
desc
,
`设备类型`
,
`活跃类型`
,
`渠道`
\ No newline at end of file
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