SelectWithUnionQuery (children 1)
 ExpressionList (children 1)
  SelectQuery (children 2)
   ExpressionList (children 1)
    Function if (alias json) (children 1)
     ExpressionList (children 3)
      Function equals (children 1)
       ExpressionList (children 2)
        Identifier outer_table.condition_value
        Literal UInt64_1
      Function formatRowNoNewline (children 1)
       ExpressionList (children 2)
        Literal \'JSONEachRow\'
        Identifier outer_table.result_date
      Literal \'\'
   TablesInSelectQuery (children 1)
    TablesInSelectQueryElement (children 1)
     TableExpression (children 1)
      Subquery (alias outer_table) (children 1)
       SelectWithUnionQuery (children 1)
        ExpressionList (children 1)
         SelectQuery (children 2)
          ExpressionList (children 2)
           Literal UInt64_1 (alias condition_value)
           Function plus (alias result_date) (children 1)
            ExpressionList (children 2)
             Function toDate (children 1)
              ExpressionList (children 1)
               Literal \'2023-06-24\'
             Function toIntervalMonth (children 1)
              ExpressionList (children 1)
               Identifier inner_table.offset
          TablesInSelectQuery (children 1)
           TablesInSelectQueryElement (children 1)
            TableExpression (children 1)
             Subquery (alias inner_table) (children 1)
              SelectWithUnionQuery (children 1)
               ExpressionList (children 1)
                SelectQuery (children 1)
                 ExpressionList (children 1)
                  Literal UInt64_2 (alias offset)
