Re: JOIN - Mailing list pgsql-sql

From Loredana Curugiu
Subject Re: JOIN
Date
Msg-id 1c23c8e70706050559n60615ba7kab11f6f0f402d9ec@mail.gmail.com
Whole thread Raw
In response to Re: JOIN  (Richard Huxton <dev@archonet.com>)
Responses Re: JOIN
List pgsql-sql


>> 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

pgsql-sql by date:

Previous
From: "Loredana Curugiu"
Date:
Subject: JOIN
Next
From: Ranieri Mazili
Date:
Subject: CREATE RULE with WHERE clause