Multiple Combined Queries

You can combine multiple queries in complex relationships to determine the order of execution, as in the following example:

    Combined Query 1
  MINUS  
INTERSECTION   Combined Query 2
  Combined Query 3  

Web Intelligence processes query groups from right to left as they appear in the Query Panel, and from top to bottom within each group.

(Higher-precedence groups, such as the MINUS group in the above example, appear indented to the right in the Query Panel.) In the above query Web Intelligence first determines the result of the minus combination then finds the intersection of this result with the result of Combined Query 3 as shown in the following table:

Query Result
Query 1 US; UK; Spain; Germany
Query 2 Germany
Query 1 MINUS Query 2 US; UK; Spain
Query 3 US; Spain; Finland
(Query 1 MINUS Query 2)
INTERSECTION
Query 3
US; Spain

Note.pngIf your database directly supports the type of combined query you wish to execute, Web Intelligence generates SQL containing combination operators. In this case the order of precedence depends on the order of precedence defined in the database. See your Web Intelligence administrator for more details.