Hi Bandon,
assuming that each row above is an Elasticsearch document, this is going to be difficult.
---> It is not.
Instead, I'd recommend ingesting each sale as a separate document and allowing Elasticsearch to calculate the aggregate information.
---> This is the case.
each time a toy is being seld a new decoument with the toy details is created.
I have a dashboard which shows details about toys sales from the last 60 minutes.
I was requested to add another vizualization that shows historical sales of top 5 products over time.
The tricky part is that i need to count documents from between DIFFERENT DATE RANGE and display them in the same table.
somting like the table bellow :
toy name | (num of sales toys in the last hour) | (num of sales toys from last week) | (num of sales toys from last mounth)
A | 2 | 20 | 65
B | 5 | 25 | 85
Any Idea ?