Re: [SQL] sum an alias

2010-06-04 Thread Oliveiros d'Azevedo Cristina
- Original Message - From: "Wes James" To: Sent: Friday, June 04, 2010 2:30 PM Subject: Re: [SQL] sum an alias On Thu, Jun 3, 2010 at 11:54 PM, A. Kretschmer wrote: In response to Wes James : In the statement: select MAX(page_count_count) - MIN(page_count_count) as da

Re: [SQL] sum an alias

2010-06-04 Thread Wes James
On Thu, Jun 3, 2010 at 11:54 PM, A. Kretschmer wrote: > In response to Wes James : >> 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_c

Re: [SQL] sum an alias

2010-06-03 Thread A. Kretschmer
In response to Wes James : > 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