change subquery conditions

create subquery if conditions only 0 or '0'.