How to disambiguate a sequence in sql?
- by Martin
I have a table of data which represents a series of events that persons do over time, sometimes people do the same thing several times in a row. How to select a result using MS SQL 2008 that shows only disambiguated sequences of those events?
Source data:
Person Event Time
1 2 1
1 2 20
1 2 33
2 1 34
1 4 43
1 2 44
2 3 45
1 2 46
1 3 50
1 3 55
Result:
Person Event
1 2
2 1
1 4
1 2
2 3
1 3