This is a data design question. I need to know if it is possible to create a Select that summarize the values of one column based on one TRUE to the next TRUE value value of another column as shown in the image below in the computed value [sum_duration_interval].
My first Idea on this question was to first create a computed value in the same table of the sum since the last true value of [is_interval]. But that not only will ignore the first action, but also creates a huge performance problem.
My next Idea was to select the count of true [is_interval] values till the current date in a computed column and use it to group, and then summarize the [duration] in another computed column. However, even this would include the first section, there is still a huge select over the whole table on each row.
The reason what makes this a problem is, that the entry's can change, so that a I can not just calculate on insert a new row and that's it.
So, is there a simple way to compute the [sum_duration_interval] value dynamically or should I rethink the design?
Solved! Go to Solution.
I could achieve the functionality just with reference actions using bots. So no VC is necessary in computation. Please let me know and I can share the test app.
A combination of adds:
Another combination of adds:
User | Count |
---|---|
16 | |
12 | |
9 | |
4 | |
2 |