Add support for BETWEEN {from, to} predicates
Extract duplicated stuff for predicate exceptions
Add tests for compound queries