Show tasks for a page and any subpage it has

I have a page with subpages:

projectA
projectA/topic1
projectA/topic2

On the projectA page I need a query that displays tasks from:

  • projectA
  • projectA/
  • Anywhere I create a todo with TODO [[projectA]]

I have seen all the queries in this great thread, but none of them accomplish my goal:
https://discuss.logseq.com/t/queries-for-task-management/14937/34

Thank you kindly!

I wanted to clarify this a bit so let me update this part:

On the projectA page I need a query that displays tasks from:

  • projectA
  • projectA/topic1 or any other sub page
  • any other page I create a todo with TODO [[projectA]] or TODO [[projectA/topic1]]
  • any other page I create a todo with TODO #projectA or TODO #projectA/topic1