Can you just GROUP BY the HOUR() of the time? Then get the COUNT()... To
get the average, it might then just be easier to divide that COUNT() by
the day difference you put in. 


......................
Ben Nadel
Certified Advanced ColdFusion MX7 Developer
www.bennadel.com
 
Need ColdFusion Help?
www.bennadel.com/ask-ben/

-----Original Message-----
From: Andy Matthews [mailto:[EMAIL PROTECTED] 
Sent: Monday, April 23, 2007 11:12 AM
To: CF-Talk
Subject: Query to get avg pageviews per hour

How might this query look?
 
I feed it a datestart and datend and I would like to get back a list of
values ordered by military time from 00:00 to 23:00.
 
The db is SQL Server 2000. The only way I can think of doing it is to
use a CASE statement, but that's quite elaborate. Anyone have an idea?
 
____________________________________
 
Andy Matthews
Senior Coldfusion Developer

Office:  877.707.5467 x747
Direct:  615.627.9747
Fax:  615.467.6249
[EMAIL PROTECTED]
www.dealerskins.com <http://www.dealerskins.com/> 
 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
ColdFusion MX7 by AdobeĀ®
Dyncamically transform webcontent into Adobe PDF with new ColdFusion MX7. 
Free Trial. http://www.adobe.com/products/coldfusion?sdid=RVJV

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:276040
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to