SELECT 
obj_main.isys_obj__id AS '__id__', 
(CONCAT(obj_main.isys_obj__title, ' {', obj_main.isys_obj__id, '}')   ) 'isys_cmdb_dao_category_g_global__title', 
(SELECT COUNT(isys_person_2_group__isys_obj__id__person)
                            FROM isys_person_2_group
                            INNER JOIN isys_obj ON isys_obj__id = isys_person_2_group__isys_obj__id__person AND isys_obj__status = 2  WHERE isys_person_2_group__isys_obj__id__group = obj_main.isys_obj__id   ) 'isys_cmdb_dao_category_s_person_group_members__membersCount', 
j2.isys_cats_person_group_list__ldap_group 'isys_cmdb_dao_category_s_person_group_master__ldap_group' 

FROM isys_obj AS obj_main 
LEFT JOIN isys_cats_person_group_list AS j2 ON j2.isys_cats_person_group_list__isys_obj__id = obj_main.isys_obj__id AND j2.isys_cats_person_group_list__status = 2 

WHERE TRUE 
AND obj_main.isys_obj__isys_obj_type__id = 54 
