aggregation: make use of reference values in agregate command