id start date drug end_Date
1 01/01/2005 a 04/01/2005
1 02/01/2005 b 03/04/2005
2 02/03/2005 a 03/04/2005
2 01/02/2004 b 02/02/2004 I have the following database with multiple ids and only two drugs a and b. I want to create a database for drug a but to change the end date based on the start of drug. Here are my assumptions: For patients 1, the start date is the same but the end date for drug a would be the start of drug b. For patient 2, do not include because drug b started before a each drug has one start and one end date My output would look like this id start date drug end_Date
1 01/01/2005 a 02/01/2005 Thanks!
... View more