I am trying to return one row based off the max date.
In the Image: Table 1, I would like to return the PERPOS_HRP_ID and the PERPOS_SUPERVISOR_HRP_ID where the PERPOS_END_DATE is the MAX(PERPOS_END_DATE)
I tried the below code:
SELECT PERPOS_HRP_ID, PERPOS_SUPERVISOR_HRP_ID
WHERE PERPOS_END_DATE = (
SELECT MAX(PERPOS_END_DATE) FROM SPT_PERPOS WHERE PERPOS_HRP_ID = '1259100')
It should return: