Let's say that I have a table that looks like this, giving me the time of various events in seconds.
event_time
11
14
18
20
25
39
42
43
50
I am trying to find a query that will give me a set of rows from this table, where each row will be split for at least 10 seconds from the other rows as a result.
Desired Result:
event_time
11
25
39
50
Line c is event_time=11included because there is nothing in front of it. Line c event_time=25is the next one to be returned, because it is the first line that is at least 10 seconds from line c event_time=11.
Postgres. /CTE, ORDER BY, LIMIT .., Postgres, -, .