I am trying to count the rows in a table in my database that were inserted within X hours or X days. I have tried repeatedly but I keep getting empty set responses.
Here are a some examples...
All entries within the past 6 hours:
select * from mytable where start_stamp >= now() - interval 6 hour;
All entries within the past 2 days:
select * from mytable where start_stamp >= now() - interval 2 day;
All entries within the past 2 1/2 days:
select * from mytable where start_stamp >= now() - interval 2 day - interval 12 hour;