Adding ranges from unbound parameters to the query