added simple aggregation by an arbitrary key