Re: [SQL] how to construct sql

2010-06-04 Thread Jasen Betts
On 2010-06-02, Wes James wrote: > On Wed, Jun 2, 2010 at 10:55 AM, Oliveiros > 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

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-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 day_tot, MAX(