亚马逊雅典娜 sql 系统日期

问题描述

我刚开始使用 Athena,因此非常感谢您的帮助。

查询中使用以下内容时,收到“列‘sysdate’无法解析。使用过 oracle sql,但需要一些帮助,我需要在 Athena 中使用 sysdate。

Months_between (sysdate,inactivated_dt)

解决方法

我怀疑你想要:

where inactivated_dt >= current_date - interval '12' month

您可以在 documentation 中查看相应的函数和运算符。