Received: from localhost (maia-4.hub.org [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 331FB9FC835 for ; Tue, 5 Jun 2007 10:13:26 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 37170-06-5 for ; Tue, 5 Jun 2007 10:13:21 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.4 Received: from an-out-0708.google.com (an-out-0708.google.com [209.85.132.247]) by postgresql.org (Postfix) with ESMTP id E5FA29FC925 for ; Tue, 5 Jun 2007 09:59:06 -0300 (ADT) Received: by an-out-0708.google.com with SMTP id c36so392107ana for ; Tue, 05 Jun 2007 05:59:05 -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=Y5u5Nb3B9uJe6jpBSwES6HFPIh9giYgDBGcWYrcsSBmJ1VwLk86hSD+DjOr9vZscIaU+24FMqV6k+KWdkIIhGl1sfPaZ5DjfedIZoMfnmBS0Lo0MfeMkCdu6BuhPNQlX0PV0h0cYa0cxjbK38wkO6xN638E8uel5VHvopsOX+pE= 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=lu8ydAAb1yqyaqczlEvt17hvRr7PomCz1S87J2FjB9+ctEEDe8ydLgiAqSn1jgQ5qFIrM7dXU24F4uzkQAnXl39y5DE4qICFpNfdWBhEQnvosjv+PsxIW6izriiLJGJjlbUvsSCmUrT/M9s7NjXpvqrI6EAoWj3yMALjvTMRroY= Received: by 10.100.171.16 with SMTP id t16mr3223356ane.1181048344713; Tue, 05 Jun 2007 05:59:04 -0700 (PDT) Received: by 10.100.42.1 with HTTP; Tue, 5 Jun 2007 05:59:04 -0700 (PDT) Message-ID: <1c23c8e70706050559n60615ba7kab11f6f0f402d9ec@mail.gmail.com> Date: Tue, 5 Jun 2007 15:59:04 +0300 From: "Loredana Curugiu" To: dev@archonet.com, pgsql-novice@postgresql.org, pgsql-sql@postgresql.org Subject: Re: [SQL] JOIN In-Reply-To: <46655981.4050403@archonet.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_10876_25161731.1181048344687" References: <1c23c8e70706050111i5ba672d6j78bd9afa4b786616@mail.gmail.com> <1c23c8e70706050426y12d567ban70ffdafb75808e0e@mail.gmail.com> <4665537A.2060601@archonet.com> <1c23c8e70706050518v19c56d21j873985125b930db@mail.gmail.com> <46655981.4050403@archonet.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200706/28 X-Sequence-Number: 18926 ------=_Part_10876_25161731.1181048344687 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline >> You don't actually say what's wrong. What are you expecting as output? I should obtain the following result: sum | theme | receiver | dates --------+----------+----------------------+-------------------------------------------------------------------------------- 8 | CRIS | +40741775622 | {2007-06-01,2007-06-02,2007-06-03,2007-06-04,2007-06-05,2007-06-06,2007-06-07} 5 | CRIS | +40741775622 | {2007-06-02,2007-06-03,2007-06-04,2007-06-05,2007-06-06,2007-06-07,2007-06-08} 4 | CRIS | +40741775622 | {2007-06-03,2007-06-04,2007-06-05,2007-06-06,2007-06-07,2007-06-08,2007-06-09} 3 | CRIS | +40741775622 | {2007-06-04,2007-06-05,2007-06-06,2007-06-07,2007-06-08,2007-06-09,2007-06-10} 10 | LIA | +40741775621 | {2007-06-01,2007-06-02,2007-06-03,2007-06-04,2007-06-05,2007-06-06} 6 | LIA | +40741775621 | {2007-06-02,2007-06-03,2007-06-04,2007-06-05,2007-06-06,2007-06-07} 4 | LIA | +40741775621 | {2007-06-03,2007-06-04,2007-06-05,2007-06-06,2007-06-07,2007-06-08} 2 | LIA | +40741775621 | {2007-06-04,2007-06-05,2007-06-06,2007-06-07,2007-06-08,2007-06-09} (8 rows) Try the query without totalling, just to see what matches you're getting. I obtain the same result without sum column. You're happy that daylight-saving adjustments aren't causing any > problems with your timezone settings then? I took in consideration the daylight-saving adjustments. Regards, Loredana ------=_Part_10876_25161731.1181048344687 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline

>> You don't actually say what's wrong. What are you expecting as output?
I should obtain the following result:
 sum | theme  |     receiver      |                                     dates
--------+----------+----------------------+--------------------------------------------------------------------------------
      8 | CRIS  | +40741775622 | {2007-06-01,2007-06-02,2007-06-03,2007-06-04,2007-06-05,2007-06-06,2007-06-07}
      5 | CRIS  | +40741775622 | {2007-06-02,2007-06-03,2007-06-04,2007-06-05,2007-06-06,2007-06-07,2007-06-08}
      4 | CRIS  | +40741775622 | {2007-06-03,2007-06-04,2007-06-05,2007-06-06,2007-06-07,2007-06-08,2007-06-09}
      3 | CRIS  | +40741775622 | {2007-06-04,2007-06-05,2007-06-06,2007-06-07,2007-06-08,2007-06-09,2007-06-10}
    10 | LIA     | +40741775621 | {2007-06-01,2007-06-02,2007-06-03,2007-06-04,2007-06-05,2007-06-06}
      6 | LIA     | +40741775621 | {2007-06-02,2007-06-03,2007-06-04,2007-06-05,2007-06-06,2007-06-07}
      4 | LIA     | +40741775621 | {2007-06-03,2007-06-04,2007-06-05,2007-06-06,2007-06-07,2007-06-08}
      2 | LIA     | +40741775621 | {2007-06-04,2007-06-05,2007-06-06,2007-06-07,2007-06-08,2007-06-09}
(8 rows)

 

Try the query without totalling, just to see what matches you're getting.

I obtain the same result without sum column.

You're happy that daylight-saving adjustments aren't causing any
problems with your timezone settings then?

I took in consideration the  daylight-saving adjustments.

Regards,
      Loredana
------=_Part_10876_25161731.1181048344687--