pturmel
December 11, 2022, 5:30pm
2
You have this question open in multiple topics, and with answers. It is against this forum's rules to do that. At least, not without linking to the other topics.
Use a transaction group that has an on-change trigger for the boolean or integer of interest. Have the transaction group check the trigger as a pace that meets your accuracy requirements. Then query the database, using a LEAD() window function to look forward from an event to grab the timestamp of the next one. Use an outer query to compute the durations grouped by event value, discarding the grouped rows that aren't interesting.
The insertions into the database can also be scripted if the S…