That will also give the PMs and deleted posts, which he probably doesn’t want.
@401Ott, if you want all posts published that do not include private messages, then you will need to filter out posts whose topic’s archetype is ‘private_message’.
Additionally, if you don’t want posts that have been deleted you will need to filter out posts where the deleted_at isn’t NULL. But as some posts can be deleted by their topic being deleted, you will also have to filter out posts where the topic they belong to has a deleted_at timestamp.
If you need the exact query, please specify exactly what you need and I will write it for you.