I'm afraid the query is fully operational... select count(distinct c.comment_text) as numcomments, count(distinct t.trackback_url) as numtracks, P.post_id,P.post_title,P.post_text,P.is_published,P.date_published,P.date_created,P.post_url from tbl_posts P inner join tbl_blogs B on P.blog_id= B.blog_id right outer join tbl_comments c on P.post_id=c.post_id left outer join tbl_trackbacks t on P.post_id=t.post_id where B.blog_url = 'megans-blog1' group by c.post_id,t.post_id order by P.date_created desc