Commit c94f9912 authored by litaolemo's avatar litaolemo

update

parent 4a2b561b
...@@ -132,7 +132,6 @@ for t in range(2, 3): ...@@ -132,7 +132,6 @@ for t in range(2, 3):
AND first_channel_source_type not LIKE 'promotion\_jf\_%' AND first_channel_source_type not LIKE 'promotion\_jf\_%'
)t1 JOIN )t1 JOIN
(
(--卡片,卡片id和session_id去重 (--卡片,卡片id和session_id去重
SELECT partition_date, SELECT partition_date,
cl_id, cl_id,
...@@ -191,9 +190,9 @@ for t in range(2, 3): ...@@ -191,9 +190,9 @@ for t in range(2, 3):
)a )a
LATERAL VIEW explode (a.recommend_type) v as recommend_type LATERAL VIEW explode (a.recommend_type) v as recommend_type
group by partition_date,card_content_type,cl_id,v.recommend_type,card_id having session_pv0 >0 group by partition_date,card_content_type,cl_id,v.recommend_type,card_id having session_pv0 >0
)t3
UNION UNION
(SELECT partition_date, SELECT partition_date,
cl_id, cl_id,
count(distinct card_id) as session_pv0 count(distinct card_id) as session_pv0
FROM FROM
...@@ -249,10 +248,8 @@ for t in range(2, 3): ...@@ -249,10 +248,8 @@ for t in range(2, 3):
app_session_id app_session_id
)a )a
LATERAL VIEW explode (a.recommend_type) v as recommend_type LATERAL VIEW explode (a.recommend_type) v as recommend_type
group by partition_date,cl_id having session_pv0 >= 4) a1 group by partition_date,cl_id having session_pv0 >= 4
) t0 ) t0 on t1.device_id = t0.cl_id
on t1.device_id = t0.cl_id
LEFT JOIN LEFT JOIN
(--精准曝光,卡片id和session_id去重 (--精准曝光,卡片id和session_id去重
SELECT partition_date, SELECT partition_date,
......
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