Commit c93a1732 authored by litaolemo's avatar litaolemo

update

parent 0c8ac4ac
...@@ -341,7 +341,6 @@ GROUP BY day_id ...@@ -341,7 +341,6 @@ GROUP BY day_id
cpc_income_sql = r""" cpc_income_sql = r"""
select partition_day, select partition_day,
sum(case when advertise_type = 'cpc' AND advertise_business_type in('service') and advertise_calculate_type='cpc_log' then cpc_click_num end) cpc_click_num,--- 当天cpc商品点击量 sum(case when advertise_type = 'cpc' AND advertise_business_type in('service') and advertise_calculate_type='cpc_log' then cpc_click_num end) cpc_click_num,--- 当天cpc商品点击量
sum(case when advertise_type = 'cpt' AND advertise_business_type in('service') and advertise_calculate_type='cpt_schedule' then cpc_click_num end) cpt_click_num,--- 当天cpt商品点击量
sum(case when advertise_type = 'cpc' AND advertise_business_type in('service') and advertise_calculate_type='cpc_flownext' then proportion_expend_amount end) cpc_proportion_expend_amount,--- 当天cpc总收入(含返点) sum(case when advertise_type = 'cpc' AND advertise_business_type in('service') and advertise_calculate_type='cpc_flownext' then proportion_expend_amount end) cpc_proportion_expend_amount,--- 当天cpc总收入(含返点)
sum(case when advertise_type = 'cpc' AND advertise_business_type in('service') and advertise_calculate_type='cpc_flownext' then proportion_expend_recharge_amount end) cpc_proportion_expend_recharge_amount,--- 当天cpc收入(不含返点) sum(case when advertise_type = 'cpc' AND advertise_business_type in('service') and advertise_calculate_type='cpc_flownext' then proportion_expend_recharge_amount end) cpc_proportion_expend_recharge_amount,--- 当天cpc收入(不含返点)
SUM(CASE SUM(CASE
...@@ -375,8 +374,7 @@ group by partition_day ...@@ -375,8 +374,7 @@ group by partition_day
tol_proportion_expend_amount = res.tol_proportion_expend_amount tol_proportion_expend_amount = res.tol_proportion_expend_amount
print(res) print(res)
print("--------------------------------------------")
print(cpt_click_num)
# #
# out_put_sql = """ # out_put_sql = """
# select bus_detail.referrer_search_welfare_pv / dau_view.dau as pv_div_dau, # select bus_detail.referrer_search_welfare_pv / dau_view.dau as pv_div_dau,
...@@ -389,7 +387,7 @@ group by partition_day ...@@ -389,7 +387,7 @@ group by partition_day
pv_div_dau = referrer_search_welfare_pv/dau pv_div_dau = referrer_search_welfare_pv/dau
pv_div_quanzhong_dau = referrer_search_welfare_pv/quanzhong_dau pv_div_quanzhong_dau = referrer_search_welfare_pv/quanzhong_dau
ad_flow_rat = (cpt_click_num + cpc_click_num)/referrer_search_welfare_pv ad_flow_rat = (pv + cpc_click_num)/referrer_search_welfare_pv
budget_consumption_rate = cpc_proportion_expend_amount/budget budget_consumption_rate = cpc_proportion_expend_amount/budget
cpc_item_pricing = cpc_proportion_expend_recharge_amount/cpc_click_num cpc_item_pricing = cpc_proportion_expend_recharge_amount/cpc_click_num
# tol_proportion_expend_amount # tol_proportion_expend_amount
......
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