select count(CONTACT) from
(select distinct b.party_id, CONTACT from impala_kudu_model.t_m_bus_ply_bas a, impala_kudu_model.t_m_bus_ply_dis b,impala_kudu_model.T_M_CUS_TCH c
where a.c_ply_no = b.c_ply_no and b.party_id =c.party_id
and b.c_src_role in ('INS_APP','INS_INS') --投被保人
and a.INSU_OBJ='L'--寿险
and a.c_ply_sts in ('1','4') --已签单
and to_date(a.t_issue_tm) < to_date('2021-06-06') --T+1统计
and c.CONTACT_TYPE='003' --移动电话
) t
;
--条目:3191618
实际值:
select sum(PHONE_SUMS_L) from impala_kudu_model.T_M_TAG_CUS_RES;