Bit of a strange question. Entries in my table have three relevant columns:
drug
date_1
date_2
seq_id
I am trying to make it such that every drug with the lowest seq_id
has a date_2
equal to the date_1
of the drug with the second lowest seq_id
(the second lowest will always be lowest + 1) with the same drug name.
Does this make sense?
I don't have any real clue how to go about doing this. I've managed to make a query that returns the date_1
and seq_id
of every second-lowest record, and now I want to make it such that every row with a seq_id
exactly one lower than any seq_id
in this set of records has date_2
= date_1
of the record with the 1-higher seq-id
.
God this is really confusing, I hope it comes through.