Let us say I have rows containing data like this:
2014-10-28 08:25:00
2014-10-28 10:25:00
2014-10-28 10:30:00
2014-11-03 09:25:00
2014-11-03 09:40:00
2014-11-03 09:40:00
2014-11-10 09:40:00
2014-11-17 09:25:00
Depending on some predefined 'date time distance' (e.g. 120 minutes) one could group these data time values:
into 4 groups:
2014-10-28 08:25:00
2014-10-28 10:25:00
2014-10-28 10:30:00
2014-11-03 09:25:00
2014-11-03 09:40:00
2014-11-03 09:40:00
2014-11-10 09:40:00
2014-11-17 09:25:00
Can something like this be achieved via TSQL. I tried something along those lines but it is not the same problem.