Hi,
I need to prepare a output based on the below table:
[TABLE="class: grid, width: 417"]
<tbody>[TR]
[TD]USER_ID[/TD]
[TD="align: center"]Type[/TD]
[TD="align: right"]Time Stamp[/TD]
[/TR]
[TR]
[TD]User_1[/TD]
[TD="align: center"]0[/TD]
[TD="align: right"]Dec-12-2018 19:53[/TD]
[/TR]
[TR]
[TD]User_1[/TD]
[TD="align: center"]0[/TD]
[TD="align: right"]Dec-12-2018 19:53[/TD]
[/TR]
[TR]
[TD]User_1[/TD]
[TD="align: center"]0[/TD]
[TD="align: right"]Dec-12-2018 19:57[/TD]
[/TR]
[TR]
[TD]User_1[/TD]
[TD="align: center"]0[/TD]
[TD="align: right"]Dec-19-2018 18:30[/TD]
[/TR]
[TR]
[TD]User_1[/TD]
[TD="align: center"]0[/TD]
[TD="align: right"]Dec-19-2018 18:31[/TD]
[/TR]
[TR]
[TD]User_1[/TD]
[TD="align: center"]0[/TD]
[TD="align: right"]Dec-19-2018 18:32[/TD]
[/TR]
[TR]
[TD]User_1[/TD]
[TD="align: center"]0[/TD]
[TD="align: right"]Dec-19-2018 18:33[/TD]
[/TR]
[TR]
[TD]User_1[/TD]
[TD="align: center"]1[/TD]
[TD="align: right"]Dec-19-2018 18:35[/TD]
[/TR]
[TR]
[TD]User_2[/TD]
[TD="align: center"]0[/TD]
[TD="align: right"]Dec-12-2018 17:36[/TD]
[/TR]
[TR]
[TD]User_2[/TD]
[TD="align: center"]0[/TD]
[TD="align: right"]Dec-12-2018 17:37[/TD]
[/TR]
[TR]
[TD]User_2[/TD]
[TD="align: center"]0[/TD]
[TD="align: right"]Dec-12-2018 19:12[/TD]
[/TR]
[TR]
[TD]User_2[/TD]
[TD="align: center"]1[/TD]
[TD="align: right"]Dec-12-2018 19:15[/TD]
[/TR]
[TR]
[TD]User_3[/TD]
[TD="align: center"]0[/TD]
[TD="align: right"]Dec-13-2018 0:47[/TD]
[/TR]
[TR]
[TD]User_3[/TD]
[TD="align: center"]0[/TD]
[TD="align: right"]Dec-13-2018 0:47[/TD]
[/TR]
[TR]
[TD]User_3[/TD]
[TD="align: center"]0[/TD]
[TD="align: right"]Dec-13-2018 0:48[/TD]
[/TR]
[TR]
[TD]User_3[/TD]
[TD="align: center"]0[/TD]
[TD="align: right"]Dec-18-2018 2:22[/TD]
[/TR]
[TR]
[TD]User_3[/TD]
[TD="align: center"]0[/TD]
[TD="align: right"]Dec-15-2018 14:01[/TD]
[/TR]
[TR]
[TD]User_3[/TD]
[TD="align: center"]0[/TD]
[TD="align: right"]Dec-15-2018 14:01[/TD]
[/TR]
[TR]
[TD]User_3[/TD]
[TD="align: center"]0[/TD]
[TD="align: right"]Dec-15-2018 14:01[/TD]
[/TR]
[TR]
[TD]User_3[/TD]
[TD="align: center"]0[/TD]
[TD="align: right"]Dec-15-2018 14:02[/TD]
[/TR]
[TR]
[TD]User_3[/TD]
[TD="align: center"]0[/TD]
[TD="align: right"]Dec-31-2018 0:55[/TD]
[/TR]
[TR]
[TD]User_3[/TD]
[TD="align: center"]0[/TD]
[TD="align: right"]Dec-31-2018 0:55[/TD]
[/TR]
[TR]
[TD]User_3[/TD]
[TD="align: center"]1[/TD]
[TD="align: right"]Dec-31-2018 0:55[/TD]
[/TR]
[TR]
[TD]User_3[/TD]
[TD="align: center"]0[/TD]
[TD="align: right"]Dec-31-2018 0:59[/TD]
[/TR]
[TR]
[TD]User_3[/TD]
[TD="align: center"]1[/TD]
[TD="align: right"]Dec-31-2018 2:30[/TD]
[/TR]
</tbody>[/TABLE]
Basically, I need the Time Difference from the 1st Type-0 and 1st Type-1 for the specific User.
And then if the user has multiple Type-1s, another record should be there the Time Stamp of Type-0 should be next one to the earlier Type-1 TimeStamp.
Below is the out of above table:
[TABLE="class: grid, width: 578"]
<tbody>[TR]
[TD]UserID[/TD]
[TD="align: center"]Time Stamp of Type 0[/TD]
[TD="align: center"]Time Stamp of Type 1[/TD]
[TD="align: center"]Time Difference[/TD]
[/TR]
[TR]
[TD]User_1[/TD]
[TD="align: center"]Dec-12-2018 19:53[/TD]
[TD="align: center"]Dec-19-2018 18:35[/TD]
[TD="align: center"]6 days 22 hrs 41 mins[/TD]
[/TR]
[TR]
[TD]User_2[/TD]
[TD="align: center"]Dec-12-2018 17:36[/TD]
[TD="align: center"]Dec-12-2018 19:15[/TD]
[TD="align: center"]0 days 1 hrs 38 mins[/TD]
[/TR]
[TR]
[TD]User_3[/TD]
[TD="align: center"]Dec-13-2018 0:47[/TD]
[TD="align: center"]Dec-31-2018 0:55[/TD]
[TD="align: center"]18 days 0 hrs 7 mins[/TD]
[/TR]
[TR]
[TD]User_3[/TD]
[TD="align: center"]Dec-31-2018 2:59[/TD]
[TD="align: center"]Dec-31-2018 8:30[/TD]
[TD="align: center"]0 days 5 hrs 31 mins[/TD]
[/TR]
</tbody>[/TABLE]
Thanks in advance.
I need to prepare a output based on the below table:
[TABLE="class: grid, width: 417"]
<tbody>[TR]
[TD]USER_ID[/TD]
[TD="align: center"]Type[/TD]
[TD="align: right"]Time Stamp[/TD]
[/TR]
[TR]
[TD]User_1[/TD]
[TD="align: center"]0[/TD]
[TD="align: right"]Dec-12-2018 19:53[/TD]
[/TR]
[TR]
[TD]User_1[/TD]
[TD="align: center"]0[/TD]
[TD="align: right"]Dec-12-2018 19:53[/TD]
[/TR]
[TR]
[TD]User_1[/TD]
[TD="align: center"]0[/TD]
[TD="align: right"]Dec-12-2018 19:57[/TD]
[/TR]
[TR]
[TD]User_1[/TD]
[TD="align: center"]0[/TD]
[TD="align: right"]Dec-19-2018 18:30[/TD]
[/TR]
[TR]
[TD]User_1[/TD]
[TD="align: center"]0[/TD]
[TD="align: right"]Dec-19-2018 18:31[/TD]
[/TR]
[TR]
[TD]User_1[/TD]
[TD="align: center"]0[/TD]
[TD="align: right"]Dec-19-2018 18:32[/TD]
[/TR]
[TR]
[TD]User_1[/TD]
[TD="align: center"]0[/TD]
[TD="align: right"]Dec-19-2018 18:33[/TD]
[/TR]
[TR]
[TD]User_1[/TD]
[TD="align: center"]1[/TD]
[TD="align: right"]Dec-19-2018 18:35[/TD]
[/TR]
[TR]
[TD]User_2[/TD]
[TD="align: center"]0[/TD]
[TD="align: right"]Dec-12-2018 17:36[/TD]
[/TR]
[TR]
[TD]User_2[/TD]
[TD="align: center"]0[/TD]
[TD="align: right"]Dec-12-2018 17:37[/TD]
[/TR]
[TR]
[TD]User_2[/TD]
[TD="align: center"]0[/TD]
[TD="align: right"]Dec-12-2018 19:12[/TD]
[/TR]
[TR]
[TD]User_2[/TD]
[TD="align: center"]1[/TD]
[TD="align: right"]Dec-12-2018 19:15[/TD]
[/TR]
[TR]
[TD]User_3[/TD]
[TD="align: center"]0[/TD]
[TD="align: right"]Dec-13-2018 0:47[/TD]
[/TR]
[TR]
[TD]User_3[/TD]
[TD="align: center"]0[/TD]
[TD="align: right"]Dec-13-2018 0:47[/TD]
[/TR]
[TR]
[TD]User_3[/TD]
[TD="align: center"]0[/TD]
[TD="align: right"]Dec-13-2018 0:48[/TD]
[/TR]
[TR]
[TD]User_3[/TD]
[TD="align: center"]0[/TD]
[TD="align: right"]Dec-18-2018 2:22[/TD]
[/TR]
[TR]
[TD]User_3[/TD]
[TD="align: center"]0[/TD]
[TD="align: right"]Dec-15-2018 14:01[/TD]
[/TR]
[TR]
[TD]User_3[/TD]
[TD="align: center"]0[/TD]
[TD="align: right"]Dec-15-2018 14:01[/TD]
[/TR]
[TR]
[TD]User_3[/TD]
[TD="align: center"]0[/TD]
[TD="align: right"]Dec-15-2018 14:01[/TD]
[/TR]
[TR]
[TD]User_3[/TD]
[TD="align: center"]0[/TD]
[TD="align: right"]Dec-15-2018 14:02[/TD]
[/TR]
[TR]
[TD]User_3[/TD]
[TD="align: center"]0[/TD]
[TD="align: right"]Dec-31-2018 0:55[/TD]
[/TR]
[TR]
[TD]User_3[/TD]
[TD="align: center"]0[/TD]
[TD="align: right"]Dec-31-2018 0:55[/TD]
[/TR]
[TR]
[TD]User_3[/TD]
[TD="align: center"]1[/TD]
[TD="align: right"]Dec-31-2018 0:55[/TD]
[/TR]
[TR]
[TD]User_3[/TD]
[TD="align: center"]0[/TD]
[TD="align: right"]Dec-31-2018 0:59[/TD]
[/TR]
[TR]
[TD]User_3[/TD]
[TD="align: center"]1[/TD]
[TD="align: right"]Dec-31-2018 2:30[/TD]
[/TR]
</tbody>[/TABLE]
Basically, I need the Time Difference from the 1st Type-0 and 1st Type-1 for the specific User.
And then if the user has multiple Type-1s, another record should be there the Time Stamp of Type-0 should be next one to the earlier Type-1 TimeStamp.
Below is the out of above table:
[TABLE="class: grid, width: 578"]
<tbody>[TR]
[TD]UserID[/TD]
[TD="align: center"]Time Stamp of Type 0[/TD]
[TD="align: center"]Time Stamp of Type 1[/TD]
[TD="align: center"]Time Difference[/TD]
[/TR]
[TR]
[TD]User_1[/TD]
[TD="align: center"]Dec-12-2018 19:53[/TD]
[TD="align: center"]Dec-19-2018 18:35[/TD]
[TD="align: center"]6 days 22 hrs 41 mins[/TD]
[/TR]
[TR]
[TD]User_2[/TD]
[TD="align: center"]Dec-12-2018 17:36[/TD]
[TD="align: center"]Dec-12-2018 19:15[/TD]
[TD="align: center"]0 days 1 hrs 38 mins[/TD]
[/TR]
[TR]
[TD]User_3[/TD]
[TD="align: center"]Dec-13-2018 0:47[/TD]
[TD="align: center"]Dec-31-2018 0:55[/TD]
[TD="align: center"]18 days 0 hrs 7 mins[/TD]
[/TR]
[TR]
[TD]User_3[/TD]
[TD="align: center"]Dec-31-2018 2:59[/TD]
[TD="align: center"]Dec-31-2018 8:30[/TD]
[TD="align: center"]0 days 5 hrs 31 mins[/TD]
[/TR]
</tbody>[/TABLE]
Thanks in advance.