SelectWithUnionQuery (children 1) ExpressionList (children 1) SelectQuery (children 5) ExpressionList (children 3) Identifier cntrycode Function count (alias numcust) (children 1) ExpressionList (children 1) Asterisk Function sum (alias totacctbal) (children 1) ExpressionList (children 1) Identifier c_acctbal TablesInSelectQuery (children 1) TablesInSelectQueryElement (children 1) TableExpression (children 1) Subquery (alias custsale) (children 1) SelectWithUnionQuery (children 1) ExpressionList (children 1) SelectQuery (children 3) ExpressionList (children 2) Function substring (alias cntrycode) (children 1) ExpressionList (children 3) Identifier c_phone Literal UInt64_1 Literal UInt64_2 Identifier c_acctbal TablesInSelectQuery (children 1) TablesInSelectQueryElement (children 1) TableExpression (children 1) TableIdentifier customer Function and (children 1) ExpressionList (children 3) Function in (children 1) ExpressionList (children 2) Function substring (children 1) ExpressionList (children 3) Identifier c_phone Literal UInt64_1 Literal UInt64_2 Literal Tuple_(\'13\', \'31\', \'23\', \'29\', \'30\', \'18\', \'17\') Function greater (children 1) ExpressionList (children 2) Identifier c_acctbal Subquery (children 1) SelectWithUnionQuery (children 1) ExpressionList (children 1) SelectQuery (children 3) ExpressionList (children 1) Function avg (children 1) ExpressionList (children 1) Identifier c_acctbal TablesInSelectQuery (children 1) TablesInSelectQueryElement (children 1) TableExpression (children 1) TableIdentifier customer Function and (children 1) ExpressionList (children 2) Function greater (children 1) ExpressionList (children 2) Identifier c_acctbal Literal Float64_0 Function in (children 1) ExpressionList (children 2) Function substring (children 1) ExpressionList (children 3) Identifier c_phone Literal UInt64_1 Literal UInt64_2 Literal Tuple_(\'13\', \'31\', \'23\', \'29\', \'30\', \'18\', \'17\') Function not (children 1) ExpressionList (children 1) Function exists (children 1) ExpressionList (children 1) Subquery (children 1) SelectWithUnionQuery (children 1) ExpressionList (children 1) SelectQuery (children 3) ExpressionList (children 1) Asterisk TablesInSelectQuery (children 1) TablesInSelectQueryElement (children 1) TableExpression (children 1) TableIdentifier orders Function equals (children 1) ExpressionList (children 2) Identifier o_custkey Identifier c_custkey ExpressionList (children 1) Identifier cntrycode ExpressionList (children 1) OrderByElement (children 1) Identifier cntrycode Set