Devi usare CHAR_LENGTH
invece di LENGTH
SELECT a.id, a.post_id, a.body
FROM posts a INNER JOIN
(
SELECT post_ID, title, MAX(CHAR_LENGTH(body)) totalLength
FROM posts
GROUP BY post_ID, title
) b ON a.post_id = b.post_ID AND
a.title = b.title AND
CHAR_LENGTH(a.body) = b.totalLength
Potresti voler vedere la differenza:CHAR_LENGTH( ) vs LUNGHEZZA( )