An analytical query computes an aggregate, such as an average or total, across many entities. In a CQRS view, precompute the aggregate when calculating it for every query would be too slow because of query frequency or data size. section 13.3 section 13.3.2
Average delivery time
For an average delivery time by restaurant and day, store a sum and count rather than an average. A DeliveryDelivered event identifies the record to update; queries can then read the aggregate without scanning every delivered order. section 13.3.2
