Query for taks only in the journal pages

I keep my personal to-do list through the journal, and those from work/other projects on specific pages, so when I use a simple query, they all get mixed up.
I’m looking for a query that simply displays the ones that are in the journal and ignores all other pages.
I appreciate any help.

This should do the work:

#+BEGIN_QUERY
{:title "Journal Tasks"
  :query [:find (pull ?h [*])
    :where
      [?h :block/marker ?marker]
      [?h :block/page ?p]
      [?p :page/journal? true]
      [(contains? #{"LATER" "NOW" "TODO" "DOING"} ?marker)]]
  :collapsed? false}
#+END_QUERY

If you are not familiar with advanced queries, you can look up further info here https://docs.logseq.com/#/page/advanced%20queries

We look for all elements that have the LATER/NOW/TODO/DOING marker and appear in a journal page.
what :block/marker :block/page :page/journal are, can be seen here: logseq/db_schema.cljs at master · logseq/logseq · GitHub

6 Likes

worked perfectly
Thanks!!!