CreateQuery tab_v (children 2)
 Identifier tab_v
 SelectWithUnionQuery (children 1)
  ExpressionList (children 1)
   SelectQuery (children 4)
    ExpressionList (children 4)
     Identifier t1.type (alias type)
     Function sum (alias sval) (children 1)
      ExpressionList (children 1)
       Identifier t1.val
     Function toStartOfDay (alias sday) (children 1)
      ExpressionList (children 1)
       Identifier t1.dt
     Function anyLast (alias lval) (children 1)
      ExpressionList (children 1)
       Identifier sval
    TablesInSelectQuery (children 1)
     TablesInSelectQueryElement (children 1)
      TableExpression (children 1)
       TableIdentifier tab (alias t1)
    ExpressionList (children 2)
     Identifier type
     Identifier sday
    ExpressionList (children 1)
     WindowListElement
