|
@@ -33,12 +33,12 @@ def get_pitcher_panel_channel(pitcher,channel,start,end,page,page_size,order_by,
|
|
dt as date,cost,first_order_amount,
|
|
dt as date,cost,first_order_amount,
|
|
if(cost=0,0,first_order_amount/cost) first_roi,
|
|
if(cost=0,0,first_order_amount/cost) first_roi,
|
|
first_order_user,first_order_count,
|
|
first_order_user,first_order_count,
|
|
- if(first_order_user=0,0,cost/first_order_user) first_per_cost,
|
|
|
|
|
|
+ round(if(first_order_user=0,0,cost/first_order_user),2) first_per_cost,
|
|
view_count,click_count,follow_user,
|
|
view_count,click_count,follow_user,
|
|
- if(click_count=0,0,follow_user/click_count) follow_rate,
|
|
|
|
- if(follow_user=0,0,cost/follow_user) follow_per_cost,
|
|
|
|
|
|
+ round(if(click_count=0,0,follow_user/click_count),4) follow_rate,
|
|
|
|
+ round(if(follow_user=0,0,cost/follow_user),2) follow_per_cost,
|
|
total_cost,
|
|
total_cost,
|
|
- if(total_cost=0,0,total_amount/total_cost) back_rate
|
|
|
|
|
|
+ round(if(total_cost=0,0,total_amount/total_cost),4) back_rate
|
|
from dw_channel_daily where dt>='{start}' and dt<='{end}' {op1} {op2}
|
|
from dw_channel_daily where dt>='{start}' and dt<='{end}' {op1} {op2}
|
|
order by {order_by} {order}
|
|
order by {order_by} {order}
|
|
"""
|
|
"""
|