Update, I haven’t looked into this in a while and I have now got a query that does what I want. However I still need to declare the timefilter some how but have no idea how to do it with MSSQL.
Here is my query:
SELECT COUNT(DATEPART(yy, REGDATUM)) AS Total,
DATEPART(yy, REGDATUM) AS Year,
DATEPART(mm, REGDATUM) AS Month,
DATEPART(DD, REGDATUM) AS Day
FROM dbo.HELPDESK where GRUPP_ID IN (1,2,4,6,7,8,15,16) AND HELPDESK.STATUSID IN (12,3,16,20,21,1,14,9,0)
GROUP BY DATEPART(yy, REGDATUM), DATEPART(mm, REGDATUM), DATEPART(DD, REGDATUM)
ORDER BY Year DESC, Month DESC, Day DESC
It produces a table and graph with no problem however all entries on the graph is dated 1970-01-01.
Any more ideas would be appreciated.