SelectWithUnionQuery (children 1)
 ExpressionList (children 1)
  SelectQuery (children 5)
   ExpressionList (children 1)
    Asterisk
   TablesInSelectQuery (children 1)
    TablesInSelectQueryElement (children 1)
     TableExpression (children 1)
      Subquery (children 1)
       SelectWithUnionQuery (children 1)
        ExpressionList (children 1)
         SelectQuery (children 2)
          ExpressionList (children 5)
           Identifier _part
           Function rowNumberInAllBlocks (children 1)
            ExpressionList
           Function tuple (alias cur) (children 1)
            ExpressionList (children 3)
             Identifier key
             Function toStartOfInterval (children 1)
              ExpressionList (children 2)
               Identifier ts
               Function toIntervalMinute (children 1)
                ExpressionList (children 1)
                 Literal UInt64_3
             Identifier ts
           Function lagInFrame (alias prev) (children 1)
            ExpressionList (children 2)
             Function tuple (children 1)
              ExpressionList (children 3)
               Identifier key
               Function toStartOfInterval (children 1)
                ExpressionList (children 2)
                 Identifier ts
                 Function toIntervalMinute (children 1)
                  ExpressionList (children 1)
                   Literal UInt64_3
               Identifier ts
             Literal UInt64_1
           Literal UInt64_1
          TablesInSelectQuery (children 1)
           TablesInSelectQueryElement (children 1)
            TableExpression (children 1)
             TableIdentifier ttl_group_by_bug
   Function less (children 1)
    ExpressionList (children 2)
     Identifier cur
     Identifier prev
   Literal UInt64_2
   Set
