insert overwrite table DM_M_YX_KD_YXD_100 partition (month_id ='${V_MONTH}')

select

prov_name, '宾馆酒店' xfsc_type, count(distinct case when is_innet='1' then user_id end ) is_innet, count(distinct case when acct_tag='1' then user_id end ) acct_tag, sum(total_fee) total_fee, count(distinct case when is_this_break='1' then user_id end ) is_this_break, count(distinct case when is_this_dev='1' then user_id end ) is_this_dev, sum( case when is_this_dev='1' then total_fee end ) total_fee_dev from zq_dwa.dwa_m_cus_al_user_indus_sq where month_id='${V_MONTH}' and service_kind ='11' and is_zt = '0' --and is_zq_develop='1'--不需要限制政企渠道 and is_bgjd='1' --宾馆酒店 group by prov_nam

改错insert overwrite table DM_M_YX_KD_YXD_100 partition month_id =$V_MONTH 	selectprov_name宾馆酒店 xfsc_typecountdistinct case when is_innet=1 then user_id end is_innetcountdistinct case when acct_tag

原文地址: https://www.cveoy.top/t/topic/imTX 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录