The task data come from multiple pages like below:
But when I try using advanced queries to list them by the deadline or schedule, it will separate a page into multiple independent tasks, and then the page name disappears.
I’m using this query:
#+BEGIN_QUERY
{:title ["📆 near TODOs (next 7 days, scheduled or deadline)"]
:query [:find (pull ?b [*])
:in $ ?start ?next
:where
(or
[?b :block/scheduled ?d]
[?b :block/deadline ?d]
)
[(>= ?d ?start)]
[(<= ?d ?next)]
]
:result-transform (fn [result] (sort-by (juxt (fn [d] (get d :block/deadline) ) (fn [d] (get d :block/scheduled) ) ) result))
:inputs [:today :7d-after]
:collapsed? false}
#+END_QUERY
Actually, I’m not so familiar with the advanced queries syntax, the query code was just copied from another post, just for a test. But I would like to know if there is a possible way to show the page name on top of each task without grouping them by page.