I am trying to write a query to find the last 2 hours of data.
First I tried using INTERVAL:
select count(*) from data where created_at > CURRENT_TIMESTAMP - (INTERVAL '2 hours');
but I get the error:
ERROR: Not implemented
Item:
-------------------------------------------- ---
Error: Not implemented code: 1001
context: '! null_tst '- function: timestamp_gt_timestamptz (), funcID = 2523
request: 2734016
location: cg_expr.cpp: 295
process: padbmaster [pid = 25255]
-------------------- ---------------------------
Does anyone know a way to do this in Redshift without using absolute timestamps?
source
share