I'm trying to join the results of two sub-queries and can't find a solution for this.

Basically, I need to get a set of pages that represents a union of two other subsets and then get attributes for all the pages in resulting set. I can create separate queries to get each subsets, but I can't find a way to create a union.

Assuming that two subsets are selected using these two queries:

   <ask>[[Category:CatA]] [[Attribute A:=value1]]</ask>

and

   <ask>[[Relation B::Page X]]</ask>

And I want to select only those that have Attribute B and display Attribute B and Attribute C.

What I tried to do is:

   [[
         <q>[[Category:CatA]] [[Attribute A:=value1]]</q>
         ||
         <q>[[Relation B::Page X]]</q>
   ]]
   [[Attribute B:=+]]
   [[Attribute B:=*]] [[Attribute C:=*]]

and it didn't work.

I removed all the additional conditions and attribute display instructions just to select a union:


   [[
         <q>[[Category:CatA]] [[Attribute A:=value1]]</q>
         ||
         <q>[[Relation B::Page X]]</q>
   ]]

and it didn't work either.

Is there any way for me to get the desired result?

           Sergey


--
Sergey Chernyshev
http://www.sergeychernyshev.com/