Re: Help with Code
Posted: Thu Jul 23, 2015 5:46 pm
could I please bother you with one last?
I have arranged my dataset in following format
ID1 ID2 EventATime Event SID InteractionTime InteractionNumber
3335989 887582837 5/31/2014 23:53 A 1186276 (null) (null)
3335989 887582837 5/31/2014 23:53 I 1186276 5/10/2014 0:52 1
3335989 887582837 5/31/2014 23:53 I 1186276 5/9/2014 21:54 2
3335989 887582837 5/31/2014 23:51 A 1186276 (null) (null)
3461302 587582838 5/31/2014 23:51 I 1186276 5/31/2014 23:14 1
3461302 587582838 5/31/2014 23:51 I 1186276 5/31/2014 23:12 2
3461302 587582838 5/31/2014 23:51 I 1186276 5/31/2014 23:10 3
3461302 587582838 5/31/2014 23:51 I 1186276 5/31/2014 23:07 4
3461302 587582838 5/31/2014 23:51 I 1186276 5/31/2014 23:03 5
3461302 587582838 5/31/2014 23:51 I 1186276 5/31/2014 22:52 6
3461302 587582838 5/31/2014 23:51 I 1186270 5/25/2014 19:51 7
3461302 587582838 5/31/2014 23:51 I 1186270 5/25/2014 19:51 8
It basically arranged by events that happen after every Event A for a userID (ID2) in descending order based on InteractionTIme.
Final result should be like this: Which is basically for every ID1,ID2,EventATime combination, find the SID corresponding to first and last InteractionNumber.
ID1 ID2 EventATime SID-First SID-Last
3335989 887582837 5/31/2014 23:53 1186276 1186276
3461302 587582838 5/31/2014 23:51 1186276 1186270
I have arranged my dataset in following format
ID1 ID2 EventATime Event SID InteractionTime InteractionNumber
3335989 887582837 5/31/2014 23:53 A 1186276 (null) (null)
3335989 887582837 5/31/2014 23:53 I 1186276 5/10/2014 0:52 1
3335989 887582837 5/31/2014 23:53 I 1186276 5/9/2014 21:54 2
3335989 887582837 5/31/2014 23:51 A 1186276 (null) (null)
3461302 587582838 5/31/2014 23:51 I 1186276 5/31/2014 23:14 1
3461302 587582838 5/31/2014 23:51 I 1186276 5/31/2014 23:12 2
3461302 587582838 5/31/2014 23:51 I 1186276 5/31/2014 23:10 3
3461302 587582838 5/31/2014 23:51 I 1186276 5/31/2014 23:07 4
3461302 587582838 5/31/2014 23:51 I 1186276 5/31/2014 23:03 5
3461302 587582838 5/31/2014 23:51 I 1186276 5/31/2014 22:52 6
3461302 587582838 5/31/2014 23:51 I 1186270 5/25/2014 19:51 7
3461302 587582838 5/31/2014 23:51 I 1186270 5/25/2014 19:51 8
It basically arranged by events that happen after every Event A for a userID (ID2) in descending order based on InteractionTIme.
Final result should be like this: Which is basically for every ID1,ID2,EventATime combination, find the SID corresponding to first and last InteractionNumber.
ID1 ID2 EventATime SID-First SID-Last
3335989 887582837 5/31/2014 23:53 1186276 1186276
3461302 587582838 5/31/2014 23:51 1186276 1186270