|
@@ -209,7 +209,8 @@ select '{dt.get_n_days(-1)}' dt,
|
|
|
last_month_amount,
|
|
|
if(last_month_cost = 0, 0, last_month_amount / last_month_cost) last_month_roi,
|
|
|
round(last_month_far_amount,2),
|
|
|
- follow_user
|
|
|
+ follow_user,
|
|
|
+ if(last_month_cost = 0, 0, last_month_far_amount / last_month_cost) last_month_far_roi
|
|
|
from (select pitcher,
|
|
|
sum(cost) cost,
|
|
|
sum(order_amount) amount,
|
|
@@ -264,7 +265,7 @@ left outer join (
|
|
|
|
|
|
having pitcher != ''"""
|
|
|
print(sql)
|
|
|
- ck.execute("alter table dm_pitcher_daily_page_total drop partition '{dt.get_n_days(-1)}';")
|
|
|
+ ck.execute(f"alter table dm_pitcher_daily_page_total drop partition '{dt.get_n_days(-1)}'")
|
|
|
ck.execute(sql)
|
|
|
|
|
|
|