|
@@ -68,12 +68,13 @@ def get_pitcher_panel_daily(pitcher, start, end, page, page_size, order_by, orde
|
|
|
round(if(total_cost=0,0,total_amount/total_cost),4) total_roi
|
|
|
from dw_daily_channel where dt>='{start}' and dt<='{end}' """
|
|
|
|
|
|
-
|
|
|
- if pitcher != 'all':
|
|
|
+ if pitcher != '':
|
|
|
sql += f" and pitcher='{pitcher}' "
|
|
|
|
|
|
+ sql+=f" group by date,pitcher"
|
|
|
+
|
|
|
total = ck.execute(f"select count(1) from ({sql}) a")[0][0]
|
|
|
- sql += f" group by date,pitcher order by {order_by} {order} limit {(page-1)*page_size},{page_size} "
|
|
|
+ sql += f" order by {order_by} {order} limit {(page-1)*page_size},{page_size} "
|
|
|
print(sql)
|
|
|
data = ck.execute(sql)
|
|
|
|