Re: [SQL] JOIN

From: "Loredana Curugiu" <loredana(dot)curugiu(at)gmail(dot)com>
To: dev(at)archonet(dot)com, pgsql-novice(at)postgresql(dot)org, pgsql-sql(at)postgresql(dot)org
Subject: Re: [SQL] JOIN
Date: 2007-06-05 12:59:04
Message-ID: 1c23c8e70706050559n60615ba7kab11f6f0f402d9ec@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice 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

In response to

  • Re: JOIN at 2007-06-05 12:39:29 from Richard Huxton

Responses

  • Re: JOIN at 2007-06-05 13:21:44 from Richard Huxton

Browse pgsql-novice by date

  From Date Subject
Next Message Oliveiros Cristina 2007-06-05 13:19:06 Re: [SQL] JOIN
Previous Message Gregory Stark 2007-06-05 12:45:19 Re: JOIN

Browse pgsql-sql by date

  From Date Subject
Next Message Ranieri Mazili 2007-06-05 13:11:59 CREATE RULE with WHERE clause
Previous Message Gregory Stark 2007-06-05 12:45:19 Re: JOIN