Impossible to get result with query SELECT coalesce(translation.title,node.Name) AS name,node.CategoryId,node.*, (COUNT(parent.CategoryId) - (sub_tree.depth + 1)) AS depth FROM nested_category AS node join nested_category AS parent on node.lft BETWEEN parent.lft AND parent.rgt join nested_category AS sub_parent on node.lft BETWEEN sub_parent.lft AND sub_parent.rgt join ( SELECT node.Name,node.CategoryId, (COUNT(parent.CategoryId) - 1) AS depth FROM nested_category AS node, nested_category AS parent WHERE node.lft BETWEEN parent.lft AND parent.rgt AND node.CategoryId = 72 GROUP BY node.CategoryId ORDER BY node.lft )AS sub_tree ON sub_parent.CategoryId = sub_tree.CategoryId left join abstract_translation AS translation ON translation.idcontent=node.CategoryId and tablecontent='nested_category' AND translation.language="fr" GROUP BY node.CategoryId HAVING depth = 1 ORDER BY node.lft :