aggregation and caching
aggregation in aggregation function