SELECT SQL_CALC_FOUND_ROWS `wp3_posts` . `ID` FROM `wp3_posts` INNER JOIN `wp3_term_relationships` ON ( `wp3_posts` . `ID` = `wp3_term_relationships` . `object_id` ) WHERE ? = ? AND ( `wp3_term_relationships` . `term_taxonomy_id` IN (...) ) AND `wp3_posts` . `post_type` = ? AND ( `wp3_posts` . `post_status` = ? ) GROUP BY `wp3_posts` . `ID` ORDER BY `wp3_posts` . `post_date` DESC LIMIT ?, ... 