pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feedtimestamp SQL question
2+ messages / 2 participants
[nested] [flat]
* timestamp SQL question
@ 2005-11-17 23:18 Brian Doyle <bdoyle@localmatters.com>
2005-11-17 23:35 ` Re: timestamp SQL question codeWarrior <gpatnude@hotmail.com>
0 siblings, 1 reply; 2+ messages in thread
From: Brian Doyle @ 2005-11-17 23:18 UTC (permalink / raw)
To: pgsql-sql
I have a table like:
events
visitor_uid varchar(32)
event_type varchar(32)
event_type timestamp
I would like to select events from the table that are older than 30 days
from right now. How would I do that in one query? Thanks.
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: timestamp SQL question
2005-11-17 23:18 timestamp SQL question Brian Doyle <bdoyle@localmatters.com>
@ 2005-11-17 23:35 ` codeWarrior <gpatnude@hotmail.com>
0 siblings, 0 replies; 2+ messages in thread
From: codeWarrior @ 2005-11-17 23:35 UTC (permalink / raw)
To: pgsql-sql
WHERE event_type < NOW() - interval '30 days';
"Brian Doyle" <bdoyle@localmatters.com> wrote in message
news:1132269492.30942.20.camel@dev11dt.corp.localmatters.com...
>I have a table like:
>
> events
> visitor_uid varchar(32)
> event_type varchar(32)
> event_type timestamp
>
> I would like to select events from the table that are older than 30 days
> from right now. How would I do that in one query? Thanks.
>
>
>
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Have you searched our list archives?
>
> http://archives.postgresql.org
>
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2005-11-17 23:35 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2005-11-17 23:18 timestamp SQL question Brian Doyle <bdoyle@localmatters.com>
2005-11-17 23:35 ` codeWarrior <gpatnude@hotmail.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox