From: Jasen Betts <jasen@xnet.co.nz>
To: pgsql-sql@postgresql.org
Subject: Re: how to construct sql
Date: 4 Jun 2010 10:01:56 GMT
Message-ID: <huaiuk$lp2$1@reversiblemaps.ath.cx> (raw)
References: <AANLkTik3O3L0PLqy4SN5oHy9zSBf8TDLXzGZcPYLtEXf@mail.gmail.com>
<597755AB8EE8458F92F4B7C6588E5C03@marktestcr.marktest.pt>
<AANLkTikQCTiXkz0n2wPp_kvK6KIf-rXngFb_7UDdfb0y@mail.gmail.com>
On 2010-06-02, Wes James <comptekki@gmail.com> wrote:
> On Wed, Jun 2, 2010 at 10:55 AM, Oliveiros
><oliveiros.cristina@marktest.pt> wrote:
>> Hi,
>> Have you already tried this out?
>>
>> select MAX(page_count_count) - MIN(page_count_count) from page_count group
>> by page_count_pdate.
>>
>>
>> Best,
>> Oliveiros
>
> Oliveiros,
>
> Thx that mostly works. I just tried it and on the days there is only
> 1 entry it is 0 since max is the same as min so max - min is 0. Is
> there a way to take in to account the 1 entry days?
from your original requirement 0 is the correct answer.
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: jasen@xnet.co.nz
Subject: Re: how to construct sql
In-Reply-To: <huaiuk$lp2$1@reversiblemaps.ath.cx>
* 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