panwang %!s(int64=3) %!d(string=hai) anos
pai
achega
498fda13f1
Modificáronse 1 ficheiros con 1 adicións e 2 borrados
  1. 1 2
      utils.py

+ 1 - 2
utils.py

@@ -573,13 +573,12 @@ def  produce_video_ratio_cnt():
             "sum(case when (rate >= 1 and rate < 1.5) then 1 else 0 end) as r4,"
             "sum(case when (rate >= 1.5 and rate < 2) then 1 else 0 end) as r5,"
             "sum(case when rate >= 2 then 1 else 0 end) as r6 from "
-            "(select project_id, round((video_duration/1000) / (produce_done_timestamp - submit_timestamp),1) as rate from "
+            "(select project_id, round( (produce_done_timestamp - submit_timestamp) / (video_duration/1000),1) as rate from "
             "(select project_id, draftbox_id,video_duration,submit_timestamp,produce_done_timestamp from "
             "(select project_id, draftbox_id,video_duration,submit_timestamp,produce_done_timestamp from "
             "produce_video_project where project_id > %s and project_id < %s and app_type not in (1,13,15) and produce_status in (5,6,7,8) order by video_duration desc limit 100000) t1 group by draftbox_id) t2) t3"%(start_time, end_time)
 
     )
-    print(sql)
     y_date = (date.today() + timedelta(days=-1)).strftime("%Y%m%d")
     res = db_query(sql)
     if res[0]: