select * from table1 where created_at > date_sub(NOW(), interval 1 day)
I'm trying to get everything created within the last day, but I'm getting this error: mismatched input '1'. Expecting: ',', " What am I doing wrong here?
select * from table1 where created_at > date_sub(NOW(), interval 1 day)
I'm trying to get everything created within the last day, but I'm getting this error: mismatched input '1'. Expecting: ',', " What am I doing wrong here?
date_sub is a MySQL specific function. In Presto there are other time interval functions. I suppose your query should be something like that:
select * from table1 where created_at > date_add('day', -1, now());
However I don't have any Presto instance to test it.