Hi!
I’m a new user of logseq and I’m trying to create a page with a weekly summary. I want to use queries to show the “slipping” tasks from the previous week and a summary of tasks from the current week.
I found an interesting example in docs on advanced queries, but all the examples there use relative dates such as “:today”, “:7d-after”, and similar. I’ve been trying to put exact dates such as “26-07-2021” or “2021-07-26”, but the query either does not compiler or comes back empty.
#+BEGIN_QUERY
{:title "🟠 SLIPPING"
:query [:find (pull ?b [*])
:in $ ?start ?today
:where
[?b :block/marker ?marker]
[?b :block/page ?p]
[?p :page/journal? true]
[?p :page/journal-day ?d]
[(>= ?d ?start)]
[(<= ?d ?today)]
[(contains? #{"NOW" "LATER" "TODO" "DOING"} ?marker)]]
:inputs ["2021-07-26" "2021-07-28"]
:result-transform (fn [result]
(sort-by (fn [h]
(get h :block/created-at)) result))
}
#+END_QUERY
What’s the trick to make it work?