I have a dataset in a particualer order and with a sequence no per group, the groups are grouped by an account and I have other varibels which describe the customer as it journeys through a process. My customer would enter the system and a have a product, the customer can then move from product to poduct over their life, stamping it with a date of the move and the product type. the dataset is as follows AccountNo change_date ProdCode Prod_id Seq_no 1900001 2003-04-14 R01 2 1 1900001 2003-07-14 R01 2 2 1900001 2006-01-16 R01 2 3 1900001 2006-04-18 R01 2 4 1550002 2006-07-24 XR5 1 1 1550002 2006-09-15 TG7 1 2 1550002 2006-11-17 R01 2 3 1550002 2007-01-19 R01 2 4 What I would like to do firstly is drop all data where the product code does not change for the acocunt no (the prod_id is a bigger bucket for the prod code, i.e. 500 ProdCodes can be bucketed into two ids 1 and 2) I would then like to be left with only data that has different prod codes (or id's) that have differences in there lifetime (for seq_no 1 to x), 1900001 would be droppped as it contains static codes Then I would like to be able to find where the prod id follows the exact prod_id sequence of 2 then 1 then 2 (account no 155002 is an example above of this sequence) I am completely open to any alternitive methods of getting this data, any help would be greatly appreciated!! thanks
... View more