Commit 4737705f authored by litaolemo's avatar litaolemo

update

parent ab77efac
...@@ -76,8 +76,8 @@ for t in range(0, task_days): ...@@ -76,8 +76,8 @@ for t in range(0, task_days):
,t3.device_os_type as device_type ,t3.device_os_type as device_type
,t3.active_type as active_type ,t3.active_type as active_type
,t3.channel as channel_type ,t3.channel as channel_type
,NVL(t3.search_pv,0) as 1_pv ,NVL(t3.search_pv,0) as pv
,NVL(t3.search_uv,0) as 1_uv ,NVL(t3.search_uv,0) as uv
,NVL(t4.hexin_card_click_pv,0) as search_core_pv ,NVL(t4.hexin_card_click_pv,0) as search_core_pv
,NVL(t4.neirong_card_click_pv,0) as search_pv ,NVL(t4.neirong_card_click_pv,0) as search_pv
FROM FROM
...@@ -261,8 +261,8 @@ for t in range(0, task_days): ...@@ -261,8 +261,8 @@ for t in range(0, task_days):
collects_sql = """ collects_sql = """
SELECT device_type,active_type,channel_type,if(NVL(sum(1_uv),0) <> 0 ,NVL(sum(search_core_pv),0)/NVL(sum(1_uv),0) , 0) as core_pv_division_uv , SELECT device_type,active_type,channel_type,if(NVL(sum(uv),0) <> 0 ,NVL(sum(search_core_pv),0)/NVL(sum(uv),0) , 0) as core_pv_division_uv ,
if(NVL(sum(1_uv),0) <> 0 ,NVL(sum(1_search_pv),0)/NVL(sum(1_uv),0) , 0) as pv_division_uv if(NVL(sum(uv),0) <> 0 ,NVL(sum(search_pv),0)/NVL(sum(uv),0) , 0) as pv_division_uv
FROM data_table GROUP BY device_type,active_type,channel_type FROM data_table GROUP BY device_type,active_type,channel_type
""" """
finnal_df = spark.sql(collects_sql) finnal_df = spark.sql(collects_sql)
......
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