select pos.ID, pos.post_name, MAX(com.comment_date_gmt) AS max_date, com.comment_date_gmt, com.comment_ID, com.comment_content from lj_posts pos, lj_comments com where com.comment_post_id = pos.ID and com.comment_approved = '1' GROUP BY post_name ORDER BY com.comment_date_gmt DESC LIMIT 0,10