I would like to calculate the total amount of sales for each of my customers in “time buckets" which is depending on their last purchase date.
For example for customer X I am trying to calculate the total amount purchased in the period -1 |-14 days before his last purchase, the same for the period -15|-28 and so on.
I have two tables containing:
1) The last purchase date for each customer
2) All the purchases of my customer on daily basis. Therefore, I have customer-day-purchase amount
Could you please suggest me the best way to proceed?
Are there some special nodes that can help me?
I tried to use the group by node but it seems a long way (first attributing each purchase at the bucket of the customer and then use the group by node to aggregate on it)
Thanks a lot for your help