Re: how to construct sql

Поиск
Список
Период
Сортировка
От Jasen Betts
Тема Re: how to construct sql
Дата
Msg-id huaiuk$lp2$1@reversiblemaps.ath.cx
обсуждение исходный текст
Ответ на how to construct sql  (Wes James <comptekki@gmail.com>)
Список pgsql-sql
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.




В списке pgsql-sql по дате отправления:

Предыдущее
От: "A. Kretschmer"
Дата:
Сообщение: Re: sum an alias
Следующее
От: Wes James
Дата:
Сообщение: Re: sum an alias