I am trying to list out all task with the count of finished/completed task (In submissions). The problem is that I also want to show all task that no users have finished. This query does not list out count = 0 (Null). Is there any way to do this?
Wanted result:
Date | title | completed
2014-05-20 | Case 1 | 45
2014-05-24 | Case 10 | 11
2014-05-20 | Case 2 | 0
I have tried so far:
Select date, title, count(*) as completed
from users u, submissions s, task t
where u.userPK = s.user
and s.task= t.taskPK
group by taskPK
order by completed desc;