Q&A for pro webmasters
Select P.Id, count(*) as totalPosts From Posts P Right JOIN Users U ON(P.Id = U.Id) Group By P.Id