To list databases from the command line:

psql -l

use to_char function for timestamp

"YYYY-MM-DD HH24:MI" is the format string

Create a timestamp and then select greater than:

select * from door_count where time > to_timestamp('2007-06', 'YYYY-MM');

Select using interval:

select * from door_count where time > now() - interval '7 days';

Convert timestamp to date

Date(timestamp) *makes it easy to just work with the date portions

SQL Command:

delete from door_count where time = timestamp '<the stamp>';