Hi, I have a requirement to create a table in SSRS reports where in every column should have the total number of cases created for for today, which are 1 day old and so on to 10 days. I have written a query with respect to the issue type field the cases created for the particular issue type. For now i can only obtain the values for the cases which have been created <=5 days and only the data gets displayed for the issue types which have been created, but the cases which have not been created for other issue types wont be displayed since their count is 0. I need the results even for count=0. How to write a subquery for all the conditions. The below is the query obtained for the cases created from <=5 days. SELECT distinct A.new_issuetypename , Count(1) as Count FROM FilteredIncident A LEFT outer JOIN FilteredIncident B ON A.Incidentid=B.Incidentid WHERE DATEDIFF(DAY, B.createdon, GETDATE()) <= 5 GROUP BY A.new_issuetypename Please suggest a solution. Thank You Regards, HIma
↧