Commit dca13ea8 authored by litaolemo's avatar litaolemo

update

parent b66ac0cb
......@@ -261,8 +261,8 @@ for t in range(0, task_days):
collects_sql = """
SELECT device_type,active_type,channel_type,if(NVL(sum(1_uv),0) <> 0 ,concat((NVL(sum(search_core_pv),0)/NVL(sum(1_uv),0)) as decimal(18,4)) , 0) as 1_core_pv_division_uv
,if(NVL(sum(1_uv),0) <> 0 ,concat((NVL(sum(1_search_pv),0)/NVL(sum(1_uv),0)) as decimal(18,4)) , 0) as pv_division_uv
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) as decimal(18,4)) , 0) as core_pv_division_uv
,if(NVL(sum(1_uv),0) <> 0 ,NVL(sum(1_search_pv),0)/NVL(sum(1_uv),0) as decimal(18,4), 0) as pv_division_uv
FROM data_table GROUP BY device_type,active_type,channel_type
"""
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