I have a very unusual request. I have some filtered data in a table, columns being ID, Date, and Event. Event is an XML column where in one of the tag is StartWork and EndWork. From huge data I have filtered out data for a request. My Sample data has 6 rows, in sequence of StartWork, EndWork, StartWork, EndWork and so on. What exactly I want to do is find time difference between each combination. I mean, EndWork - StartWork = Difference. Next EndWork - StartWork = Difference2 and so on.
Basically I want, 2-1, 4-3, 6-5 and so on. I tried doing it with Pivot, but couldn't get desired result
