The SQL code for the query would need to have this structu
SELECT
FORMAT(Date_LU.RefDate,'YYYYMM') AS 'YrMth',
COUNT(*) AS 'PeriodCount'
FROM `C:\CoderreR\2005_db`.Date_LU Date_LU
WHERE (FORMAT(Date_LU.RefDate,'YYYYMM') Between '200501' And '200505')
GROUP BY FORMAT(Date_LU.RefDate,'YYYYMM')
That returns the monthly count of records for the period Jan2005 thru Man2005:
YrMth PeriodCount
200501 31
200502 28
200503 31
200504 30
200505 31
(In my example, the table only contained sequential dates. Hence, the query
returned the number of days in each month)
Does that help?
--
Regards,
Ron
|