I checked this answer but I have a problem.
SQL Fiddle (I changed INNER JOIN to LEFT JOIN)
What if there is a row in my departments (DDD for example) and no association in the courses table .
As you can see in the fiddle the count for DDD department is 1 like the BUS department has even if there is no data for DDD department. I know that LEFT JOIN does this but how can I modify this ?
How do I get count = 0 for the DDD department?