CreateQuery mv_resampled_timeseries_delta (children 4)
 Identifier mv_resampled_timeseries_delta
 Columns definition (children 1)
  ExpressionList (children 4)
   ColumnDeclaration step (children 1)
    DataType UInt32
   ColumnDeclaration metric_id (children 1)
    DataType UInt64
   ColumnDeclaration grid_timestamp (children 2)
    DataType DateTime (children 1)
     ExpressionList (children 1)
      Literal \'UTC\'
    Function CODEC (children 1)
     ExpressionList (children 2)
      Function DoubleDelta
      Function ZSTD
   ColumnDeclaration samples (children 1)
    DataType AggregateFunction (children 1)
     ExpressionList (children 3)
      Identifier timeSeriesLastTwoSamples
      DataType Int16
      DataType Float64
 SelectWithUnionQuery (children 1)
  ExpressionList (children 1)
   SelectQuery (children 4)
    ExpressionList (children 1)
     Asterisk
    TablesInSelectQuery (children 1)
     TablesInSelectQueryElement (children 1)
      TableExpression (children 1)
       Subquery (children 1)
        SelectWithUnionQuery (children 1)
         ExpressionList (children 2)
          SelectQuery (children 3)
           ExpressionList (children 4)
            Literal UInt64_10 (alias step)
            Identifier metric_id
            Function multiply (alias grid_timestamp) (children 1)
             ExpressionList (children 2)
              Function ceil (children 1)
               ExpressionList (children 2)
                Function divide (children 1)
                 ExpressionList (children 2)
                  Function toUnixTimestamp (children 1)
                   ExpressionList (children 1)
                    Function plus (children 1)
                     ExpressionList (children 2)
                      Identifier timestamp
                      Function toIntervalMillisecond (children 1)
                       ExpressionList (children 1)
                        Literal UInt64_999
                  Identifier step
                Literal UInt64_0
              Identifier step
            Function initializeAggregation (alias samples) (children 1)
             ExpressionList (children 3)
              Literal \'timeSeriesLastTwoSamplesState\'
              Function CAST (children 1)
               ExpressionList (children 2)
                Function dateDiff (children 1)
                 ExpressionList (children 3)
                  Literal \'ms\'
                  Function CAST (children 1)
                   ExpressionList (children 2)
                    Identifier grid_timestamp
                    Literal \'DateTime64(3, \\\'UTC\\\')\'
                  Identifier timestamp
                Literal \'Int16\'
              Identifier value
           TablesInSelectQuery (children 1)
            TablesInSelectQueryElement (children 1)
             TableExpression (children 1)
              TableIdentifier t_raw_timeseries
           ExpressionList (children 2)
            OrderByElement (children 1)
             Identifier metric_id
            OrderByElement (children 1)
             Identifier grid_timestamp
          SelectQuery (children 3)
           ExpressionList (children 4)
            Literal UInt64_30 (alias step)
            Identifier metric_id
            Function multiply (alias grid_timestamp) (children 1)
             ExpressionList (children 2)
              Function ceil (children 1)
               ExpressionList (children 2)
                Function divide (children 1)
                 ExpressionList (children 2)
                  Function toUnixTimestamp (children 1)
                   ExpressionList (children 1)
                    Function plus (children 1)
                     ExpressionList (children 2)
                      Identifier timestamp
                      Function toIntervalMillisecond (children 1)
                       ExpressionList (children 1)
                        Literal UInt64_999
                  Identifier step
                Literal UInt64_0
              Identifier step
            Function initializeAggregation (alias samples) (children 1)
             ExpressionList (children 3)
              Literal \'timeSeriesLastTwoSamplesState\'
              Function CAST (children 1)
               ExpressionList (children 2)
                Function dateDiff (children 1)
                 ExpressionList (children 3)
                  Literal \'ms\'
                  Function CAST (children 1)
                   ExpressionList (children 2)
                    Identifier grid_timestamp
                    Literal \'DateTime64(3, \\\'UTC\\\')\'
                  Identifier timestamp
                Literal \'Int16\'
              Identifier value
           TablesInSelectQuery (children 1)
            TablesInSelectQueryElement (children 1)
             TableExpression (children 1)
              TableIdentifier t_raw_timeseries
           ExpressionList (children 2)
            OrderByElement (children 1)
             Identifier metric_id
            OrderByElement (children 1)
             Identifier grid_timestamp
    ExpressionList (children 3)
     OrderByElement (children 1)
      Identifier step
     OrderByElement (children 1)
      Identifier metric_id
     OrderByElement (children 1)
      Identifier grid_timestamp
    Set
 ViewTargets
