Hi folks, this seems like it should be a simple one but I’m struggling.
{{query (and “page1” “page2”)}}
query-properties:: [:page]
query-table:: true
returns a table of pages where [[page1]] and [[page2]] are mentioned in the same block.
{{query (and [[page1]] [[page2]])}}
query-properties:: [:page]
query-table:: true
returns the above, but with the addition of pages where [[page1]] is mentioned in a block nested under a block with mentions [[page2]] (or vice versa).
#+BEGIN_QUERY
{:query
[:find (pull ?page [*])
:in $ ?t1 ?t2
:where
;; restrict to pages
[?page :block/name]
;; first required page
[?page :block/path-refs ?r1]
[?r1 :block/name ?t1]
;; second required page
[?page :block/path-refs ?r2]
[?r2 :block/name ?t2]]
:inputs ["page1" "page2"]}
#+END_QUERY
gives me no results (this query was written by an LLM, so it may be wrong in another way).
Anyone got any pointers?