Since AWS Redshift don’t have function like FROM_UNIX(), it’s much more weird to get formatted time from a UNIX timestamp (called ‘epoch’ in Reshift):
SELECT timestamp 'epoch' + my_timestamp_column * interval '1 second' AS my_column_alias FROM my_table
Ref: https://stackoverflow.com/questions/39815425/how-to-convert-epoch-to-datetime-redshift
If we want to see the statistics result group by hours:
SELECT COUNT(1), DATE_TRUNC('hour', timestamp 'epoch' + my.timestamp * interval '1 second') AS hour FROM my_table AS my WHERE my_table.my_timestamp_column > extract('epoch' from '2019-10-23'::TIMESTAMP) GROUP BY hour ORDER BY hour;