I’ll try to conceptually help if I can.
If you create the first query as a sub-query and the second query as a subquery, and assuming the two sub queries match columns, you can create a union query from those. On that union, you can create a subquery from it and then join the new unionized (hah) to whatever you want.
If the union is then encapsulated inside another sub-query, it will behave as any other query would.
I think you need more subs than 3, since you need to wrap the union up too.
I just spent so much time trying to get an AI tool to help me write a union in the designer that does this, I finally gave up and found this thread. You’re the man.