Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
Thread:
Lists: pgsql-novicepgsql-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

pgsql-novice by date

Next:From: Oliveiros CristinaDate: 2007-06-05 13:19:06
Subject: Re: [SQL] JOIN
Previous:From: Gregory StarkDate: 2007-06-05 12:45:19
Subject: Re: JOIN

pgsql-sql by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group