select sum(c_count) from (select count(*) c_count from VW_ZY_MZZRZY b where b.BRID00 = 883101 and b.CXBZ00 = 'Z' and b.ZRZYZT = '0' and b.CZRQSJ >= to_char(sysdate - interval '24' hour, 'yyyymmdd HH24:mi:ss') and b.YYID00 = '224141' union all select count(*) c_count from VW_ZY_MZZRZY b where b.BRID00 = 883101 and b.CXBZ00 = 'Z' and b.ZRZYZT = '0' and b.SFBGRQ = 1 and b.BGRQSJ >= to_char(sysdate - interval '24' hour, 'yyyymmdd HH24:mi:ss') and b.YYID00 = '224141')