How create :default-queries that get all blocks that has `#discuss` and mention the same date in journauls

Let’s say I have a page with one block content

Let's #discuss this in [[2024-02-25]]

How to create :default-queries that displays all disscus for the date that I’m in

So in that case if I go to [[2024-02-25]] I will see Let’s #discuss this in [[2024-02-25]] at the bottom

Welcome.

  • :default-queries are shown in today’s journal page.
  • For other pages, should create separate queries
    • like this one:
      #+BEGIN_QUERY
      {
       :query [:find (pull ?b [*])
         :in $ ?current-name
         :where
           [?current-page :page/name ?current-name]
           [?discuss :page/name "discuss"]
           [?b :block/refs ?current-page]
           [?b :block/refs ?discuss]
       ]
       :inputs [:current-page]
      } 
      #+END_QUERY
      
    • but prefer using The contextual sidebar: query current page …

My idea is to have this in all jornal page…

so when I open the jornal page in specific day… I will see all blocks reference that day that was tag as #discuss