Here is my query
It is supposed to get blocks which contain tag “mytag” and which not contain tag “tag1” OR “tag2” OR “tag3” and which is not a /DONE task
#+BEGIN_QUERY
{
:title "mytag"
:query [
:find (pull ?b [*])
:where
[?p :block/name "mytag"]
[?b :block/refs ?p]
(not [?b :block/marker "DONE"])
;; (not [?b :block/path-refs [:block/name "tag1"]])
;; (not [?b :block/path-refs [:block/name "tag2"]])
;; (not [?b :block/path-refs [:block/name "tag3"]])
]
:result-transform :sort-by-priority
:group-by-page? false
:breadcrumb-show? false
:collapsed? false
}
#+END_QUERY