fixed states_oe_inds_count query