Having satisfied ourselves that precomputed aggregation is worth adding some complexity to the process of recording an observation, let's explore some other ways in which we might want to aggregate data. Here are a few examples of questions we might want to answer and the type of table schema we might set up to efficiently store precomputed aggregates to answer these questions:
Question | Partition Key | Clustering Column |
How many total views did status updates receive in September? | year | date |
What percentage of status update views are via the Web, via our mobile app, and via third-party applications? | month | client_type |
Which hours of the day are most popular for viewing status updates? | month |