Received: from granger.mail.mindspring.net (granger.mail.mindspring.net [207.69.200.148]) by hub.org (8.10.1/8.10.1) with ESMTP id e9CEFcr17704 for ; Thu, 12 Oct 2000 10:15:39 -0400 (EDT) Received: from hbg-dnt-1467.mindspring.com (fw-6-e3.atl2.mindspring.net [207.69.162.124]) by granger.mail.mindspring.net (8.9.3/8.8.5) with ESMTP id KAA27907 for ; Thu, 12 Oct 2000 10:15:38 -0400 (EDT) Message-Id: <5.0.0.25.2.20001012094914.081abeb0@pop.mindspring.com> X-Sender: bcdoyle@pop.mindspring.com X-Mailer: QUALCOMM Windows Eudora Version 5.0 Date: Thu, 12 Oct 2000 10:14:57 -0400 To: pgsql-sql@postgresql.org From: "Brian C. Doyle" Subject: if else query help Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed X-Archive-Number: 200010/113 X-Sequence-Number: 1775 Hello all, I need to write a query that will pull information from table2 if information in table1 is older then xdate. My laymen example: SELECT table2.date, count(table2.name) as count WHERE table1.startdate > 2 weeks AND table2.submitdate > 2 weeks ; So i Guess my real questions is how do I determine the age of an entry to another table?