Refine the query condition.