Query to list all blocks in current page which are references once or more

Inverting the last condition of the query above, this is for blocks which are referenced by one or more other blocks:

#+BEGIN_QUERY
{:query [:find (pull ?b [*])
   :in $ ?current
   :where
     [?p :block/name ?current]
     [?b :block/page ?p]
     [?other :block/refs ?b]
 ]
 :inputs [:current-page]
}
#+END_QUERY
1 Like