I want to write a query In AWS Athena which will give me the last but latest modified date in that column but instead it is giving me a date of years ago. While I know the latest date is around 2021 year
SELECT 'Direct' AS "ERP System", 'MYTABLE' AS "Table Name", COUNT(*) AS "Count", FROM_UNIXTIME(MIN("fetch_date") / 1000) AS "Data Available From" FROM "MYTABLE";
I wrote this and I got the latest date as 1970-01-20 07:20:22 while the latest date in the column is 1.622421022179976E9 which is of Nov 2022 which I got using unix converter tool