Re: Join query help

From: novice <user(dot)postgresql(at)gmail(dot)com>
To: "Michael Glaesemann" <grzm(at)seespotcode(dot)net>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: Join query help
Date: 2007-08-21 01:21:40
Message-ID: ddcb1c340708201821o63afa1bcve75509f5d368a53f@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-sql

On 21/08/07, Michael Glaesemann <grzm(at)seespotcode(dot)net> wrote:

> Now here's where I started having trouble. I can't figure out how to
> get 2 observations for week 29 (record_id 1 & 3) and 8 for week 30
> (record_id 2). Assuming the data is wrong (which is admittedly a poor
> assumption), I moved ahead.

> > week_no | count(record_id | count(observation_id) | sum(score_id)
> > where = '1'
> > 2007, 30 | 2 | 8 | 6
> > 2007, 29 | 1 | 2 | 1

For week 29, there were 1 SAFE observation out of the 2 observations and
for week 30, there were 6 SAFE obseravations out of the 8
observations. Hope this helps.

Thanks!

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Michael Glaesemann 2007-08-21 01:27:19 Re: Join query help
Previous Message Michael Glaesemann 2007-08-21 01:04:10 Re: Join query help

Browse pgsql-sql by date

  From Date Subject
Next Message Michael Glaesemann 2007-08-21 01:27:19 Re: Join query help
Previous Message Michael Glaesemann 2007-08-21 01:04:10 Re: Join query help