I want to get the records which are older than 1 hour and which are not duplicated. Below is my table structure for KPI_LOGS table. I want to get the KPI_DEF_ID for which the timestamp is older than 1 hour and also this KPI_DEF_ID does not have any record from last 1 hour. For example if i take KPI_DEF_ID = 1000570 and check in KPI_LOGS table then i will also get the newer records for 1 hour and i dont want such KPI_DEF_ID if i query for older than 1 hour

I tried below query but it gives all the record which are older than 1 hour but i dont know how to write second condition where the KPI_DEF_ID which i will get for older than 1 hour should not be in present in the newer records
SELECT * FROM KPI_LOGS WHERE TIMESTAMP < SYSDATE - 5/24