Netezza 使用 table 中的上次修改时间戳列获取最近 5 分钟内最后更新的记录?

Netezza get records last updated in last 5 minutes using a last modified time stamp column in the table?

如何使用 table 中的 last_modified_timestamp 列使用 Netezza 中的 current_date 或 current_timestamp 函数 select 记录最近 5 分钟更新的记录?

如果您安装了 SQL 扩展,那么您可以使用 minutes_between

select 
  * 
from 
  table 
where 
  minutes_between(current_timestamp, last_modified_timestamp) < 5

如果没有,您可以随时使用间隔。

select
  *
from
  table 
where 
  last_modified_timestamp > current_timestamp - '5 minute'::interval