SELECT SQL_CALC_FOUND_ROWS `wp_posts` . `ID` FROM `wp_posts` WHERE ? = ? AND ( ( `wp_posts` . `ID` NOT IN ( SELECT `object_id` FROM `wp_term_relationships` WHERE `term_taxonomy_id` IN (...) ) ) ) AND ( `wp_posts` . `post_mime_type` LIKE ? ) AND `wp_posts` . `post_type` = ? AND ( ( `wp_posts` . `post_status` = ? OR `wp_posts` . `post_status` = ? ) ) GROUP BY `wp_posts` . `ID` ORDER BY `wp_posts` . `post_date` DESC LIMIT ?, ... 