SELECT format(thedate,'d') AS e, count(*) AS ec
        from products
        Group by format(thedate,'d')

+-----------------------------------------------+
Bryan Love
  Macromedia Certified Professional
  Internet Application Developer
  Database Analyst
Telecommunication Systems
[EMAIL PROTECTED]
+-----------------------------------------------+

"...'If there must be trouble, let it be in my day, that my child may 
have
peace'..."
        - Thomas Paine, The American Crisis



-----Original Message-----
From: Paris Lundis [mailto:[EMAIL PROTECTED]]
Sent: Monday, January 14, 2002 9:19 PM
To: CF-Talk
Subject: cold fusion reporting...


does anyone have a good sample of SQL code that does in essence the
following:

A. takes and groups the total records on a per date basis where the 
date is
a date/time field.. so we want Jan 11, Jan 12, Jan 13, etc. broken 
out...
(yeah we store date and time.. much easier if we would have stored time 
in
another field)... so only group where records exist for day..

B. Calculates the total number of records found for each date... so Jan 11=
21, Jan 12=31...

an Access database sort of SQL piece will be fine...

sounds simple... perhaps I should get some rest and come back... :)



______________________________________________________________________
Dedicated Windows 2000 Server
  PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER
  Instant Activation � $99/Month � Free Setup
  http://www.pennyhost.com/redirect.cfm?adcode=coldfusiona
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to