Advanced query for pages with a tag

I’m trying to make an inbox page for unsorted items. All I would want here is an advanced query for all pages with the #inbox tag. I tried the template in the official docs (see below), however, the query returns 0 results. What is wrong here?

The official docs offer this template (albeit for the “programming” tag):

#+BEGIN_QUERY
{
:query [:find ?name
       :in $ ?tag
       :where
       [?t :block/name ?tag]
       [?p :block/tags ?t]
       [?p :block/name ?name]]
 :inputs ["inbox"]
}
#+END_QUERY

Might be relevant: the tag in question is #inbox, but this is an alias for a page [[:inbox_tray: Inbox]].