Commit ccb10d2d authored by litaolemo's avatar litaolemo

update

parent e4e03538
...@@ -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,ROUND(if(NVL(sum(uv),0) <> 0 ,NVL(sum(search_core_pv),0)/NVL(sum(uv),0) , 0),5) as core_pv_division_uv , SELECT device_type,active_type,channel_type,ROUND(if(NVL(sum(uv),0) <> 0 ,NVL(sum(search_core_pv),0)/NVL(sum(uv),0)*100 , 0),5) as core_pv_division_uv ,
ROUND(if(NVL(sum(uv),0) <> 0 ,NVL(sum(search_pv),0)/NVL(sum(uv),0) , 0),5) as pv_division_uv ROUND(if(NVL(sum(uv),0) <> 0 ,NVL(sum(search_pv),0)/NVL(sum(uv),0)*100 , 0),5) 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