Hi @tomljh , good idea to include the aggregation in the java snippet!
As an aside, if you only need the aggregation and not the intermediate row results, the Column Expressions node could also be coded to perform this aggregation via a similar technique.