I'm having trouble understanding how to build my bar chart. I have a column of info called Issue and then I'm coutning the record.
I bascially need to alter my query into time periods. I need a series for quarter 1 (1/1/2006 - 3/1/2006), one for quarter 2, 3, 4 and the entire year as a whole.
Can this data all be organized in a single select query?
Here is my current query getting the year as a whole data only:
SELECT
Issue,COUNT(*)AS NumRecordsFROM CSP_Item CIINNER
JOIN CSP_ProblemNotification CPON CP.ID= CI.CSPNumWHERE
CP.PNDateBETWEEN'01/01/2007'AND'01/31/2007'GROUP
BY IssueORDERBY NumRecordsASCMaybe...
SelectDatePart(quarter, theDate) as Quarter.
group byDatePart(quarter, theDate)
No comments:
Post a Comment