sum an alias - Mailing list pgsql-sql

From Wes James
Subject sum an alias
Date
Msg-id AANLkTil0i1cg1DulN4sIEIa08qM5VU5VuLoKB7u8g1-D@mail.gmail.com
Whole thread Raw
Responses Re: sum an alias  ("A. Kretschmer" <andreas.kretschmer@schollglas.com>)
List pgsql-sql
In the statement:

select   MAX(page_count_count) - MIN(page_count_count) as day_tot,   MAX(page_count_count) as day_max,
sum(MAX(page_count_count)-
 
MIN(page_count_count)) as tot,   page_count_pdate
from page_count
group by page_count_pdate order by page_count_pdate

Is there a way to do sum(day_tot) also in the same statement?

thx,

-wes


pgsql-sql by date:

Previous
From: Harald Fuchs
Date:
Subject: Re: inner join and limit
Next
From: "A. Kretschmer"
Date:
Subject: Re: sum an alias