SELECT `t` . `term_id` , `t` . `slug` , `tt` . `term_taxonomy_id` , `tt` . `taxonomy` FROM `wp_terms` AS `t` INNER JOIN `wp_term_taxonomy` AS `tt` ON ( `tt` . `term_id` = `t` . `term_id` ) WHERE `t` . `slug` = ? AND `tt` . `parent` = ? AND `tt` . `taxonomy` = ? AND `t` . `term_id` < ? AND `tt` . `term_taxonomy_id` != ? 