|
@@ -41,7 +41,7 @@ def add_total():
|
|
|
|
|
|
|
|
|
def dw_pitcher_trend():
|
|
|
- sql="""select dt,pitcher,
|
|
|
+ sql="""select a.dt,pitcher,
|
|
|
sum(cost),
|
|
|
sum(order_amount),
|
|
|
sum(reg_order_amount),
|
|
@@ -83,7 +83,7 @@ left outer join
|
|
|
sum(if(addDays(toDate(formatDateTime(reg_time,'%Y-%m-%d')),27)>=date,amount,0)) as r28,
|
|
|
sum(if(addDays(toDate(formatDateTime(reg_time,'%Y-%m-%d')),28)>=date,amount,0)) as r29,
|
|
|
sum(if(addDays(toDate(formatDateTime(reg_time,'%Y-%m-%d')),29)>=date,amount,0)) as r30
|
|
|
-from order group by channel,reg_time) b on a.dt=b.dt and a.channel=b.channel
|
|
|
+from order group by channel,dt) b on a.dt=b.dt and a.channel=b.channel
|
|
|
group by pitcher,a.dt"""
|
|
|
|
|
|
data=ck.execute(sql)
|