Hi all,
I am new here an not certain I'am at the right place.
I am tying to figure something out.
I have a list of encounters (with unique encounter ID) and events within this encounter. I need/ would like to create the following partitions based on whether the time between events is more than 24h. I need this in order to calculate the duration of one patitition.
|Encounter|Event|Time between events is > 24 h|partiontions|
|1|1|0|1|
|1|2|0|1|
|1|3|1|2|
|1|4|0|2|
|2|1|0|1|
|2|2|0|1|
|2|3|1|2|
|2|4|0|2|
|2|5|1|3|
|2|6|0|3|
|2|7|0|3|
|3|1|0|1|
|3|2|0|1|
Is there a way to do this using SQL?
Your helpt is grately appreciated!
With kind regards,
Myriam