Q&A for those who study, teach, research and apply economics and econometrics
select count(*) from comments, posts where posts.id = comments.postid group by comments.userid