select
index_name
, is_fc
, goal_value
, index_value
, gap_goal
, top_gap_city
, top_gap_store
, top_gap_cate
, top_gap_item
,sum(a) as abc
from (
select
index_name
, is_fc
, goal_value
, index_value
, gap_goal
, top_gap_city
, top_gap_store
, top_gap_cate
, top_gap_item
, '1' as a --
from cn_ads_dev_dl_tmp.ads_sc_repl_cloud_monitor_recap_fc_df_tmp501 -- 新数据
union all
select
index_name
, is_fc
, goal_value
, index_value
, gap_goal
, top_gap_city
, top_gap_store
, top_gap_cate
, top_gap_item
,'-1' as a
from cn_ads_dev_dl_tables.ads_sc_repl_cloud_monitor_recap_df where ts = '2024-04-23' -- 旧数据
) tmp
group by
index_name
, is_fc
, goal_value
, index_value
, gap_goal
, top_gap_city
, top_gap_store
, top_gap_cate
, top_gap_item
having sum(a)<>0 ;
11-02
5213
06-07
“相关推荐”对你有帮助么?
-
非常没帮助
-
没帮助
-
一般
-
有帮助
-
非常有帮助
提交