【发布时间】:2018-11-30 11:32:09
【问题描述】:
我有一个红移表(pkg_date)。我想为过去 3 个月的每个日期获取一些数据。
这是我的查询
select * from pkg_data where scan_date < current_date;
如何在查询本身中使用 current_date 作为变量,并为 4 月 1 日起的每个日期运行此查询。
我设置了一个每小时运行一次的 cron 作业。每小时它应该以不同的 current_date 运行
【问题讨论】:
-
In every hour it should run with different current_date您想在哪个时间执行哪个日期?有什么公式吗?
标签: sql amazon-web-services cron amazon-redshift