|
@@ -938,6 +938,7 @@ def get_pitcher_trend(pitcher, start=None, end=None, page=None, page_size=None,
|
|
op4 = f" order by {order_by} {order}" if order_by and order else ''
|
|
op4 = f" order by {order_by} {order}" if order_by and order else ''
|
|
|
|
|
|
sql = f"""select dt,pitcher,
|
|
sql = f"""select dt,pitcher,
|
|
|
|
+ reg_num,create_user_num,
|
|
cost,
|
|
cost,
|
|
reg_amount,
|
|
reg_amount,
|
|
d1 first_amount,
|
|
d1 first_amount,
|
|
@@ -989,6 +990,8 @@ def get_pitcher_trend(pitcher, start=None, end=None, page=None, page_size=None,
|
|
"""
|
|
"""
|
|
|
|
|
|
sumSql = f"""select concat(date_format(min(dt),'%Y/%m/%d'),'~',date_format(max(dt),'%Y/%m/%d')) dt,sum(cost) cost,
|
|
sumSql = f"""select concat(date_format(min(dt),'%Y/%m/%d'),'~',date_format(max(dt),'%Y/%m/%d')) dt,sum(cost) cost,
|
|
|
|
+ sum(reg_num) reg_num,
|
|
|
|
+ sum(create_user_num) create_user_num,
|
|
sum(reg_amount) reg_amount,
|
|
sum(reg_amount) reg_amount,
|
|
round(sum(first_amount)/sum(cost),4) first_roi,
|
|
round(sum(first_amount)/sum(cost),4) first_roi,
|
|
round(sum(reg_amount)/sum(cost),4) roi,
|
|
round(sum(reg_amount)/sum(cost),4) roi,
|