Selecting 3 records before and 3 after
Posted on 2015-02-04
We have a data that contains a route id, drop sequence, truck id and if it participates in our program (yes or no). What we would like is to get a new tab that would show us the truck, the participants (those marked "YES") and the 3 stops (using drop sequence) before the record and 3 after (ones marked "no") so we would end up with 7 records total for each routeid (including the one marked "yes".
Any help would be greatly appreciated.