COUNT(DISTINCT CONCAT(a.EMP_IDCARD,IFNULL(a.SOCIAL_PAY_MONTH,a.PROVIDENT_PAY_MONTH),IFNULL(a.SOCIAL_CREATE_MONTH,a.PROVIDENT_CREATE_MONTH))) as 'count'
COUNT(DISTINCT CONCAT(a.EMP_IDCARD,a.SOCIAL_PAY_MONTH,a.SOCIAL_CREATE_MONTH)) as 'count'
</when>
<otherwise>
1
COUNT(DISTINCT CONCAT(a.EMP_IDCARD,IFNULL(a.SOCIAL_PAY_MONTH,a.PROVIDENT_PAY_MONTH),IFNULL(a.SOCIAL_CREATE_MONTH,a.PROVIDENT_CREATE_MONTH))) as 'count'