Output Sum of some column in week intervals throughout a year, week dates consistent with day
问题 I need some help as I am stuck. This is using SQL and Coldfusion. Basically I have a table which list a completion of certain tickets along with what date they were marked complete. This table has district and area for example, which is used in the GROUP BY. So I want to count every ticket that was done on every week of the year, the user selects for example running the report. I will list a little of the SQL I have at the moment. SELECT SUM(CASE WHEN DATEPART(ww, completionDate) = 1 THEN 1