Added date-partitioned aggregation calculation.