I have a timestamp field in a postgres database. I would like to select all dates that have happened within the last month. So something like select * from table where time
To be precise:
SELECT * FROM tbl WHERE ts_col > now() - interval '1 month' AND ts_col <= now();
select * from table where timestamp > now() - interval '1 month'