SelectWithUnionQuery (children 1)
 ExpressionList (children 1)
  SelectQuery (children 2)
   ExpressionList (children 1)
    Function max (children 1)
     ExpressionList (children 1)
      Identifier date_out
   TablesInSelectQuery (children 1)
    TablesInSelectQueryElement (children 1)
     TableExpression (children 1)
      Subquery (children 1)
       SelectWithUnionQuery (children 1)
        ExpressionList (children 1)
         SelectQuery (children 4)
          ExpressionList (children 2)
           Subquery (alias cte_1) (children 1)
            SelectWithUnionQuery (children 1)
             ExpressionList (children 1)
              SelectQuery (children 3)
               ExpressionList (children 1)
                Function max (children 1)
                 ExpressionList (children 1)
                  Identifier date
               TablesInSelectQuery (children 1)
                TablesInSelectQueryElement (children 1)
                 TableExpression (children 1)
                  TableIdentifier subquery_cte_in
               Function and (children 1)
                ExpressionList (children 2)
                 Function equals (children 1)
                  ExpressionList (children 2)
                   Identifier id
                   Literal UInt64_6
                 Function equals (children 1)
                  ExpressionList (children 2)
                   Identifier label
                   Literal UInt64_2
           Subquery (alias cte_2) (children 1)
            SelectWithUnionQuery (children 1)
             ExpressionList (children 1)
              SelectQuery (children 3)
               ExpressionList (children 1)
                Function max (children 1)
                 ExpressionList (children 1)
                  Identifier date
               TablesInSelectQuery (children 1)
                TablesInSelectQueryElement (children 1)
                 TableExpression (children 1)
                  TableIdentifier subquery_cte_in
               Function and (children 1)
                ExpressionList (children 2)
                 Function equals (children 1)
                  ExpressionList (children 2)
                   Identifier id
                   Literal UInt64_10
                 Function equals (children 1)
                  ExpressionList (children 2)
                   Identifier label
                   Literal UInt64_2
          ExpressionList (children 1)
           Identifier date (alias date_out)
          TablesInSelectQuery (children 1)
           TablesInSelectQueryElement (children 1)
            TableExpression (children 1)
             TableIdentifier subquery_cte_in
          Function in (children 1)
           ExpressionList (children 2)
            Identifier date
            Function tuple (children 1)
             ExpressionList (children 2)
              Identifier cte_1
              Identifier cte_2
