let's assume I have a Table that looks like this:
timestamp event
2021-06-01 12:00:00.000 A
2021-06-01 12:00:00.200 B
2021-06-01 12:00:00.500 C
2021-06-01 12:00:01.700 A
2021-06-01 12:00:02.000 D
2021-06-01 12:00:03.000 B
I want to select timestamps of all events A where event B and C has not happened within 1 second of event A.
So from the example above, timestamp 2021-06-01 12:00:01.700 would be returned.
Preferably in SQL Server, but any SQL syntax will do to help me figure out how to write such query.