GroupingNode groupNode = new GroupingNode(getID());
AggregateSymbol sumCount = new AggregateSymbol("SumCount", NonReserved.SUM, false, (Expression)accessNode.getElements().get(0)); //$NON-NLS-1$
List<Expression> outputElements = new ArrayList<Expression>(1);
outputElements.add(sumCount);
groupNode.setElements(outputElements);
groupNode.addChild(unionNode);
ProjectNode projectNode = new ProjectNode(getID());
Expression intSum = ResolverUtil.getConversion(sumCount, DataTypeManager.getDataTypeName(sumCount.getType()), DataTypeManager.DefaultDataTypes.INTEGER, false, metadata.getFunctionLibrary());