acct_nbr event_stamp membership_fee Zip_Code
12345 2014-07-08-10.27.13.000000 0.00 222
12345 2014-07-07-12.03.03.000000 55.00 222
67890 2014-07-14-12.03.03.000000 45.00 444
67890 2014-07-11-10.27.13.000000 44.00 444
67890 2014-07-15-12.03.03.000000 45.00 444
In the above record , I want to pick up the latest account number and its corresponding membership fee and zip based on the event_stamp field . I am not sure how to pick them . Below is the output I want:
12345 2014-07-08-10.27.13.000000 0.00 222
67890 2014-07-15-12.03.03.000000 45.00 444
Of all the methods I have tried , I am able to pick the latest time stamp , but I am not able to pick all the corresponding records .
Assuming that the records will be in same order as you have mentioned try this
your search | stats first(event_stamp) as event_stamp, first(membership_fee) as membership_fee, first(Zip_Code) as Zip_Code by acct_nbr
I used your data as CSV and see the output
Assuming that the records will be in same order as you have mentioned try this
your search | stats first(event_stamp) as event_stamp, first(membership_fee) as membership_fee, first(Zip_Code) as Zip_Code by acct_nbr
I used your data as CSV and see the output
Thanks Strive... very simple and apt solution...I was beating all around the bush...