I have two or more event with same Id like a session but with different attribute values I should query the all event grouped by id and calc the difference between two time stamps.
example of events
event one:
{ type: 'start', Id: 1 ... }
event two:
{ type: 'end', Id: 1 ... }
Pseudo query:
select (end.timrstamp-start.timestamp)/1000 group by Id
I think the one possible solutions is