CreateQuery TestView (children 2) Identifier TestView SelectWithUnionQuery (children 1) ExpressionList (children 2) SelectQuery (children 3) ExpressionList (children 3) Identifier str Identifier key Function sumIf (alias sum) (children 1) ExpressionList (children 2) Identifier a Literal UInt64_0 TablesInSelectQuery (children 1) TablesInSelectQueryElement (children 1) TableExpression (children 1) TableIdentifier Test_00584 ExpressionList (children 2) Identifier str Identifier key SelectQuery (children 3) ExpressionList (children 3) Identifier str (alias str) Function CAST (alias key) (children 1) ExpressionList (children 2) Literal \'ALL\' Literal \'Enum8(\\\'A\\\' = 0, \\\'B\\\' = 1, \\\'ALL\\\' = 2)\' Function sumIf (alias sum) (children 1) ExpressionList (children 2) Identifier a Literal UInt64_0 TablesInSelectQuery (children 1) TablesInSelectQueryElement (children 1) TableExpression (children 1) TableIdentifier Test_00584 ExpressionList (children 1) Identifier str