Reputation: 1
I am using this to count data in that send in last 75 mints but i got always 0 , in the same time there is data sent in last 75 mints
select count(*) as result
from data.data
where last_send_date > (clock_timestamp() - interval '75 minutes')'';
Any tips where my mistake is (db engine postgres)?
Upvotes: 0
Views: 223
Reputation: 14361
How about this?
SELECT count(*) as results
FROM data
WHERE last_date BETWEEN (now() '- 45 minute'::interval)::timestamp
AND now();
Upvotes: 1