I have a redshift table where scannable_id_latest_update_timestamp is the column containing epoch timestamp. I'm trying to run a query which returns all the rows where scannable_id_latest_update_timestamp is older than 6 months
Tried below query
select *
from scannable_id_pin_mappings
where date_cmp(dateadd(month,6,current_date), timestamp 'epoch' +
scannable_id_latest_update_timestamp * interval '1 second') = -1;
Gettng exception
Invalid operation: function date_cmp(timestamp without time zone, timestamp without time zone) does not exist;