Quote:
Originally Posted by rcollins
I am new at charts. I want to make a chart that gives me the amount of incidents per month. Shouldn't be that hard but at the moment the best I get is totaling all of the month values for each year all together. For instance, December has the count of all december incidents from 01 to 08. I want to also put a start and end date to these. Please help to point me in the right direction
Hi. You need to add the year as a Group By clause in your base query. You can add criteria to your query to select dates between particular dates you are interested in.
General SQL for this is along the lines of
- SELECT [yourtable].[year], [yourtable].[month], Count([yourtable].[month]) AS N
-
FROM [yourtable]
-
WHERE ([yourtable].[rowdate] between #somedate# AND #anotherdate#
-
GROUP BY [yourtable].[year], [yourtable].[month]
-
ORDER BY [yourtable].[year], [yourtable].[month];
-Stewart