SELECT COUNT(*) FROM vb_post LEFT JOIN vb_user ON vb_user.userid = vb_post.userid WHERE vb_user.usergroupid IN (10,62) AND visible = 1 AND dateline > UNIX_TIMESTAMP('2015-06-30') AND dateline < UNIX_TIMESTAMP('2015-10-01')