Pages with at least one pending task

  • In your example the tag is in an ancestor block.
  • One way is to use :block/path-refs, which looks-up the tags of all those blocks:
    [?b :block/path-refs ?ref]
    [?ref :block/name "dienstreise"]