I am trying to get total duration spent between two events by a set of unique user id's. The two events are startCount and endCount. I know how to fetch the user id's who has completed the event Count session completed like below. But how do I find out the total duration between the Count session Started and Count session completed events for each unique userId, as the users would access the function multiple times during a day. Any help is much appreciated.
SELECT uniques(userId) from MyAppEvents where appName = 'Counter App' and name='Count Session Status' and Action='Count session completed' AND appVersion='1.0.0' SINCE today UNTIL now