Query get data only to last month on Athena

0

Hi guys, hope you are well!

I need help with a query in athena to get my data for the previous month. In sql I used a query that worked very well and in athena I'm not getting it. My field is coming in yyyymmdd and string format.

The query that I need help for athena to understand is this one:

REF_DATE BETWEEN DATEADD(MONTH, -1,(GETDATE()1DAY(GETDATE())+1)) AND DATEADD(DAY,1,(GETDATE()DAY(GETDATE())+1)))

Thank you so much!

gefragt vor einem Jahr125 Aufrufe
Keine Antworten

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen