SELECT DISTINCTROW `wp_users` . * FROM `wp_users` LEFT JOIN `wp_usermeta` ON ( `wp_users` . `ID` = `wp_usermeta` . `user_id` ) LEFT JOIN `wp_usermeta` AS `mt1` ON ( `wp_users` . `ID` = `mt1` . `user_id` ) LEFT JOIN `wp_usermeta` AS `mt2` ON ( `wp_users` . `ID` = `mt2` . `user_id` ) LEFT JOIN `wp_usermeta` AS `mt3` ON ( `wp_users` . `ID` = `mt3` . `user_id` AND `mt3` . `meta_key` = ? ) WHERE ? = ? AND `wp_users` . `ID` IN ( SELECT DISTINCTROW `wp_posts` . `post_author` FROM `wp_posts` WHERE `wp_posts` . `post_status` = ? AND `wp_posts` . `post_type` IN (?) ) AND ( `wp_usermeta` . `meta_key` = ? AND ( ( `mt1` . `meta_key` = ? AND `mt1` . `meta_value` != ? ) AND ( ( `mt2` . `meta_key` = ? AND `mt2` . `meta_value` != ? ) OR `mt3` . `user_id` IS NULL ) ) ) ORDER BY `wp_usermeta` . `meta_value` + ? DESC LIMIT ?, ... 