Why do two predicate clauses differ from one with and-clause

I created an advanced query that shows all the scheduled and deadlined tasks relevant for today (much like the default “Scheduled and deadline”, but a bit custom). There I had an issue with a predicate clause with an “and”-clause, which I could solve by using two predicate clauses.

Can someone explain, why these two behave differently? The latter actually does what I expected from the former: it tests first on ?compareDate not being false and then on being less than or equal ?targetDate. I do not understand how the former actually filters.

[(and (!= false ?compareDate) (<= ?compareDate ?targetDate))]
[(!= false ?compareDate)]
[(<= ?compareDate ?targetDate)]

EDIT:
Is it because of this? But this refers to “transformation function” and not “predicate clauses”. In the same source no such limitating was mentioned for predicate clauses.

One thing to be aware of is that transformation functions can’t be nested. You can’t write

[(f (g ?x)) ?a]

instead, you must bind intermediate results in temporary pattern variables

[(g ?x) ?t]
[(f ?t) ?a]

[Source: Learn Datalog Today!]

  • Don’t read too much into terms like “transformation function”, “predicate clause” etc.
    • They are not defined very strictly.
    • Implementations for browsers don’t cover all features of Datomic.
  • Inside :where :
    • all top-level clauses are always grouped inside an implied (and)
    • bottom-level nesting is not supported
      • Cannot do this: [(())]
    • top-level nesting is supported
      • Can do this: (([]))
        • e.g. (or (and (or [()])))
        • Limitations still apply and Datalog is not Turing-complete.

Thank you @mentaloid, I guessed that bottom-level nesting isn’t supported generally.