I have a table that has users, posts, and post-visibility ( public or private - which is controlled using a switch - which is basically a checkbox in the data table ). How do I gather the total count of public posts for a given user? Or in simple is there a way of counting the rows for a given user based on a boolean value of a column.
What I am thinking is a series of columns where I convert the checkbox to text (true/false) then filter only true or false based posts and then get a count. Is there a diff or a simpler way to do it?
Thanks