Example advanced query in Logseq documentation not working

Hello all,

I tried the following query as shown here https://logseq.github.io/#/page/advanced%20queries and all I got was a blank block. Could someone help with what might be happening? I tried the other queries on the page and they all worked.

  1. Tasks referencing due dates up to 10 days ahead

#+BEGIN_QUERY
{:title “:date: NEXT”
:query [:find (pull ?h [*])
:in $ ?start ?next
:where
[?h :block/marker ?marker]
[?h :block/ref-pages ?p]
[?p :page/journal? true]
[?p :page/journal-day ?d]
[(> ?d ?start)]
[(< ?d ?next)]
[(contains? #{“NOW” “LATER” “DOING” “TODO”} ?marker)]]
:inputs [:today :10d-after]
:collapsed? false}
#+END_QUERY

1 Like

Hi. I just wrote a post on this. The datomic queries are fussy regarding formatting. Previously this was not an issue as the help pages were “editable” allowing one to access the underlying code, with appropriate formatting. Now the help pages have been “locked” so the underlying code, which is properly formatted, is not revealed. My post requested that help files should be made “editable” again.

Try this

#+BEGIN_QUERY
{:title "NEXT"
  :query [:find (pull ?h [*])
          :in $ ?start ?next
          :where
          	[?h :block/marker ?marker]
          	[?h :block/ref-pages ?p]
          [?p :page/journal? true]
          [?p :page/journal-day ?d]
          [(> ?d ?start)]
          [(< ?d ?next)]
          [(contains? #{"NOW" "LATER" "DOING" "TODO"} ?marker)]]
  :inputs [:today :10d-after]
  :collapsed? false}
#+END_QUERY