anchor.diff:  A set operation connects result lists of queries. The most well-known set operations are `UNION` and `UNION ALL` which merge the result lists of two queries.
   Apart from that, there is an operation that produces the commonalities of two result lists i.e. the intersection and an operation that subtracts commonalities i.e. minus/except.
   
  +All operations require that the connected queries must have the same number of select items with the same data types.
  +
   WARNING: This feature is currently only supported with Hibernate!
   
  -The SQL standard defines the following set operations for connecting two queries _q1_ and _q2_ which is also what {projectname} adopts
  -
  -* UNION - Merges results from _q1_ and _q2_ but filters out duplicates.
  -* UNION ALL - Merges results from _q1_ and _q2_ *without* filtering duplicates.
  -* INTERSECT - Creates a result based on distinct elements that appear in both _q1_ and _q2_
  -* INTERSECT ALL - Creates a result based on all elements that appear in both _q1_ and _q2_ i.e. not filtering out duplicates
  -* EXCEPT - Creates a result based on distinct elements of _q1_ that don't appear in _q2_
  -* EXCEPT ALL - Creates a result based on all elements of _q1_ that don't appear in _q2_
  +The SQL standard defines the following set operations for connecting two queries _query1_ and _query2_ which is also what {projectname} adopts
  +
  +* UNION - Merges results from _query1_ and _query2_ but filters out duplicates.
  +* UNION ALL - Merges results from _query1_ and _query2_ *without* filtering duplicates.
  +* INTERSECT - Creates a result based on distinct elements that appear in both _query1_ and _query2_
  +* INTERSECT ALL - Creates a result based on all elements that appear in both _query1_ and _query2_ i.e. not filtering out duplicates
  +* EXCEPT - Creates a result based on distinct elements of _query1_ that don't appear in _query2_
  +* EXCEPT ALL - Creates a result based on all elements of _query1_ that don't appear in _query2_
   
   These set operations are not only useful for scalar queries, but can also be used when querying for entities.
   
  
positive.code: SELECT cat FROM Cat cat WHERE cat.name = :param_2
  ----
  
  You can chain as many queries with set operations as you want.
  
  When using set operations in CTEs, the _ending_ of the CTE
  
  // explain API support for normal builders, CTE builders and subquery builders
  // especially regarding left nesting i.e. startSet() which starts a left group
  // Mention limit and order by support and also that you can have "empty set groups" for dynamicity purposes + example
  
  
  [[anchor-set-dbms-compatibility]]
  === DBMS compatibility
  
  Currently there is no emulation implemented for databases that do not support set operations natively except for the non-distinct variants `INTERSECT ALL` and `EXCEPT ALL` in case the distinct variant is supported.
  The emulation for the non-distinct variants is implemented by adding the `ROW_NUMBER` to an operand which is removed afterwards.
  
  The DBMS support for set operations is quite good.
  
negative.code: <2> Use any set operation here
  <3> You must end the set operation explicitly
  
  The call to link:{core_doc}/persistence/SetOperationBuilder.html#unionAll()[`unionAll()`] ends the previous query builder making any operations on it fail with an exception.
  Finally link:{core_doc}/persistence/BaseOngoingSetOperationBuilder.html#endSet()[`endSet()`] ends the last query builder.
  
  [source,sql]
  ----
  SELECT cat FROM Cat cat WHERE cat.name = :param_1
  