anchor.diff:   ;
   
   simple_select_stmt
  - : ( K_WITH K_RECURSIVE? common_table_expression ( ',' common_table_expression )* )?
  + : with_clause?
      select_core ( K_ORDER K_BY ordering_term ( ',' ordering_term )* )?
      ( K_LIMIT expr ( ( K_OFFSET | ',' ) expr )? )?
    ;
   
   select_stmt
  - : ( K_WITH K_RECURSIVE? common_table_expression ( ',' common_table_expression )* )?
  + : with_clause?
      select_or_values ( compound_operator select_or_values )*
      ( K_ORDER K_BY ordering_term ( ',' ordering_term )* )?
      ( K_LIMIT expr ( ( K_OFFSET | ',' ) expr )? )?
  
positive.code:  ;
  
  compound_select_stmt
   : ( K_WITH K_RECURSIVE? common_table_expression ( ',' common_table_expression )* )?
     select_core ( ( K_UNION K_ALL? | K_INTERSECT | K_EXCEPT ) select_core )+
     ( K_ORDER K_BY ordering_term ( ',' ordering_term )* )?
     ( K_LIMIT expr ( ( K_OFFSET | ',' ) expr )? )?
  
negative.code:  ;
  
  factored_select_stmt
   : with_clause?
     select_core ( compound_operator select_core )*
     ( K_ORDER K_BY ordering_term ( ',' ordering_term )* )?
     ( K_LIMIT expr ( ( K_OFFSET | ',' ) expr )? )?
  