NXP-13526: adding a condition in the construction of the query