I can't understand the logic #40
Replies: 4 comments
-
No ideas? |
Beta Was this translation helpful? Give feedback.
-
The logic IMHO is: Although 9 events of type HeadCountStats were fired in the period above, the state of "head counts" is 5. You had 7 "head counts" for a while, but 2 got 'deleted' so the rest is 5. In Event Sourcing, the events change the state of something and this package is a simple implementation of this technique. If all events had been "HeadCountStats::increase()", the "value" would be 9 for that period. |
Beta Was this translation helpful? Give feedback.
-
Based on this logic, the data that the packet generates is incorrect, because it should not just be the sum of all events for the period |
Beta Was this translation helpful? Give feedback.
-
I would like to join and help, but I don't see any problem here. Data seems correct. What would you expect the data to be given your inputs? |
Beta Was this translation helpful? Give feedback.
-
Hello everyone 😊
Please help me because I just can’t understand why I am receiving this data.
Here is a list of my records sorted from oldest to most recent:
As you can see, there are only 9 records and all of them were created in August from 09 to 18.
During this period, 2 records were deleted and this can be seen in the statistics.
So, requesting the following data:
I get this result:
So here it is. Why do I get the value 5? After all, at the end of the period I have 7 entries, the same thing will happen if I try other types of grouping.
Even if I choose to group by day, the value will still be 5.
Beta Was this translation helpful? Give feedback.
All reactions