SelectWithUnionQuery (children 1) ExpressionList (children 1) SelectQuery (children 2) ExpressionList (children 6) Function avg (children 1) ExpressionList (children 1) Identifier key Function avgIf (children 1) ExpressionList (children 2) Identifier key Function greater (children 1) ExpressionList (children 2) Identifier key Literal UInt64_0 Function avg (children 1) ExpressionList (children 1) Identifier key2 Function avgIf (children 1) ExpressionList (children 2) Identifier key2 Function greater (children 1) ExpressionList (children 2) Identifier key2 Literal UInt64_0 Function avg (children 1) ExpressionList (children 1) Identifier key3 Function avgIf (children 1) ExpressionList (children 2) Identifier key3 Function greater (children 1) ExpressionList (children 2) Identifier key3 Literal UInt64_0 TablesInSelectQuery (children 1) TablesInSelectQueryElement (children 1) TableExpression (children 1) Subquery (children 1) SelectWithUnionQuery (children 1) ExpressionList (children 1) SelectQuery (children 2) ExpressionList (children 3) Function CAST (alias key) (children 1) ExpressionList (children 2) Literal \'1\' Literal \'Int8\' Function CAST (alias key2) (children 1) ExpressionList (children 2) Literal NULL Literal \'Nullable(Int8)\' Function CAST (alias key3) (children 1) ExpressionList (children 2) Literal \'1\' Literal \'Nullable(Int8)\' TablesInSelectQuery (children 1) TablesInSelectQueryElement (children 1) TableExpression (children 1) Function numbers (children 1) ExpressionList (children 1) Literal UInt64_100000