Un error casi imperceptible: Estás usando
apóstrofes (') para los nombres de las tablas y alias de tablas, y
deben ser acentos inversos (`).
Código MySQL:
Ver original `posts`.
`post_id` AS `id`, `posts`.
`post_title` AS `title`, LEFT(`post`.
`post_body`, 512) AS `preview`, `post`.
`post_user` AS `user`, `comments`.`total_comments`,
DATE_FORMAT(`comments`.
`last_comment`, '%d/%m/%Y %H:%i:%s') AS `last_comment` `post_id`,
COUNT(`comment_id`) AS `total_comments`, MAX(comment_date
) AS `last_comment` GROUP BY `post_id`) AS `comments` ON `posts`.
`post_id` = `comments`.
`post_id`