0

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)?

1
  • The '' at the end (before the ; ) seem wrong. Commented Jan 13, 2013 at 9:30

1 Answer 1

1

How about this?

SELECT count(*) as results
FROM data
WHERE last_date BETWEEN (now() '- 45 minute'::interval)::timestamp
AND now();
Sign up to request clarification or add additional context in comments.

2 Comments

@JJHardis can you please try this and comment? How does your current last_send_date format looks like?
its looks like " Sun Jan 13 12:59:39 GMT 2013 "

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.