Implemented min, max and set aggregation functions