Select select = new Select();
AggregateSymbol agg1 = new AggregateSymbol("count", "COUNT", false, new ElementSymbol("a", false)); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
AggregateSymbol agg2 = new AggregateSymbol("sum", "SUM", false, new ElementSymbol("a", false)); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
Function f = new Function("*", new Expression[] { agg1, agg2 }); //$NON-NLS-1$
ExpressionSymbol expr = new ExpressionSymbol("expr", f); //$NON-NLS-1$
AliasSymbol alias = new AliasSymbol("c", expr); //$NON-NLS-1$
select.addSymbol(alias);
Query query = new Query();
query.setSelect(select);