SELECT b.bloggerName,
p.publishedDate,
p.blogText,
p.blogTitle
FROM contentBlogs b
INNER JOIN contentBlogPosts p ON b.blogID = p.blogID
INNER JOIN (
SELECT blogID,
MAX(publishedDate) LastpublishedDate
FROM contentBlogPosts
GROUP BY
blogID) p2 ON b.blogID = p2.blogID AND p.publishedDate = p2.LastpublishedDate
|