select count(a.*),count(b.*) from table a,table b
where a.STATUS=0 and b.STATUS<>0