Aggregating data for quicker summaries

Ryan Howe
Analytics Vidhya
Published in
3 min readJun 2, 2020

The following is an ongoing exercise to look at how to pre-aggregate data to quickly summarize it. I was previously using a database I generated that looks like this.

Entity Relationship Diagram for test_data

The goal of this originally was to find a quick way of summarizing sales data for the purchases and the associated stores. I had previously posted a query like this and said there are some issues with using the ‘purchase_start’ as…