- Here, the Athena table
athena_tablehas the columnstimestamp, day, month, year, id
select timestamp,month,day,year,id
from athena_table
WHERE month = 8 and day = 15
AND (CAST(timestamp as varchar) BETWEEN '2018-08-15 22:00:00' AND '2018-08-15 22:10:00')
ORDER BY timestamp DESC
| x | timestamp | month | day | year | id |
|---|---|---|---|---|---|
| 1 | 2018-08-15 22:03:25.296 | 15 | 8 | 2018 | 12344 |
| 2 | 2018-08-15 22:02:59.266 | 15 | 8 | 2018 | 12345 |