ck 4 lat temu
rodzic
commit
8aac72bd05
1 zmienionych plików z 2 dodań i 2 usunięć
  1. 2 2
      app/etl/dw/dw_pitcher_daily.py

+ 2 - 2
app/etl/dw/dw_pitcher_daily.py

@@ -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)