ck 4 tahun lalu
induk
melakukan
91bc5dbd4a
1 mengubah file dengan 1 tambahan dan 1 penghapusan
  1. 1 1
      data_manage/public_analysis.py

+ 1 - 1
data_manage/public_analysis.py

@@ -406,7 +406,7 @@ def boss_panel_summary(user_id,start,end,channel,pitcher, type, stage, page, pag
 
 
     dm = MysqlUtils().dm
     dm = MysqlUtils().dm
 
 
-    sql=f"""select sum(order_amount) order_amount,sum(cost) cost,dt from dw_channel                                                                                                                                                                                                                                                                                                                                             
+    sql=f"""select sum(order_amount) order_amount,sum(cost) cost,round(sum(reg_order_amount)/sum(cost),4) roi,dt from dw_channel                                                                                                                                                                                                                                                                                                                                             
     where 1=1 {op} {op1} {op2} {op3} {op4} {op5} {op6}
     where 1=1 {op} {op1} {op2} {op3} {op4} {op5} {op6}
     GROUP BY dt HAVING order_amount+cost>0 {op7} """
     GROUP BY dt HAVING order_amount+cost>0 {op7} """
     # print(sql)
     # print(sql)