Is there a way in PS Query to get the most recent min eff date?
I have had a few different occasions where I needed to capture the most recent minimum eff date for some activity. One example is the most recent date a position was inactivated. Positions can move from active to inactive multiple times and I have a user who wants to know for a position that is inactive, what is the most recent date it was inactivated. So the position history may look like this:
Position | Eff Date | Status | Action | Reason |
10048499 | 2/7/2017 | I | POS | UPD |
10048499 | 8/2/2016 | I | POS | UPD |
10048499 | 3/6/2016 | A | POS | UPD |
10048499 | 2/21/2016 | I | POS | UPD |
10048499 | 5/1/2015 | A | POS | NEW |
In this example, I would want the 8/2/16 effective date (most recent eff date where the status changed to inactive), not 2/21/16 (the min eff date where status is inactive).