生而为人

程序员的自我修养

0%

数据探查逻辑

1
2
3
select count(distinct seller_bu_id) as ct1, 
count(distinct seller_bu_id, management_city_id) as ct2
from mart_caterb2b.dim_seller_management_city_info
  1. 如果 ct1 = ct2,说明seller_bu_id:management_city_id是n:1的关系,n是1还是多,需要继续探查
  2. 如果 ct1 < ct2, 说明seller_bu_id:management_city_id是1:n的关系,n是多
  3. 如果 ct1 > ct2, 说明management_city_id中有null值,比例关系需要去掉这些null值重新计算。