renyupeng 11 месяцев назад
Родитель
Сommit
2449eb711b
1 измененных файлов с 2 добавлено и 31 удалено
  1. 2 31
      Apietl/task/AppBytedanceAccountBaseInfoDsD.py

+ 2 - 31
Apietl/task/AppBytedanceAccountBaseInfoDsD.py

@@ -77,8 +77,8 @@ select {date_time}                       stat_date,
        t3.day_num                        new_video_num,
        0                                 effect_num,
        0                              as new_effect_num,
-       sum_hot.new_hot_material       as hot_num,
-       ifnull(t5.new_hot_material, 0) as new_hot_num,
+       0       as hot_num,
+       0 as new_hot_num,
        0                              as put_campaign_num,
        0                              as put_unit_num,
        0                              as trust_campaign_num,
@@ -97,40 +97,11 @@ from (select * from `jeecg-boot`.ctop_user_allocation where media_id = 1) t1
                    where date_format(project_create_time, '%Y%m%d') = {date_time}
                    group by advertiser_id) pro
                   on t1.account_id = pro.advertiser_id
-
-
          left join(select advertiser_id, count(distinct promotion_id) as promotion_num
                    from media_api.bytedance_promotion_list
                    where date_format(promotion_create_time, '%Y%m%d') = {date_time}
                    group by advertiser_id) promotion
                   on t1.account_id = promotion.advertiser_id
-
-
-         left join
-     (select t2.account_id, count(distinct t1.signature) new_hot_material
-      from (select signature from application.hot_material where hot_date = {date_time} and media_id = 1) t1
-               left join
-           (select distinct advertiser_id account_id, signature
-            from `media_api`.bytedance_file_video_get
-            where date_format(create_time, '%Y%m%d') >=
-                  date_sub({date_time}, INTERVAL 29 DAY)) t2
-           on t1.signature = t2.signature
-      group by t2.account_id) t5
-     on t1.account_id = t5.account_id
-
-
-         left join
-     (select t2.account_id, count(distinct t1.signature) new_hot_material
-      from (select signature from application.hot_material where hot_date <= {date_time}) t1
-               left join
-           (select distinct advertiser_id account_id, signature
-            from `media_api`.bytedance_file_video_get
-            where date_format(create_time, '%Y%m%d') <= {date_time}) t2
-           on t1.signature = t2.signature
-      group by t2.account_id) sum_hot
-     on t1.account_id = sum_hot.account_id
-
-
          left join
      (SELECT cua.account_id   id,
              cua.account_id,