Ok guys
There are many great answers here, but obviously no one had time to test them.
Hao Liang receives credit for the first best original answer, but, unfortunately, his code does not show messages without comments.
Captain Keitar is on the right track, but his code will display each individual post and attachment as a separate result.
Here is a modified version of Captain Keytar, but it limits the results to the type of "post" .. that was published (to avoid getting drafts!)
select wp_posts.*, coalesce( ( select max(comment_date) from $wpdb->comments wpc where wpc.comment_post_id = wp_posts.id ), wp_posts.post_date ) as mcomment_date from $wpdb->posts wp_posts where post_type = 'post' and post_status = 'publish' order by mcomment_date desc limit 10
source share