I have a table in Athena AWS with a timestamp field. I want to group them by date. My SQL query is:
SELECT CAST(createdat AS DATE) FROM conversations GROUP BY createdat
But my result is the following:

As you can see the group by does not work, and the reason is that the new table has the name field _col0 instead createdat.
I also tried:
SELECT CAST(createdat AS DATE) FROM conversations GROUP BY _col0 but I got and error.
Does anybody has any suggestions? I will appreciate it