Query note title and alias from a property

i replace with your suggestion,
the query that goes on note b and note e, updated:

#+BEGIN_QUERY
{
 :query [:find ?p-name  
   :in $ ?current-name
   :where
[?b :block/page ?p]
[?p :block/name ?p-name] 
     [?current :block/name ?current-name]
    (or-join [?current ?name]
       [?current :block/name ?name]
       (and
         [?current :block/alias ?alias]
         [?alias :block/name ?name]
       )
     )
     (property ?b :test ?name)
 ]
 :inputs [:current-page]
}
#+END_QUERY

“note e” with the query looks correct
image

Note B otherwise only show note C in the query (missing the note A)