Something like this...
<cfquery name="pageQuery" datasource="#request.DBName#">
Select count(*) as docCount,
year(activityDate) as activityYear,
Month(activityDate) as activityMonth,
activityDate
from Activity
Where activityDate > '2002-01-1'
And activityDate < now()
GROUP BY activityYear, activityMonth
ORDER BY activityDate desc
</cfquery>Should get you started...
Brett B)
[EMAIL PROTECTED] wrote:
Hey'all
I am trying to create some bar graphs of statistical data regarding the number of documents uploaded to a website using CFGRAPH in CF5.
When the documents are uploaded (using simple http methods) the "date_uploaded" is recorded in the MSSQL database as an ODBC datetime stamp.
How can i write a single query to count the number of documents uploaded by month?
Thanks... Steve
---
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]
MX Downunder AsiaPac DevCon - http://mxdu.com/
-- Brett Payne-Rhodes Eaglehawk Computing t: +61 (0)8 9371-0471 f: +61 (0)8 9371-0470 m: +61 (0)414 371 047 e: [EMAIL PROTECTED] w: www.ehc.net.au
--- You are currently subscribed to cfaussie as: [EMAIL PROTECTED] To unsubscribe send a blank email to [EMAIL PROTECTED]
MX Downunder AsiaPac DevCon - http://mxdu.com/
