Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.
Originally posted by: kevin_chuahInput data as per below
DateReg IPAddress
2012-07-20 10:25:12 1.122.213.54
2012-07-20 10:26:10 1.122.213.54
2012-07-20 10:27:05 1.122.213.54
2012-07-20 10:51:54 102.170.42.162
2012-07-20 10:56:10 102.170.42.162
2012-07-20 11:07:33 102.170.42.162
Have used an Agg Ex node but it's not reliably returning the right results.
Should return
IP,MinActTime,MaxActTime
1.122.213.54,2012-07-20 10:25:12,2012-07-20 10:27:05
102.170.42.162,2012-07-20 10:51:54,2012-07-20 11:07:33
Script in the nodes currentl look like
MinActTime=min(DateRego)
emit referencedFields(1,{{^GroupBy^}}),MinActTime
where lastInGroup
and
MaxActTime=max(DateRego)
emit referencedFields(1,{{^GroupBy^}}),MaxActTime
where lastInGroup