我如何在 apache drill 中使用 sysdate
How can I use sysdate in apache drill
我想通过 Apache Drill 运行 这个查询。
select * from mytable where my_date BETWEEN sysdate-1280 AND sysdate;
您可以尝试 current_date
而不是 sysdate
。请在此处查看有关可用时间函数的文档:https://drill.apache.org/docs/date-time-functions-and-arithmetic/#other-date-and-time-functions
select * from mytable
where my_date BETWEEN DATE_SUB(CURRENT_TIMESTAMP, interval '1280' day(4))
AND CURRENT_TIMESTAMP;
我想通过 Apache Drill 运行 这个查询。
select * from mytable where my_date BETWEEN sysdate-1280 AND sysdate;
您可以尝试 current_date
而不是 sysdate
。请在此处查看有关可用时间函数的文档:https://drill.apache.org/docs/date-time-functions-and-arithmetic/#other-date-and-time-functions
select * from mytable
where my_date BETWEEN DATE_SUB(CURRENT_TIMESTAMP, interval '1280' day(4))
AND CURRENT_TIMESTAMP;