anchor.diff:  |2|12
   |1|15
   |===
  +====
   
   The WITH and the RETURN clauses also allow ordering and truncating the driving table, but let's ignore these aspects in this CIP.
   
  -==== Beyond baseline semantics -- simple rewrite semantics
  -
  -Cypher's WITH and the RETURN are syntactically more flexible when the two baseline semantics. In particular, they allow mixing aggregation and projection rather freely.
  +==== Beyond baseline semantics -- simple rewrite semantics[[simpleRewrite]]
  +
  +Cypher's WITH and the RETURN are syntactically more flexible when the two baseline semantics.
  +In particular, they allow mixing aggregation and projection rather freely.
   Specifically, the WITH and the RETURN clause denoted the parameters for projection (_P_) and aggregation (_K_ and _A_) with a single nonempty set _L_ of https://raw.githack.com/openCypher/openCypher/master/tools/grammar-production-links/grammarLink.html?p=ProjectionItem[<ProjectionItem>]s `_ex_ AS _al_` where
   
   * _ex_ is an expression that is allowed to contain aggregation functions and
   * _al_ is an alias.
   
  -For instance, the RETURN clause
  +.Mixing aggregation and projection
  +====
  +The RETURN clause
   
   .[[Q3]]Q3
   [source, cypher]
  
positive.code: While this solution works nicely for the considered examples, it is limited.
  Specifically, it only supports aggregation function in expressions of the form `_agg_(_ex_)`.
  
  Cypher, however, also allows aggregation functions in expressions of the form, such as
  
  * `_ex_~1~ + _agg_(_ex_~2~)`
  * `_agg_(_ex_~1~) + _ex_~2~`
  * `_agg_~1~(_ex_~1~) + _ex~2~_ * _agg_~2~(_ex_~3~)`
  
  However, such expressions may still be sensible and useful.
  
  Consider the RETURN clause
  
  .[[Q4]]Q4
  [source, cypher]
  ----
  RETURN a AS a, (a + SUM(b*c) - MIN(c)) * 2 AS agg
  ----
  
  should produce a result that is grouped by `a` and `agg` should be computed for each group as the sum of all products of `b` and `c` added to the value `a` and multiplied by two, so that result would be:
  
  .Result Q4
  |===
  |a|agg
  
  |1|32
  //(1 + (2*3 + 3*4) - 3) * 2
  |2|24
  //(2 + (3*5) - 5) * 2
  |===
  
  It has been documented on multiple occasions (e.g. cf. http://opencypher.org/articles/2017/07/27/ocig1-aggregations-article/[First oCIG Meeting]) the existing semantics or Cypher is imprecise on such queries.
  
  This proposal provides a precise semantics.
  
  == Proposal
  
  
negative.code: |1|21
  |2|12
  |===
  ====
  
  The semantics of such an RETURN (and WITH) clause can be described as a rewrite to the two baseline semantics combined by Cypher's linear composition.
  
  