SELECTDISTINCTCOUNT(*) FROMj25_joomblog_posts as a INNERJOINj25_joomblog_blogsAS `bl` ON `bl`.`content_id`=`a`.`id` WHERE a.state=1 AND a.publish_up < '2015-03-31 18:06:38'
and a.catid in (59,60,61)
AND a.created_by = 62