You should filter only regular posts by WHERE p.post_type = 1.
Available post types are regular: 1, moderator_action: 2, small_action: 3, whisper: 4.
You should filter only regular posts by WHERE p.post_type = 1.
Available post types are regular: 1, moderator_action: 2, small_action: 3, whisper: 4.