Advance Query - Schedule and Deadline Date


Need helps on the advance query. How to query the schedule date or deadline date instead of date.

The following query only result the block with date but not schedule or deadline.

{:title "πŸ“… THIS WEEK"
    :query [:find (pull ?h [*])
            :in $ ?start ?next
            [?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" "WAITING"} ?marker)]]
    :inputs [:today :7d-after]
    :collapsed? false}

Anyone can help, please.

Is this what you’re looking for @vincentteoh ?

{:title "next week deadline or schedule"
    :query [:find (pull ?block [*])
            :in $ ?start ?next
              [?block :block/scheduled ?d]
              [?block :block/deadline ?d])
            [(> ?d ?start)]
            [(< ?d ?next)]]
    :inputs [:today :7d-after]
    :collapsed? false}

Yes, thank you very much for your help!