I have a table that contains multiple rows with one identificator and the datetime of the row.
id | creation_date |
---|---|
1 | 2024-05-29 12:58:00.489 |
1 | 2024-05-29 12:58:03.489 |
2 | 2024-05-29 12:58:05.489 |
1 | 2024-05-29 13:03:03.489 |
From this table I need to filter rows that contain both the same id and were created within 1 minute from each other. The final result:
id | creation_date |
---|---|
1 | 2024-05-29 12:58:00.489 |
1 | 2024-05-29 12:58:03.489 |
Table contains multiple rows with various id, so I need to group them somehow and then apply the difference, but I have no idea how to do this.