I have two tables:
Table users:
userId, user
------------
0, Alice
1, Bob
2, Eve
Table rss:
userId, link, read
------------
0, example.com/1, 0
0, example.com/2, 1
0, example.com/3, 1
0, example.com/4, 0
1, example.com/3, 0
1, example.com/4, 1
When I run:
SELECT `users`.`user`, COUNT(*) FROM `rss` INNER JOIN `users` ON `rss`.`userId`=`users`.`userId` WHERE `rss`.`read`=0 GROUP BY `rss`.`userId`
I get:
Alice, 2
Bob, 1
But I would like to also have Eve mentioned (stating 0), i.e.,
Alice, 2
Bob, 1
Eve, 0