How can I write a query to extract blocks with marker, including block reference, in current-page?

Hello logseq users!

Now I’m trying to write a query to all the related task in a day as follows:

#+BEGIN_QUERY
{
    :title "💪 Today Tasks"
    :query [
            :find (pull ?block [*])
            :in $ ?current-page
            :where
            [?page :block/name ?current-page]
            [?block :block/page ?page]
            [?block :block/marker ?marker]
            [(contains? #{"LATER" "NOW" "DONE"} ?marker)]
    ]
    :inputs [:current-page]
}
#+END_QUERY

But this query doesn’t work well when reference block task are included in the page. It is reasonable because the block with reference query doesn’t have :block/marker attributes.

Here is the screen shots of this problem.


Does anybody know how to write proper query for this purpose?
I tried to write a query using OR block to include reference block, but I cannot find any resource to extract them…

Thanks for your help!!