I am trying to create a query that will pull the most recent row for a state and tier3ID combination, while also showing the other three columns.
EFFECTIVE_DATE|STATE|ELIGIBLE|INTONLY|AOPELIGIBLE|TIER3ID
01-JAN-05 | AK | Yes | No | No |1101
15-NOV-12 | IN | Yes | No | No |1101
01-JAN-05 | AZ | Yes | No | No |1101
Everything I have tries gets me the data combinations, but I cant display the other three rows unless I group by them as well.
I basically want:
select state, tier3id, eligible,
max(effective_date)
from thirdtiereligibilityeq
group by state, tier3id, eligible
While having eligible, into only, and AOPeligible
displaying for those rows as well.