|
@@ -448,10 +448,12 @@ def get_channel_order_trend(channel,pitcher,start,end,page,page_size,order_by,or
|
|
|
op4 = f" and dt<='{end}' " if end else ''
|
|
|
op5 = f" order by {order_by} {order}" if order_by and order else ''
|
|
|
|
|
|
- sql=f"""select stage,pitcher,a.channel,a.dt date,book,
|
|
|
- node/100 require_roi,round(100/node,2) require_mult,
|
|
|
- round(first_order_amount*100/node-cost,2) expect_profit,
|
|
|
- cost,
|
|
|
+ sql=f"""select stage,pitcher,a.channel,a.dt date,book,cost,
|
|
|
+-- node/100 require_roi,round(100/node,2) require_mult,
|
|
|
+-- round(first_order_amount*100/node-cost,2) expect_profit,
|
|
|
+--
|
|
|
+ 0 require_roi,0 require_mult,
|
|
|
+ 0 expect_profit,
|
|
|
first_order_amount first_amount,
|
|
|
reg_order_amount reg_amount,
|
|
|
reg_order_amount-cost profit,
|
|
@@ -527,7 +529,7 @@ concat(dm4-dm3 ,',' ,dm4/cost ,',', (dm4-dm3)/cost ,',' ,dm4/da1) m4,
|
|
|
concat(dm5-dm4 ,',' ,dm5/cost ,',', (dm5-dm4)/cost ,',' ,dm5/da1) m5
|
|
|
from ( select * from dw_channel where cost+reg_order_amount>0 {op1} {op2} {op3} {op4} ) a
|
|
|
left join dw_channel_amount_daily b on a.channel=b.channel and a.dt=b.dt
|
|
|
-left join src_book_info c using(book,platform,type)
|
|
|
+-- left join src_book_info c using(book,platform,type)
|
|
|
|
|
|
{op5}
|
|
|
"""
|