I need help.
I have sql code:
SELECT app_users.name,COUNT(owner)
FROM app_users
INNER JOIN app_tickets
ON app_tickets.owner = app_users.id
where app_tickets.status IN (0,1,2,4,5)
GROUP BY app_users.name
This code show value like this:
Adam Smith 12
Brad Smith 23
Nancy Smith 3
But i need to show value like this
Adam Smith 12
Ann Smith 0
Brad Smith 23
Nancy Smith 3
Peter Smith 0
I try use IFNULL() and COALESCE() but not help