SELECT 
obj_main.isys_obj__id AS '__id__', 
(CONCAT(DATE_FORMAT(obj_main.isys_obj__updated, '%d.%m.%Y %H:%i:%s'), ' (' , obj_main.isys_obj__updated_by, ')')   ) 'isys_cmdb_dao_category_g_global__changed', 
j2.isys_cats_person_list__last_name 'isys_cmdb_dao_category_s_person_master__last_name', 
j2.isys_cats_person_list__first_name 'isys_cmdb_dao_category_s_person_master__first_name', 
j2.isys_cats_person_list__department 'isys_cmdb_dao_category_s_person_master__department', 
j2.isys_cats_person_list__phone_company 'isys_cmdb_dao_category_s_person_master__phone_company', 
(SELECT isys_catg_mail_addresses_list__title  FROM isys_catg_mail_addresses_list  WHERE isys_catg_mail_addresses_list__primary = 1  AND isys_catg_mail_addresses_list__isys_obj__id = obj_main.isys_obj__id  AND isys_catg_mail_addresses_list__status = 2   ) 'isys_cmdb_dao_category_s_person_master__mail', 
j2.isys_cats_person_list__title 'isys_cmdb_dao_category_s_person_login__title' 

FROM isys_obj AS obj_main 
LEFT JOIN isys_cats_person_list AS j2 ON j2.isys_cats_person_list__isys_obj__id = obj_main.isys_obj__id AND j2.isys_cats_person_list__status = 2 

WHERE TRUE 
AND obj_main.isys_obj__isys_obj_type__id = 53 
