From: novice <user.postgresql@gmail.com>
To: Michael Glaesemann <grzm@seespotcode.net>
Cc: pgsql-sql@postgresql.org
Subject: Re: Join query help
Date: Tue, 21 Aug 2007 11:21:40 +1000
Message-ID: <ddcb1c340708201821o63afa1bcve75509f5d368a53f@mail.gmail.com> (raw)
In-Reply-To: <4416C45B-CCC2-44AC-AA92-92500CF21BF5@seespotcode.net>
References: <ddcb1c340708172235w3b07b912od246e76fa9109646@mail.gmail.com>
<4416C45B-CCC2-44AC-AA92-92500CF21BF5@seespotcode.net>
On 21/08/07, Michael Glaesemann <grzm@seespotcode.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!
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: user.postgresql@gmail.com, grzm@seespotcode.net
Subject: Re: Join query help
In-Reply-To: <ddcb1c340708201821o63afa1bcve75509f5d368a53f@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox