Hello,
thanks in advance to anyone who can help me with this query.
What I am trying to do is to retreieve a list of all the users from the table 'users' and count how many posts the user has made.
The code below will shows a list of users that have made a post, but I would like is a list of all the users PLUS how many post they have made, even if the number is '0'.
select
count(*) as post_count,
p.post_id,
p.user_id,
u.username
from
posts p
inner join
users u
on
p.user_id = u.user_id
group by username"
Thanks again to anyone who can help me.