I am running the below query which has a calendar table that joins on the field missedday and will show a count by week of number of students out during that week. Issue I have is that if by chance (which this situation hits) there were 0 students out for a week, the query just skips showing that week. I want it to return all weeks but return a 0 for any/all weeks where 0 students were out. I am sure it is in my join statement (or at least I think, lol) can someone tell me what to alter to make this happen? Also, if you need to see coding for any of the other tables etc just let me know and I will provide that as well:
SELECT a.studentName, SUM(a.abscenceCount) As Abscence_Count, dt.CumulativeWeek FROM MissedDays a INNER JOIN dim_Date dt ON a.MissedDay = dt.FullDate WHERE a.MissedDay IS NOT NULL GROUP BY dt.CumulativeWeek, a.studentName