Filtering out blocks by name/text

I’m wondering how to filter out blocks by name…

{{ query (and (task TODO) (not (has :block/tags) [[habit]] (not (has :block/name “Checklists”)))) }}

I was hoping that it’s this simple, but it doesn’t do much. I really need a deep dive into Logseq query language…