Question:
I’d like to make a chart that gives me data from last week.
I tried to use this code but it errors out.
1 2 |
where (time_stamp::date > dateadd(day, -7, now()::date)) |
I also tried
1 2 |
(ud.time_stamp::date between now() and dateadd(day, -7, now()::date)) |
It gives me this error
Error running query: Specified types or functions (one per INFO
message) not supported on Redshift tables.
Answer:
In Redshift, I would write this as:
1 2 |
where time_stamp >= current_date - interval '6 day' |
I suspect that time_stamp
might be used for partitioning and you want to be careful about comparisons involving functions on it.