flatten aggregation results