Received: from localhost (maia-5.hub.org [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id 853BC9FA217 for ; Thu, 21 Jun 2007 10:33:13 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-maia, port 10024) with ESMTP id 40754-06 for ; Thu, 21 Jun 2007 10:33:02 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.5 Received: from an-out-0708.google.com (an-out-0708.google.com [209.85.132.247]) by postgresql.org (Postfix) with ESMTP id 07E529FA5DD for ; Thu, 21 Jun 2007 10:33:07 -0300 (ADT) Received: by an-out-0708.google.com with SMTP id c36so106466ana for ; Thu, 21 Jun 2007 06:33:06 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=bm8j+bymRlmghNJtu/4JfqXX/OsL5z+E+Ul3EnTcp9GOpwF3r+xj25FLQ2AydjpWjRQor1UQF2yAPTGaoivkQDOcEsmOdieFnxE5uObXgIuKEDblEPsoCM6STyXORi8PaVvTOC1F6q4ou98XHD46L7o1fSOSduf7oaYhkRAL3WQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=l96hJ7JzMsbR3BuTwHo5Ala30AxdGccIt+lhiyJlEbahkdsPWdA5kiR8W++Pc8VZ5fgVpiv2trDTR8BEqRCnUs0Tliq0FL8Gnv8T1TCpqdwW9c4f8iJ2moxoOYZ9k9I+S6MAaeACz63hQ7r7MQtIQRHnOkmacnsYR5+GA6rvjZw= Received: by 10.100.108.11 with SMTP id g11mr1051156anc.1182432786589; Thu, 21 Jun 2007 06:33:06 -0700 (PDT) Received: by 10.100.144.11 with HTTP; Thu, 21 Jun 2007 06:33:06 -0700 (PDT) Message-ID: <1c23c8e70706210633g234e06a1qb25558091e572971@mail.gmail.com> Date: Thu, 21 Jun 2007 16:33:06 +0300 From: "Loredana Curugiu" To: "Richard Huxton" , pgsql-novice@postgresql.org, pgsql-sql@postgresql.org Subject: Re: [SQL] Select last there dates In-Reply-To: <467A7AAD.8090006@archonet.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_137141_10468397.1182432786430" References: <1c23c8e70706210118h6b9490e3s11e2a6ba15cdff6c@mail.gmail.com> <20070621095025.GG1405@a-kretschmer.de> <1c23c8e70706210600he74293ci83bdbc557ee2dba8@mail.gmail.com> <467A7AAD.8090006@archonet.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200706/150 X-Sequence-Number: 19048 ------=_Part_137141_10468397.1182432786430 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline > > > I think there might be a small typo though. The left-join is to: > (select uid, phone_numer, datum from t2 order by 2 ) > Probably want to order by "datum DESC" too, to ensure you get the latest > dates for each telnum. yes, I also observed this, so I have add to my query. Thank you for your explanations, Richard. Best regards, Loredana ------=_Part_137141_10468397.1182432786430 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline

I think there might be a small typo though. The left-join is to:
   (select uid, phone_numer, datum from t2 order by 2 )
Probably want to order by "datum DESC" too, to ensure you get the latest
dates for each telnum.
 
yes, I also observed this, so I have add to my query.

Thank you for your explanations, Richard.


Best regards,
       Loredana


------=_Part_137141_10468397.1182432786430--