X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id A80A6DB98D for ; Thu, 17 Nov 2005 19:33:10 -0400 (AST) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 82241-07 for ; Thu, 17 Nov 2005 23:33:11 +0000 (GMT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from floppy.pyrenet.fr (news.pyrenet.fr [194.116.145.2]) by svr1.postgresql.org (Postfix) with ESMTP id B3910DB9BF for ; Thu, 17 Nov 2005 19:33:06 -0400 (AST) Received: by floppy.pyrenet.fr (Postfix, from userid 106) id 526B431059; Fri, 18 Nov 2005 00:33:09 +0100 (MET) From: "codeWarrior" X-Newsgroups: pgsql.sql Subject: Re: timestamp SQL question Date: Thu, 17 Nov 2005 15:35:48 -0800 Organization: Hub.Org Networking Services Lines: 28 Message-ID: References: <1132269492.30942.20.camel@dev11dt.corp.localmatters.com> X-Complaints-To: usenet@news.hub.org X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.2670 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2670 X-RFC2646: Format=Flowed; Original To: pgsql-sql@postgresql.org X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.549 required=5 tests=[AWL=0.000, FORGED_HOTMAIL_RCVD2=0.549] X-Spam-Score: 0.549 X-Spam-Level: X-Archive-Number: 200511/136 X-Sequence-Number: 23387 WHERE event_type < NOW() - interval '30 days'; "Brian Doyle" 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 >